WebCore: Allow the language for hyphenation to be specified
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Aug 2010 21:22:24 +0000 (21:22 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 4 Aug 2010 21:22:24 +0000 (21:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=43467

Test: fast/text/hyphenate-locale.html

Added a -webkit-hyphenate-locale property whose value can be either auto or a locale identifier
string. The initial value is auto and the property is inherited. When the value is a locale
identifier, hyphenation should follow the rules for the specified locale.

* WebCore.xcodeproj/project.pbxproj: Added AtomicStringKeyedMRUCache.h.
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle -webkit-hyphenate-locale.
Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString().
* css/CSSParser.cpp:
(WebCore::CSSParser::parseValue): Parse -webkit-hyphenate-locale.
* css/CSSPropertyNames.in: Added -webkit-hyphenate-locale.
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::applyProperty): Apply the -webkit-hyphenate-locale property to the
RenderStyle. Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString().
* platform/text/AtomicStringKeyedMRUCache.h: Added.
(WebCore::AtomicStringKeyedMRUCache::get):
* platform/text/Hyphenation.cpp:
(WebCore::canHyphenate): Added an implementation that returns false.
(WebCore::lastHyphenLocation): Now asserts that it is not called, because it is an error to call
this function if canHyphenate() returned false.
* platform/text/Hyphenation.h:
Added canHyphenate(). Returns true if hyphenation is possible for the given locale identifier.
* platform/text/android/HyphenationAndroid.cpp:
(WebCore::canHyphenate): Added an implementation that returns true and a FIXME.
(WebCore::lastHyphenLocation): Added unused localeIdentifier parameter.
* platform/text/cf/HyphenationCF.cpp:
(WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey): Returns
the CFLocaleRef for the current search locale.
(WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForKey): Returns a
CFLocaleRef for the locale identifier.
(WebCore::canHyphenate): Added. Returns true.
(WebCore::lastHyphenLocation): Added localeIdentifier parameter, used to pass a CFLocaleRef to
the hyphenation function.
* platform/text/mac/HyphenationMac.mm:
(WebCore::AtomicStringKeyedMRUCache<bool>::createValueForNullKey): Returns whether the current
search locale is english.
(WebCore::AtomicStringKeyedMRUCache<bool>::createValueForKey): Returns whether the locale identifier
string identifies locale with the English language.
(WebCore::canHyphenate): Added. Returns true if the locale language is English.
(WebCore::lastHyphenLocation): Added localeIdentifier parameter and an assertion that its language
is English.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::tryHyphenating): Added a locale identifier parameter, which is passed down to
lastHyphenLocation(). Added 1 to the value passed for the beforeIndex parameter to lastHyphenLocation(),
because the latter only returns values smaller than that index. The Mac implementation could
return a value equal to beforeIndex, but that is fixed in the WebKitSystemInterface part of this patch.
(WebCore::RenderBlock::findNextLineBreak): Only set canHyphenate to true if hyphenation is possible
for the specified hyphenation locale. Pass the hyphenation locale to tryHyphenating().
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff): Compare hyphenation locales.
(WebCore::RenderStyle::hyphenString): Updated for the renaming of hyphenateCharacter() to
hyphenationString().
* rendering/style/RenderStyle.h:
(WebCore::InheritedFlags::hyphenationString): Renamed hyphenateCharacter() to this.
(WebCore::InheritedFlags::hyphenationLocale): Added this accessor.
(WebCore::InheritedFlags::setHyphenationString): Renamed setHyphenateCharacter() to this.
(WebCore::InheritedFlags::setHyphenationLocale): Added this accessor.
(WebCore::InheritedFlags::initialHyphenationString): Renamed initialHyphenateCharacter() to this.
(WebCore::InheritedFlags::initialHyphenateLocale): Added. Returns the null atom, which represents a
value of auto.
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData): Copy the hyphenation locale. Updated for
rename.
(WebCore::StyleRareInheritedData::operator==): Compare the hyphenation locales. Updated for rename.
* rendering/style/StyleRareInheritedData.h:

WebKitLibraries: WebKitSystemInterface part of: Allow the language for hyphenation to be specified
https://bugs.webkit.org/show_bug.cgi?id=43467

Reviewed by Darin Adler.

* WebKitSystemInterface.h:
* libWebKitSystemInterfaceLeopard.a:
* libWebKitSystemInterfaceSnowLeopard.a:
* libWebKitSystemInterfaceTiger.a:

LayoutTests: Allow the language for hyphenation to be specified
https://bugs.webkit.org/show_bug.cgi?id=43467

Reviewed by Simon Fraser.

* fast/text/hyphenate-locale.html: Added.
* platform/mac/fast/text/hyphenate-locale-expected.checksum: Added.
* platform/mac/fast/text/hyphenate-locale-expected.png: Added.
* platform/mac/fast/text/hyphenate-locale-expected.txt: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64677 268f45cc-cd09-0410-ab3c-d52691b4dbfc

27 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/text/hyphenate-locale.html [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSComputedStyleDeclaration.cpp
WebCore/css/CSSParser.cpp
WebCore/css/CSSPropertyNames.in
WebCore/css/CSSStyleSelector.cpp
WebCore/platform/text/AtomicStringKeyedMRUCache.h [new file with mode: 0644]
WebCore/platform/text/Hyphenation.cpp
WebCore/platform/text/Hyphenation.h
WebCore/platform/text/android/HyphenationAndroid.cpp
WebCore/platform/text/cf/HyphenationCF.cpp
WebCore/platform/text/mac/HyphenationMac.mm
WebCore/rendering/RenderBlockLineLayout.cpp
WebCore/rendering/style/RenderStyle.cpp
WebCore/rendering/style/RenderStyle.h
WebCore/rendering/style/StyleRareInheritedData.cpp
WebCore/rendering/style/StyleRareInheritedData.h
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitSystemInterface.h
WebKitLibraries/libWebKitSystemInterfaceLeopard.a
WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a
WebKitLibraries/libWebKitSystemInterfaceTiger.a

index 9899a3ad7acbfb5137931fd19784b64ca8b4e499..aa4cdcea1a5ec82947748d6e63e8d70275305f20 100644 (file)
@@ -1,3 +1,15 @@
+2010-08-04  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Allow the language for hyphenation to be specified
+        https://bugs.webkit.org/show_bug.cgi?id=43467
+
+        * fast/text/hyphenate-locale.html: Added.
+        * platform/mac/fast/text/hyphenate-locale-expected.checksum: Added.
+        * platform/mac/fast/text/hyphenate-locale-expected.png: Added.
+        * platform/mac/fast/text/hyphenate-locale-expected.txt: Added.
+
 2010-08-04  Dimitri Glazkov  <dglazkov@chromium.org>
 
         Updating Windows DRT expectations after DRT's successful run.
diff --git a/LayoutTests/fast/text/hyphenate-locale.html b/LayoutTests/fast/text/hyphenate-locale.html
new file mode 100644 (file)
index 0000000..b7a44bc
--- /dev/null
@@ -0,0 +1,15 @@
+<div style="-webkit-hyphens: auto; font-size: 36px; width: 130px;">
+    <div>throughout</div>
+    <div style="-webkit-hyphenate-locale: 'en';">throughout</div>
+    <div style="-webkit-hyphenate-locale: 'en_US';">throughout</div>
+    <div style="-webkit-hyphenate-locale: 'en_GB';">throughout</div>
+    <div style="-webkit-hyphenate-locale: 'not-a-locale';">throughout</div>
+</div>
+
+<div style="-webkit-hyphens: auto; font-size: 36px; width: 135px;">
+    <div>reciprocity</div>
+    <div style="-webkit-hyphenate-locale: 'en';">reciprocity</div>
+    <div style="-webkit-hyphenate-locale: 'en_US';">reciprocity</div>
+    <div style="-webkit-hyphenate-locale: 'en_GB';">reciprocity</div>
+    <div style="-webkit-hyphenate-locale: 'not-a-locale';">reciprocity</div>
+</div>
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.checksum
new file mode 100644 (file)
index 0000000..fe996c1
--- /dev/null
@@ -0,0 +1 @@
+d109cac1345539a0091c08f3deccdd47
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png
new file mode 100644 (file)
index 0000000..796aea7
Binary files /dev/null and b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt b/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.txt
new file mode 100644 (file)
index 0000000..92cde36
--- /dev/null
@@ -0,0 +1,45 @@
+layer at (0,0) size 785x754
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x754
+  RenderBlock {HTML} at (0,0) size 785x754
+    RenderBody {BODY} at (8,8) size 769x738
+      RenderBlock {DIV} at (0,0) size 130x369
+        RenderBlock {DIV} at (0,0) size 130x82
+          RenderText {#text} at (0,0) size 124x82
+            text run at (0,0) width 124: "through"
+            text run at (0,41) width 46: "out"
+        RenderBlock {DIV} at (0,82) size 130x82
+          RenderText {#text} at (0,0) size 124x82
+            text run at (0,0) width 124: "through"
+            text run at (0,41) width 46: "out"
+        RenderBlock {DIV} at (0,164) size 130x82
+          RenderText {#text} at (0,0) size 124x82
+            text run at (0,0) width 124: "through"
+            text run at (0,41) width 46: "out"
+        RenderBlock {DIV} at (0,246) size 130x82
+          RenderText {#text} at (0,0) size 124x82
+            text run at (0,0) width 124: "through"
+            text run at (0,41) width 46: "out"
+        RenderBlock {DIV} at (0,328) size 130x41
+          RenderText {#text} at (0,0) size 158x41
+            text run at (0,0) width 158: "throughout"
+      RenderBlock {DIV} at (0,369) size 135x369
+        RenderBlock {DIV} at (0,0) size 135x82
+          RenderText {#text} at (0,0) size 130x82
+            text run at (0,0) width 130: "reciproc"
+            text run at (0,41) width 38: "ity"
+        RenderBlock {DIV} at (0,82) size 135x82
+          RenderText {#text} at (0,0) size 130x82
+            text run at (0,0) width 130: "reciproc"
+            text run at (0,41) width 38: "ity"
+        RenderBlock {DIV} at (0,164) size 135x82
+          RenderText {#text} at (0,0) size 130x82
+            text run at (0,0) width 130: "reciproc"
+            text run at (0,41) width 38: "ity"
+        RenderBlock {DIV} at (0,246) size 135x82
+          RenderText {#text} at (0,0) size 130x82
+            text run at (0,0) width 130: "reciproc"
+            text run at (0,41) width 38: "ity"
+        RenderBlock {DIV} at (0,328) size 135x41
+          RenderText {#text} at (0,0) size 156x41
+            text run at (0,0) width 156: "reciprocity"
index e922d244381bf683b9251f350b26b637d3f3c940..5225d6249d29400c1188e12311590d3b8fb4292c 100644 (file)
@@ -1,3 +1,76 @@
+2010-08-04  Dan Bernstein  <mitz@apple.com>
+
+        Allow the language for hyphenation to be specified
+        https://bugs.webkit.org/show_bug.cgi?id=43467
+
+        Test: fast/text/hyphenate-locale.html
+
+        Added a -webkit-hyphenate-locale property whose value can be either auto or a locale identifier
+        string. The initial value is auto and the property is inherited. When the value is a locale
+        identifier, hyphenation should follow the rules for the specified locale.
+
+        * WebCore.xcodeproj/project.pbxproj: Added AtomicStringKeyedMRUCache.h.
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Handle -webkit-hyphenate-locale.
+        Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString().
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseValue): Parse -webkit-hyphenate-locale.
+        * css/CSSPropertyNames.in: Added -webkit-hyphenate-locale.
+        * css/CSSStyleSelector.cpp:
+        (WebCore::CSSStyleSelector::applyProperty): Apply the -webkit-hyphenate-locale property to the
+        RenderStyle. Updated for the renaming of RenderStyle::hyphenateCharacter() to hyphenationString().
+        * platform/text/AtomicStringKeyedMRUCache.h: Added.
+        (WebCore::AtomicStringKeyedMRUCache::get):
+        * platform/text/Hyphenation.cpp:
+        (WebCore::canHyphenate): Added an implementation that returns false.
+        (WebCore::lastHyphenLocation): Now asserts that it is not called, because it is an error to call
+        this function if canHyphenate() returned false.
+        * platform/text/Hyphenation.h:
+        Added canHyphenate(). Returns true if hyphenation is possible for the given locale identifier.
+        * platform/text/android/HyphenationAndroid.cpp:
+        (WebCore::canHyphenate): Added an implementation that returns true and a FIXME.
+        (WebCore::lastHyphenLocation): Added unused localeIdentifier parameter.
+        * platform/text/cf/HyphenationCF.cpp:
+        (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey): Returns
+        the CFLocaleRef for the current search locale.
+        (WebCore::AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForKey): Returns a
+        CFLocaleRef for the locale identifier.
+        (WebCore::canHyphenate): Added. Returns true.
+        (WebCore::lastHyphenLocation): Added localeIdentifier parameter, used to pass a CFLocaleRef to
+        the hyphenation function.
+        * platform/text/mac/HyphenationMac.mm:
+        (WebCore::AtomicStringKeyedMRUCache<bool>::createValueForNullKey): Returns whether the current
+        search locale is english.
+        (WebCore::AtomicStringKeyedMRUCache<bool>::createValueForKey): Returns whether the locale identifier
+        string identifies locale with the English language.
+        (WebCore::canHyphenate): Added. Returns true if the locale language is English.
+        (WebCore::lastHyphenLocation): Added localeIdentifier parameter and an assertion that its language
+        is English.
+        * rendering/RenderBlockLineLayout.cpp:
+        (WebCore::tryHyphenating): Added a locale identifier parameter, which is passed down to
+        lastHyphenLocation(). Added 1 to the value passed for the beforeIndex parameter to lastHyphenLocation(),
+        because the latter only returns values smaller than that index. The Mac implementation could
+        return a value equal to beforeIndex, but that is fixed in the WebKitSystemInterface part of this patch.
+        (WebCore::RenderBlock::findNextLineBreak): Only set canHyphenate to true if hyphenation is possible
+        for the specified hyphenation locale. Pass the hyphenation locale to tryHyphenating().
+        * rendering/style/RenderStyle.cpp:
+        (WebCore::RenderStyle::diff): Compare hyphenation locales.
+        (WebCore::RenderStyle::hyphenString): Updated for the renaming of hyphenateCharacter() to
+        hyphenationString().
+        * rendering/style/RenderStyle.h:
+        (WebCore::InheritedFlags::hyphenationString): Renamed hyphenateCharacter() to this.
+        (WebCore::InheritedFlags::hyphenationLocale): Added this accessor.
+        (WebCore::InheritedFlags::setHyphenationString): Renamed setHyphenateCharacter() to this.
+        (WebCore::InheritedFlags::setHyphenationLocale): Added this accessor.
+        (WebCore::InheritedFlags::initialHyphenationString): Renamed initialHyphenateCharacter() to this.
+        (WebCore::InheritedFlags::initialHyphenateLocale): Added. Returns the null atom, which represents a
+        value of auto.
+        * rendering/style/StyleRareInheritedData.cpp:
+        (WebCore::StyleRareInheritedData::StyleRareInheritedData): Copy the hyphenation locale. Updated for
+        rename.
+        (WebCore::StyleRareInheritedData::operator==): Compare the hyphenation locales. Updated for rename.
+        * rendering/style/StyleRareInheritedData.h:
+
 2010-08-04  Tony Gentilcore  <tonyg@chromium.org>
 
         Reviewed by Eric Seidel.
index 723140c7dd9ec6975b2967e7cb1d8bb7116a3440..3628f76abc10dd443322c561dc6cfd03dd4d3f71 100644 (file)
                37C238211098C84200EF9F72 /* ComplexTextControllerATSUI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */; };
                37C238221098C84200EF9F72 /* ComplexTextControllerCoreText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */; };
                37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C28A6710F659CC008C7813 /* TypesettingFeatures.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */; };
                37F818FD0D657606005E1F05 /* WebCoreURLResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */; settings = {ATTRIBUTES = (Private, ); }; };
                37F818FE0D657606005E1F05 /* WebCoreURLResponse.mm in Sources */ = {isa = PBXBuildFile; fileRef = 37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */; };
                37FD4298118368460093C029 /* TreeDepthLimit.h in Headers */ = {isa = PBXBuildFile; fileRef = 37FD4297118368460093C029 /* TreeDepthLimit.h */; };
                37C2381F1098C84200EF9F72 /* ComplexTextControllerATSUI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerATSUI.cpp; sourceTree = "<group>"; };
                37C238201098C84200EF9F72 /* ComplexTextControllerCoreText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComplexTextControllerCoreText.cpp; sourceTree = "<group>"; };
                37C28A6710F659CC008C7813 /* TypesettingFeatures.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypesettingFeatures.h; sourceTree = "<group>"; };
+               37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AtomicStringKeyedMRUCache.h; sourceTree = "<group>"; };
                37F818FB0D657606005E1F05 /* WebCoreURLResponse.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreURLResponse.h; sourceTree = "<group>"; };
                37F818FC0D657606005E1F05 /* WebCoreURLResponse.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreURLResponse.mm; sourceTree = "<group>"; };
                37FC96DA1104ED71003E1FAD /* TrailingFloatsRootInlineBox.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TrailingFloatsRootInlineBox.h; sourceTree = "<group>"; };
                                B2C3D9EE0D006C1D00EF6F26 /* AtomicString.h */,
                                0FC705200EB1815600B90AD8 /* AtomicStringHash.h */,
                                B2C3D9EF0D006C1D00EF6F26 /* AtomicStringImpl.h */,
+                               37C61F0012095C87007A3C67 /* AtomicStringKeyedMRUCache.h */,
                                B2C3D9F00D006C1D00EF6F26 /* Base64.cpp */,
                                B2C3D9F10D006C1D00EF6F26 /* Base64.h */,
                                B2C3D9F20D006C1D00EF6F26 /* BidiContext.cpp */,
                                E1BE512E0CF6C512002EA959 /* XSLTUnicodeSort.h in Headers */,
                                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */,
                                CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */,
+                               37C61F0112095C87007A3C67 /* AtomicStringKeyedMRUCache.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index d6e6e4673b37f19abb4b481d8bdda575d5f14389..90e490a88268301e942c9cb762af78c20cfcf567 100644 (file)
@@ -910,9 +910,13 @@ PassRefPtr<CSSValue> CSSComputedStyleDeclaration::getPropertyCSSValue(int proper
         case CSSPropertyWebkitHyphens:
             return CSSPrimitiveValue::create(style->hyphens());
         case CSSPropertyWebkitHyphenateCharacter:
-            if (style->hyphenateCharacter().isNull())
+            if (style->hyphenationString().isNull())
                 return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
-            return CSSPrimitiveValue::create(style->hyphenateCharacter(), CSSPrimitiveValue::CSS_STRING);
+            return CSSPrimitiveValue::create(style->hyphenationString(), CSSPrimitiveValue::CSS_STRING);
+        case CSSPropertyWebkitHyphenateLocale:
+            if (style->hyphenationLocale().isNull())
+                return CSSPrimitiveValue::createIdentifier(CSSValueAuto);
+            return CSSPrimitiveValue::create(style->hyphenationLocale(), CSSPrimitiveValue::CSS_STRING);
         case CSSPropertyWebkitBorderFit:
             if (style->borderFit() == BorderFitBorder)
                 return CSSPrimitiveValue::createIdentifier(CSSValueBorder);
index bd5db445d91fbc6a0c3dad25e199f50574012abe..aa6cdd983f6bdd4c20b3679955a0db89563df7b0 100644 (file)
@@ -1576,6 +1576,11 @@ bool CSSParser::parseValue(int propId, bool important)
             validPrimitive = true;
         break;
 
+    case CSSPropertyWebkitHyphenateLocale:
+        if (id == CSSValueAuto || value->unit == CSSPrimitiveValue::CSS_STRING)
+            validPrimitive = true;
+        break;
+
     case CSSPropertyWebkitBorderFit:
         if (id == CSSValueBorder || id == CSSValueLines)
             validPrimitive = true;
index ac858877bd53725ac85aa949f1ffa498c6bac694..d236b45e4d5f6251f457bd7948c5c8d519340854 100644 (file)
@@ -217,6 +217,7 @@ z-index
 -webkit-font-smoothing
 -webkit-highlight
 -webkit-hyphenate-character
+-webkit-hyphenate-locale
 -webkit-hyphens
 -webkit-line-break
 -webkit-line-clamp
index 9d7e50531f12a140af5183d0bb29b24872d7dab1..e62f5eab6790905190611c2987ea3b949a83e57e 100644 (file)
@@ -5215,11 +5215,19 @@ void CSSStyleSelector::applyProperty(int id, CSSValue *value)
         return;
     }
     case CSSPropertyWebkitHyphenateCharacter: {
-        HANDLE_INHERIT_AND_INITIAL(hyphenateCharacter, HyphenateCharacter);
+        HANDLE_INHERIT_AND_INITIAL(hyphenationString, HyphenationString);
         if (primitiveValue->getIdent() == CSSValueAuto)
-            m_style->setHyphenateCharacter(nullAtom);
+            m_style->setHyphenationString(nullAtom);
         else
-            m_style->setHyphenateCharacter(primitiveValue->getStringValue());
+            m_style->setHyphenationString(primitiveValue->getStringValue());
+        return;
+    }
+    case CSSPropertyWebkitHyphenateLocale: {
+        HANDLE_INHERIT_AND_INITIAL(hyphenationLocale, HyphenationLocale);
+        if (primitiveValue->getIdent() == CSSValueAuto)
+            m_style->setHyphenationLocale(nullAtom);
+        else
+            m_style->setHyphenationLocale(primitiveValue->getStringValue());
         return;
     }
     case CSSPropertyWebkitBorderFit: {
diff --git a/WebCore/platform/text/AtomicStringKeyedMRUCache.h b/WebCore/platform/text/AtomicStringKeyedMRUCache.h
new file mode 100644 (file)
index 0000000..a47585a
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef AtomicStringKeyedMRUCache_h
+#define AtomicStringKeyedMRUCache_h
+
+namespace WebCore {
+
+template<typename T, size_t capacity = 4>
+class AtomicStringKeyedMRUCache {
+public:
+    T get(const AtomicString& key)
+    {
+        if (key.isNull()) {
+            DEFINE_STATIC_LOCAL(T, valueForNull, (createValueForNullKey()));
+            return valueForNull;
+        }
+
+        for (size_t i = 0; i < m_cache.size(); ++i) {
+            if (m_cache[i].first == key) {
+                size_t foundIndex = i;
+                if (foundIndex + 1 < m_cache.size()) {
+                    Entry entry = m_cache[foundIndex];
+                    m_cache.remove(foundIndex);
+                    foundIndex = m_cache.size();
+                    m_cache.append(entry);
+                }
+                return m_cache[foundIndex].second;
+            }
+        }
+        if (m_cache.size() == capacity)
+            m_cache.remove(0);
+
+        m_cache.append(std::make_pair(key, createValueForKey(key)));
+        return m_cache.last().second;
+    }
+
+private:
+    T createValueForNullKey();
+    T createValueForKey(const AtomicString&);
+
+    typedef pair<AtomicString, T> Entry;
+    typedef Vector<Entry, capacity> Cache;
+    Cache m_cache;
+};
+
+}
+
+#endif // AtomicStringKeyedMRUCache_h
index 8ef5a251bd26645aad7f13fcbb4767d9ca55c402..89f64386a9ebc887699bbee01f8e99ea1b2eec2d 100644 (file)
 
 namespace WebCore {
 
-size_t lastHyphenLocation(const UChar* /* characters */, size_t /* length */, size_t /* beforeIndex */)
+bool canHyphenate(const AtomicString& /* localeIdentifier */)
 {
-    notImplemented();
+    return false;
+}
+
+size_t lastHyphenLocation(const UChar* /* characters */, size_t /* length */, size_t /* beforeIndex */, const AtomicString& /* localeIdentifier */)
+{
+    ASSERT_NOT_REACHED();
     return 0;
 }
 
index dbcbe69df41b42e75fe2fc2ccdcdce38aab22bee..4ef852b4d1fdb5e0d3e0bd3ff9608c3c437098b5 100644 (file)
 
 namespace WebCore {
 
-size_t lastHyphenLocation(const UChar*, size_t length, size_t beforeIndex);
+class AtomicString;
+
+bool canHyphenate(const AtomicString& localeIdentifier);
+size_t lastHyphenLocation(const UChar*, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier);
 
 } // namespace WebCore
 
index 00ebd46a10dcfe343bcc7313d5c2687b719902e4..e8ba5ef1eb1e89aa0a822c6808aee2bb80362235 100644 (file)
@@ -57,7 +57,13 @@ static HyphenDict* loadHyphenationDictionary()
     return dict;
 }
 
-size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex)
+bool canHyphenate(const AtomicString& /* localeIdentifier */)
+{
+    // FIXME: Check that the locale identifier matches the available dictionary.
+    return true;
+}
+
+size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& /* localeIdentifier */)
 {
     static const size_t minWordLen = 5;
     static const size_t maxWordLen = 100;
index 50ba4c89dbe1697feec8e9d17362bddb4e2dd7e9..b9839796157b89d2c1ae2d77579e9763a5d6abb2 100644 (file)
 
 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
 
+#include "AtomicString.h"
+#include "AtomicStringKeyedMRUCache.h"
 #include "TextBreakIteratorInternalICU.h"
+#include <wtf/ListHashSet.h>
 #include <wtf/RetainPtr.h>
 
 namespace WebCore {
 
-static CFLocaleRef createCurrentSearchLocale()
+template<>
+RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey()
 {
-    RetainPtr<CFStringRef> localeIdentifier(AdoptCF, CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, (const UInt8*)currentSearchLocaleID(), strlen(currentSearchLocaleID()), kCFStringEncodingASCII, false, kCFAllocatorNull));
-    return CFLocaleCreate(kCFAllocatorDefault, localeIdentifier.get());
+    RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, CFStringCreateWithBytesNoCopy(kCFAllocatorDefault, reinterpret_cast<const UInt8*>(currentSearchLocaleID()), strlen(currentSearchLocaleID()), kCFStringEncodingASCII, false, kCFAllocatorNull));
+    RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCreate(kCFAllocatorDefault, cfLocaleIdentifier.get()));
+    return locale;
 }
 
-size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex)
+template<>
+RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForKey(const AtomicString& localeIdentifier)
+{
+    RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, localeIdentifier.createCFString());
+    RetainPtr<CFLocaleRef> locale(AdoptCF, CFLocaleCreate(kCFAllocatorDefault, cfLocaleIdentifier.get()));
+    return locale;
+}
+
+bool canHyphenate(const AtomicString& /* localeIdentifer */)
+{
+    return true;
+}
+
+size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier)
 {
     RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, characters, length, kCFAllocatorNull));
 
-    static CFLocaleRef locale = createCurrentSearchLocale();
+    DEFINE_STATIC_LOCAL(AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >, cfLocaleCache, ());
+    RetainPtr<CFLocaleRef> locale = cfLocaleCache.get(localeIdentifier);
 
-    CFIndex result = CFStringGetHyphenationLocationBeforeIndex(string.get(), beforeIndex, CFRangeMake(0, length), 0, locale, 0);
+    CFIndex result = CFStringGetHyphenationLocationBeforeIndex(string.get(), beforeIndex, CFRangeMake(0, length), 0, locale.get(), 0);
     return result == kCFNotFound ? 0 : result;
 }
 
index e64477fe91da31b93a52551825fce5862c87bf00..075fbe61d931b010a54b32eee758f6d29d1906bd 100644 (file)
 
 #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD)
 
+#import "AtomicString.h"
+#import "AtomicStringKeyedMRUCache.h"
 #import "TextBreakIteratorInternalICU.h"
 #import "WebCoreSystemInterface.h"
 #import <wtf/RetainPtr.h>
 
 namespace WebCore {
 
-size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex)
+template<>
+bool AtomicStringKeyedMRUCache<bool>::createValueForNullKey()
 {
-    static bool localeIsEnglish = !strcmp("en", currentSearchLocaleID());
-    if (!localeIsEnglish)
-        return 0;
+    return !strcmp(currentSearchLocaleID(), "en");
+}
+
+template<>
+bool AtomicStringKeyedMRUCache<bool>::createValueForKey(const AtomicString& localeIdentifier)
+{
+    RetainPtr<CFStringRef> cfLocaleIdentifier(AdoptCF, localeIdentifier.createCFString());
+    RetainPtr<CFDictionaryRef> components(AdoptCF, CFLocaleCreateComponentsFromLocaleIdentifier(kCFAllocatorDefault, cfLocaleIdentifier.get()));
+    CFStringRef language = reinterpret_cast<CFStringRef>(CFDictionaryGetValue(components.get(), kCFLocaleLanguageCode));
+    static CFStringRef englishLanguage = CFSTR("en");
+    return language && CFEqual(language, englishLanguage);
+}
+
+bool canHyphenate(const AtomicString& localeIdentifier)
+{
+    DEFINE_STATIC_LOCAL(AtomicStringKeyedMRUCache<bool>, isEnglishCache, ());
+    return isEnglishCache.get(localeIdentifier);
+}
+
+size_t lastHyphenLocation(const UChar* characters, size_t length, size_t beforeIndex, const AtomicString& localeIdentifier)
+{
+    ASSERT(canHyphenate(localeIdentifier));
 
     RetainPtr<CFStringRef> string(AdoptCF, CFStringCreateWithCharactersNoCopy(kCFAllocatorDefault, characters, length, kCFAllocatorNull));
     return wkGetHyphenationLocationBeforeIndex(string.get(), beforeIndex);
index 2ce3c5412f71abce3fff18962da1954600e6860b..db09c508ce4fac6152ed198cdfd5ad17e454b071 100644 (file)
@@ -1322,7 +1322,7 @@ static inline unsigned textWidth(RenderText* text, unsigned from, unsigned len,
     return font.width(TextRun(text->characters() + from, len, !collapseWhiteSpace, xPos));
 }
 
-static void tryHyphenating(RenderText* text, const Font& font, int lastSpace, int pos, int xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
+static void tryHyphenating(RenderText* text, const Font& font, const AtomicString& localeIdentifier, int lastSpace, int pos, int xPos, int availableWidth, bool isFixedPitch, bool collapseWhiteSpace, int lastSpaceWordSpacing, InlineIterator& lineBreak, int nextBreakable, bool& hyphenated)
 {
     const AtomicString& hyphenString = text->style()->hyphenString();
     int hyphenWidth = font.width(TextRun(hyphenString.characters(), hyphenString.length()));
@@ -1331,7 +1331,7 @@ static void tryHyphenating(RenderText* text, const Font& font, int lastSpace, in
     if (!prefixLength)
         return;
 
-    prefixLength = 1 + lastHyphenLocation(text->characters() + lastSpace + 1, pos - lastSpace - 1, prefixLength - 1);
+    prefixLength = 1 + lastHyphenLocation(text->characters() + lastSpace + 1, pos - lastSpace - 1, prefixLength, localeIdentifier);
     if (prefixLength <= 1)
         return;
 
@@ -1565,7 +1565,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
             RenderStyle* style = t->style(firstLine);
             const Font& f = style->font();
             bool isFixedPitch = f.isFixedPitch();
-            bool canHyphenate = style->hyphens() == HyphensAuto;
+            bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canHyphenate(style->hyphenationLocale());
 
             int lastSpace = pos;
             int wordSpacing = o->style()->wordSpacing();
@@ -1711,7 +1711,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
                         }
                         if (lineWasTooWide || w + tmpW > width) {
                             if (canHyphenate && w + tmpW > width) {
-                                tryHyphenating(t, f, lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);
+                                tryHyphenating(t, f, style->hyphenationLocale(), lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);
                                 if (hyphenated)
                                     goto end;
                             }
@@ -1825,7 +1825,7 @@ InlineIterator RenderBlock::findNextLineBreak(InlineBidiResolver& resolver, bool
             tmpW += inlineWidth(o, !appliedStartWidth, true);
 
             if (canHyphenate && w + tmpW > width) {
-                tryHyphenating(t, f, lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);
+                tryHyphenating(t, f, style->hyphenationLocale(), lastSpace, pos, w + tmpW - additionalTmpW, width, isFixedPitch, collapseWhiteSpace, lastSpaceWordSpacing, lBreak, nextBreakable, hyphenated);
                 if (hyphenated)
                     goto end;
             }
index ce6c98e0a5af0ef25c384d5dcf238a10c99affe3..4cde08b821ef5ed8ef8ffb7385b5730c13758c5c 100644 (file)
@@ -385,7 +385,8 @@ StyleDifference RenderStyle::diff(const RenderStyle* other, unsigned& changedCon
             rareInheritedData->khtmlLineBreak != other->rareInheritedData->khtmlLineBreak ||
             rareInheritedData->textSecurity != other->rareInheritedData->textSecurity ||
             rareInheritedData->hyphens != other->rareInheritedData->hyphens ||
-            rareInheritedData->hyphenateCharacter != other->rareInheritedData->hyphenateCharacter)
+            rareInheritedData->hyphenationString != other->rareInheritedData->hyphenationString ||
+            rareInheritedData->hyphenationLocale != other->rareInheritedData->hyphenationLocale)
             return StyleDifferenceLayout;
 
         if (!rareInheritedData->shadowDataEquivalent(*other->rareInheritedData.get()))
@@ -832,9 +833,9 @@ const AtomicString& RenderStyle::hyphenString() const
 {
     ASSERT(hyphens() == HyphensAuto);
 
-    const AtomicString& hyphenateCharacter = rareInheritedData.get()->hyphenateCharacter;
-    if (!hyphenateCharacter.isNull())
-        return hyphenateCharacter;
+    const AtomicString& hyphenationString = rareInheritedData.get()->hyphenationString;
+    if (!hyphenationString.isNull())
+        return hyphenationString;
 
     // FIXME: This should depend on locale.
     DEFINE_STATIC_LOCAL(AtomicString, hyphenMinusString, (&hyphen, 1));
index 03dbcf1408f12326c328ea04df9c07ad85a7ac0c..9de6eefddf220edccacb0d8fb314476108b404fb 100644 (file)
@@ -648,7 +648,8 @@ public:
     EMatchNearestMailBlockquoteColor matchNearestMailBlockquoteColor() const { return static_cast<EMatchNearestMailBlockquoteColor>(rareNonInheritedData->matchNearestMailBlockquoteColor); }
     const AtomicString& highlight() const { return rareInheritedData->highlight; }
     Hyphens hyphens() const { return static_cast<Hyphens>(rareInheritedData->hyphens); }
-    const AtomicString& hyphenateCharacter() const { return rareInheritedData->hyphenateCharacter; }
+    const AtomicString& hyphenationString() const { return rareInheritedData->hyphenationString; }
+    const AtomicString& hyphenationLocale() const { return rareInheritedData->hyphenationLocale; }
     EBorderFit borderFit() const { return static_cast<EBorderFit>(rareNonInheritedData->m_borderFit); }
     EResize resize() const { return static_cast<EResize>(rareInheritedData->resize); }
     float columnWidth() const { return rareNonInheritedData->m_multiCol->m_width; }
@@ -988,7 +989,8 @@ public:
     void setMatchNearestMailBlockquoteColor(EMatchNearestMailBlockquoteColor c) { SET_VAR(rareNonInheritedData, matchNearestMailBlockquoteColor, c); }
     void setHighlight(const AtomicString& h) { SET_VAR(rareInheritedData, highlight, h); }
     void setHyphens(Hyphens h) { SET_VAR(rareInheritedData, hyphens, h); }
-    void setHyphenateCharacter(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenateCharacter, h); }
+    void setHyphenationString(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationString, h); }
+    void setHyphenationLocale(const AtomicString& h) { SET_VAR(rareInheritedData, hyphenationLocale, h); }
     void setBorderFit(EBorderFit b) { SET_VAR(rareNonInheritedData, m_borderFit, b); }
     void setResize(EResize r) { SET_VAR(rareInheritedData, resize, r); }
     void setColumnWidth(float f) { SET_VAR(rareNonInheritedData.access()->m_multiCol, m_autoWidth, false); SET_VAR(rareNonInheritedData.access()->m_multiCol, m_width, f); }
@@ -1197,7 +1199,8 @@ public:
     static EMatchNearestMailBlockquoteColor initialMatchNearestMailBlockquoteColor() { return BCNORMAL; }
     static const AtomicString& initialHighlight() { return nullAtom; }
     static Hyphens initialHyphens() { return HyphensManual; }
-    static const AtomicString& initialHyphenateCharacter() { return nullAtom; }
+    static const AtomicString& initialHyphenationString() { return nullAtom; }
+    static const AtomicString& initialHyphenationLocale() { return nullAtom; }
     static EBorderFit initialBorderFit() { return BorderFitBorder; }
     static EResize initialResize() { return RESIZE_NONE; }
     static ControlPart initialAppearance() { return NoControlPart; }
index d8f8efb4cf4260e83229b9bb0a1c7aec19e029a2..71e525232aa9e6b1636e90360cb05153358736a5 100644 (file)
@@ -71,7 +71,8 @@ StyleRareInheritedData::StyleRareInheritedData(const StyleRareInheritedData& o)
     , userSelect(o.userSelect)
     , colorSpace(o.colorSpace)
     , hyphens(o.hyphens)
-    , hyphenateCharacter(o.hyphenateCharacter)
+    , hyphenationString(o.hyphenationString)
+    , hyphenationLocale(o.hyphenationLocale)
 {
 }
 
@@ -112,7 +113,8 @@ bool StyleRareInheritedData::operator==(const StyleRareInheritedData& o) const
         && userSelect == o.userSelect
         && colorSpace == o.colorSpace
         && hyphens == o.hyphens
-        && hyphenateCharacter == o.hyphenateCharacter;
+        && hyphenationString == o.hyphenationString
+        && hyphenationLocale == o.hyphenationLocale;
 }
 
 bool StyleRareInheritedData::shadowDataEquivalent(const StyleRareInheritedData& o) const
index 70ef374e8654dff4c223207542e5427204203f78..83f78165db6be349b97bd0c1a5061fa968ee5ebb 100644 (file)
@@ -79,7 +79,8 @@ public:
     unsigned colorSpace : 1; // ColorSpace
     unsigned hyphens : 2; // Hyphens
 
-    AtomicString hyphenateCharacter;
+    AtomicString hyphenationString;
+    AtomicString hyphenationLocale;
 
 private:
     StyleRareInheritedData();
index d8fa57c122dfa985fe137426a894251a5ab5670b..31ad59cb67891d9d3db7f8234c62205797b92404 100644 (file)
@@ -1,3 +1,15 @@
+2010-08-04  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Darin Adler.
+
+        WebKitSystemInterface part of: Allow the language for hyphenation to be specified
+        https://bugs.webkit.org/show_bug.cgi?id=43467
+
+        * WebKitSystemInterface.h:
+        * libWebKitSystemInterfaceLeopard.a:
+        * libWebKitSystemInterfaceSnowLeopard.a:
+        * libWebKitSystemInterfaceTiger.a:
+
 2010-08-03  Beth Dakin  <bdakin@apple.com>
 
         Reviewed by Alice Liu.
index 4f46719f689f3b6bad40fcfd3949927e72f56453..8732d81352938f65753199dcd4080f82ee449861 100644 (file)
@@ -1,6 +1,6 @@
 /*      
     WebKitSystemInterface.h
-    Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
+    Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
 
     Public header file.
 */
@@ -210,8 +210,8 @@ typedef enum {
     WKMediaUIPartPlayButton,
     WKMediaUIPartSeekBackButton,
     WKMediaUIPartSeekForwardButton,
-    WKMediaUIPartSlider,
-    WKMediaUIPartSliderThumb,
+    WKMediaUIPartTimelineSlider,
+    WKMediaUIPartTimelineSliderThumb,
     WKMediaUIPartRewindButton,
     WKMediaUIPartSeekToRealtimeButton,
     WKMediaUIPartShowClosedCaptionsButton,
@@ -220,7 +220,12 @@ typedef enum {
     WKMediaUIPartPauseButton,
     WKMediaUIPartBackground,
     WKMediaUIPartCurrentTimeDisplay,
-    WKMediaUIPartTimeRemainingDisplay
+    WKMediaUIPartTimeRemainingDisplay,
+    WKMediaUIPartStatusDisplay,
+    WKMediaUIPartControlsPanel,
+    WKMediaUIPartVolumeSliderContainer,
+    WKMediaUIPartVolumeSlider,
+    WKMediaUIPartVolumeSliderThumb
 } WKMediaUIPart;
 
 typedef enum {
@@ -251,7 +256,6 @@ typedef enum {
     WKMediaUIControlFastForwardButton,
     WKMediaUIControlVolumeUpButton,
     WKMediaUIControlVolumeDownButton
-
 } WKMediaUIControlType;
     
 NSControl *WKCreateMediaUIControl(int controlType);
index 76c174aa20f0a38e4bd9be2515954e94322c8914..fc5b8a0a36dd4b417334e8b6a1b1085f80284362 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceLeopard.a differ
index 642360104633ed943c2b3800ef6b0c69313cf2d2..dd6e22efc6c8a8c252480a96b11359567d68fc96 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a and b/WebKitLibraries/libWebKitSystemInterfaceSnowLeopard.a differ
index abf266d0b2132560f0abeef20891223906c2c2dc..103eed6852fc7ac44e03f7f309e0f165084ae560 100644 (file)
Binary files a/WebKitLibraries/libWebKitSystemInterfaceTiger.a and b/WebKitLibraries/libWebKitSystemInterfaceTiger.a differ