Source/Platform/ChangeLog

 12012-06-27 Hironori Bono <[email protected]>
 2
 3 [Chromium] Implement hyphenation for Chromium
 4 https://bugs.webkit.org/show_bug.cgi?id=48610
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This change adds a couple of methods canHyphenate and computeLastHyphenLocation
 9 to Platform so Chromium can implement them. Also, this change uses these methods
 10 to implement the hyphenation methods of WebCore. (This change does not change
 11 any behaviors until Chromium implements these methods.)
 12
 13 * chromium/public/Platform.h:
 14 (Platform):
 15 (WebKit::Platform::canHyphenate): Added a stub method so Chromium can implement it.
 16 (WebKit::Platform::computeLastHyphenLocation): ditto.
 17
1182012-06-26 James Robinson <[email protected]>
219
320 [chromium] Remove WebView::graphicsContext3D getter
121410

Source/Platform/chromium/public/Platform.h

@@public:
133133 virtual bool isLinkVisited(unsigned long long linkHash) { return false; }
134134
135135
 136 // Hyphenation ---------------------------------------------------------
 137
 138 // Returns whether we can support hyphenation for the given locale.
 139 virtual bool canHyphenate(const WebString& locale) { return false; }
 140
 141 // Returns the last position where we can add a hyphen before the given position.
 142 virtual size_t computeLastHyphenLocation(const WebUChar* characters, size_t length, size_t beforeIndex, const WebString& locale) { return 0; }
 143
 144
136145 // Keygen --------------------------------------------------------------
137146
138147 // Handle the <keygen> tag for generating client certificates
121398

Source/WebCore/ChangeLog

 12012-06-27 Hironori Bono <[email protected]>
 2
 3 [Chromium] Implement hyphenation for Chromium
 4 https://bugs.webkit.org/show_bug.cgi?id=48610
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This change adds a couple of methods canHyphenate and computeLastHyphenLocation
 9 to Platform so Chromium can implement them. Also, this change uses these methods
 10 to implement the hyphenation methods of WebCore. (This change does not change
 11 any behaviors until Chromium implements these methods.)
 12
 13 No new tests because this change is for fixing a couple of existing layout tests
 14 'fast/text/hyphenate-character.html' and 'fast/text/hyphens.html'.
 15
 16 * WebCore.gypi:
 17 * platform/text/chromium/Hyphenation.cpp: Added.
 18 (WebCore):
 19 (WebCore::canHyphenate): Called Platform::canHyphenation().
 20 (WebCore::lastHyphenLocation): Called Platform::computeLastHyphenLocation().
 21
1222012-06-27 Mary Wu <[email protected]>
223
324 [BlackBerry] 0-length response with no content-type shouldn't download
121410

Source/WebCore/WebCore.gypi

45554555 'platform/text/AtomicStringKeyedMRUCache.h',
45564556 'platform/text/Base64.cpp',
45574557 'platform/text/BidiContext.cpp',
4558  'platform/text/Hyphenation.cpp',
45594558 'platform/text/Hyphenation.h',
45604559 'platform/text/LineEnding.cpp',
45614560 'platform/text/LocaleICU.cpp',

46004599 'platform/text/cf/HyphenationCF.cpp',
46014600 'platform/text/cf/StringCF.cpp',
46024601 'platform/text/cf/StringImplCF.cpp',
 4602 'platform/text/chromium/Hyphenation.cpp',
46034603 'platform/text/chromium/TextBreakIteratorInternalICUChromium.cpp',
46044604 'platform/text/efl/TextBreakIteratorInternalICUEfl.cpp',
46054605 'platform/text/gtk/TextBreakIteratorGtk.cpp',
121398

Source/WebCore/platform/text/chromium/Hyphenation.cpp

 1/*
 2 * Copyright (C) 2012 Google Inc. All rights reserved.
 3 *
 4 * Redistribution and use in source and binary forms, with or without
 5 * modification, are permitted provided that the following conditions
 6 * are met:
 7 * 1. Redistributions of source code must retain the above copyright
 8 * notice, this list of conditions and the following disclaimer.
 9 * 2. Redistributions in binary form must reproduce the above copyright
 10 * notice, this list of conditions and the following disclaimer in the
 11 * documentation and/or other materials provided with the distribution.
 12 *
 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
 23 * THE POSSIBILITY OF SUCH DAMAGE.
 24 */
 25
 26#include "config.h"
 27#include "Hyphenation.h"
 28#include <public/Platform.h>
 29
 30namespace WebCore {
 31
 32bool canHyphenate(const AtomicString& localeIdentifier)
 33{
 34 return WebKit::Platform::current()->canHyphenate(localeIdentifier);
 35}
 36
 37size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier)
 38{
 39 return WebKit::Platform::current()->computeLastHyphenLocation(characters, length, beforeIndex, localeIdentifier);
 40}
 41
 42} // namespace WebCore
0