Title: [154995] trunk
Revision
154995
Author
[email protected]
Date
2013-09-03 12:00:52 -0700 (Tue, 03 Sep 2013)

Log Message

        [Mac] Hyphenation respects regional format settings language instead of primary language
        https://bugs.webkit.org/show_bug.cgi?id=120641

        Reviewed by Dan Bernstein.

        Fixes hyphenation tests on my machine with non-English regional format settings.

        * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
        Use primary UI language for hyphenation, not regional settings language.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (154994 => 154995)


--- trunk/LayoutTests/ChangeLog	2013-09-03 19:00:11 UTC (rev 154994)
+++ trunk/LayoutTests/ChangeLog	2013-09-03 19:00:52 UTC (rev 154995)
@@ -1,3 +1,13 @@
+2013-09-03  Alexey Proskuryakov  <[email protected]>
+
+        [Mac] Hyphenation respects regional format settings language instead of primary language
+        https://bugs.webkit.org/show_bug.cgi?id=120641
+
+        Reviewed by Dan Bernstein.
+
+        * platform/mac/fast/text/hyphenate-locale-expected.png: Added, this test only had
+        expected pixel results in mac-lion dorectory.
+
 2013-09-03  Daniel Bates  <[email protected]>
 
         Require layout when -webkit-overflow-scrolling changes

Added: trunk/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/platform/mac/fast/text/hyphenate-locale-expected.png ___________________________________________________________________

Added: svn:mime-type

Modified: trunk/Source/WebCore/ChangeLog (154994 => 154995)


--- trunk/Source/WebCore/ChangeLog	2013-09-03 19:00:11 UTC (rev 154994)
+++ trunk/Source/WebCore/ChangeLog	2013-09-03 19:00:52 UTC (rev 154995)
@@ -1,3 +1,15 @@
+2013-09-03  Alexey Proskuryakov  <[email protected]>
+
+        [Mac] Hyphenation respects regional format settings language instead of primary language
+        https://bugs.webkit.org/show_bug.cgi?id=120641
+
+        Reviewed by Dan Bernstein.
+
+        Fixes hyphenation tests on my machine with non-English regional format settings.
+
+        * platform/text/cf/HyphenationCF.cpp: (createValueForNullKey):
+        Use primary UI language for hyphenation, not regional settings language.
+
 2013-09-03  Danilo Cesar Lemes de Paula  <[email protected]>
 
         [GTK][EFL] include missing localized strings for subtitle auto track

Modified: trunk/Source/WebCore/platform/text/cf/HyphenationCF.cpp (154994 => 154995)


--- trunk/Source/WebCore/platform/text/cf/HyphenationCF.cpp	2013-09-03 19:00:11 UTC (rev 154994)
+++ trunk/Source/WebCore/platform/text/cf/HyphenationCF.cpp	2013-09-03 19:00:52 UTC (rev 154995)
@@ -27,6 +27,7 @@
 #include "Hyphenation.h"
 
 #include "AtomicStringKeyedMRUCache.h"
+#include "Language.h"
 #include "TextBreakIteratorInternalICU.h"
 #include <wtf/ListHashSet.h>
 #include <wtf/RetainPtr.h>
@@ -36,7 +37,9 @@
 template<>
 RetainPtr<CFLocaleRef> AtomicStringKeyedMRUCache<RetainPtr<CFLocaleRef> >::createValueForNullKey()
 {
-    RetainPtr<CFLocaleRef> locale = adoptCF(CFLocaleCopyCurrent());
+    // CF hyphenation functions use locale (regional formats) language, which doesn't necessarily match primary UI language,
+    // so we can't use default locale here. See <rdar://problem/14897664>.
+    RetainPtr<CFLocaleRef> locale = adoptCF(CFLocaleCreate(0, defaultLanguage().createCFString().get()));
 
     return CFStringIsHyphenationAvailableForLocale(locale.get()) ? locale : 0;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to