Title: [104862] branches/safari-534.54-branch
Revision
104862
Author
lforsch...@apple.com
Date
2012-01-12 14:53:16 -0800 (Thu, 12 Jan 2012)

Log Message

Merged r91777.

Modified Paths

Added Paths

Diff

Modified: branches/safari-534.54-branch/LayoutTests/ChangeLog (104861 => 104862)


--- branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/LayoutTests/ChangeLog	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1,5 +1,20 @@
 2011-1-11  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 91777
+
+    2011-07-26  Dan Bernstein  <m...@apple.com>
+
+            <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family
+            https://bugs.webkit.org/show_bug.cgi?id=65197
+
+            Reviewed by Anders Carlsson.
+
+            * fast/css/font-family-pictograph.html: Added.
+            * platform/mac/fast/css/font-family-pictograph-expected.png: Added.
+            * platform/mac/fast/css/font-family-pictograph-expected.txt: Added.
+
+2011-1-11  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 92005
 
     2011-07-29  Dan Bernstein  <m...@apple.com>

Copied: branches/safari-534.54-branch/LayoutTests/fast/css/font-family-pictograph.html (from rev 91777, trunk/LayoutTests/fast/css/font-family-pictograph.html) (0 => 104862)


--- branches/safari-534.54-branch/LayoutTests/fast/css/font-family-pictograph.html	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/fast/css/font-family-pictograph.html	2012-01-12 22:53:16 UTC (rev 104862)
@@ -0,0 +1,3 @@
+<div style="font-size: 72px; font-family: -webkit-pictograph;">
+    &#x2665;
+</div>

Copied: branches/safari-534.54-branch/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.png (from rev 91777, trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.png)


(Binary files differ)

Copied: branches/safari-534.54-branch/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt (from rev 91777, trunk/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt) (0 => 104862)


--- branches/safari-534.54-branch/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt	                        (rev 0)
+++ branches/safari-534.54-branch/LayoutTests/platform/mac/fast/css/font-family-pictograph-expected.txt	2012-01-12 22:53:16 UTC (rev 104862)
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x95
+        RenderText {#text} at (0,0) size 72x95
+          text run at (0,0) width 72: "\x{2665}"

Modified: branches/safari-534.54-branch/Source/WebCore/ChangeLog (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/ChangeLog	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1,5 +1,37 @@
 2011-1-11  Lucas Forschler  <lforsch...@apple.com>
 
+    Merge 91777
+
+    2011-07-26  Dan Bernstein  <m...@apple.com>
+
+            <rdar://problem/9842889> Add a generic pictograph font family Add a generic pictograph font family
+            https://bugs.webkit.org/show_bug.cgi?id=65197
+
+            Reviewed by Anders Carlsson.
+
+            Test: fast/css/font-family-pictograph.html
+
+            * WebCore.exp.in: Export Settings::setPictographFontFamily().
+            * css/CSSComputedStyleDeclaration.cpp:
+            (WebCore::identifierForFamily): Added -webkit-pictograph.
+            * css/CSSFontSelector.cpp:
+            (WebCore::CSSFontSelector::addFontFaceRule): Ditto.
+            (WebCore::fontDataForGenericFamily): Ditto.
+            * css/CSSStyleSelector.cpp:
+            (WebCore::CSSStyleSelector::applyProperty): Ditto.
+            * css/CSSValueKeywords.in:
+            * inspector/front-end/CSSKeywordCompletions.js: Ditto.
+            * inspector/front-end/SourceCSSTokenizer.js: Ditto.
+            (WebInspector.SourceCSSTokenizer):
+            * inspector/front-end/SourceCSSTokenizer.re2js: Ditto.
+            * page/Settings.cpp:
+            (WebCore::Settings::pictographFontFamily): Added this getter.
+            (WebCore::Settings::setPictographFontFamily): Added this setter.
+            * page/Settings.h:
+            * platform/graphics/FontDescription.h: Added PictographFamily to the GenericFamilyType enum.
+
+2011-1-11  Lucas Forschler  <lforsch...@apple.com>
+
     Merge 92005
 
     2011-07-29  Dan Bernstein  <m...@apple.com>

Modified: branches/safari-534.54-branch/Source/WebCore/WebCore.exp.in (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/WebCore.exp.in	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/WebCore.exp.in	2012-01-12 22:53:16 UTC (rev 104862)
@@ -903,6 +903,7 @@
 __ZN7WebCore8Settings23setEditableLinkBehaviorENS_20EditableLinkBehaviorE
 __ZN7WebCore8Settings23setLoadDeferringEnabledEb
 __ZN7WebCore8Settings23setNeedsTigerMailQuirksEb
+__ZN7WebCore8Settings23setPictographFontFamilyERKN3WTF12AtomicStringE
 __ZN7WebCore8Settings23setPluginAllowedRunTimeEj
 __ZN7WebCore8Settings23setUsesEncodingDetectorEb
 __ZN7WebCore8Settings24setApplicationChromeModeEb

Modified: branches/safari-534.54-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/css/CSSComputedStyleDeclaration.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -789,17 +789,20 @@
 
 static int identifierForFamily(const AtomicString& family)
 {
-    DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive")); 
-    DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy")); 
-    DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace")); 
-    DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif")); 
-    DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif")); 
+    DEFINE_STATIC_LOCAL(AtomicString, cursiveFamily, ("-webkit-cursive"));
+    DEFINE_STATIC_LOCAL(AtomicString, fantasyFamily, ("-webkit-fantasy"));
+    DEFINE_STATIC_LOCAL(AtomicString, monospaceFamily, ("-webkit-monospace"));
+    DEFINE_STATIC_LOCAL(AtomicString, pictographFamily, ("-webkit-pictograph"));
+    DEFINE_STATIC_LOCAL(AtomicString, sansSerifFamily, ("-webkit-sans-serif"));
+    DEFINE_STATIC_LOCAL(AtomicString, serifFamily, ("-webkit-serif"));
     if (family == cursiveFamily)
         return CSSValueCursive;
     if (family == fantasyFamily)
         return CSSValueFantasy;
     if (family == monospaceFamily)
         return CSSValueMonospace;
+    if (family == pictographFamily)
+        return CSSValueWebkitPictograph;
     if (family == sansSerifFamily)
         return CSSValueSansSerif;
     if (family == serifFamily)

Modified: branches/safari-534.54-branch/Source/WebCore/css/CSSFontSelector.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/css/CSSFontSelector.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/css/CSSFontSelector.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -309,6 +309,9 @@
                 case CSSValueMonospace:
                     familyName = "-webkit-monospace";
                     break;
+                case CSSValueWebkitPictograph:
+                    familyName = "-webkit-pictograph";
+                    break;
                 default:
                     break;
             }
@@ -398,6 +401,8 @@
         genericFamily = settings->fantasyFontFamily();
     else if (familyName == "-webkit-monospace")
         genericFamily = settings->fixedFontFamily();
+    else if (familyName == "-webkit-pictograph")
+        genericFamily = settings->pictographFontFamily();
     else if (familyName == "-webkit-standard")
         genericFamily = settings->standardFontFamily();
 

Modified: branches/safari-534.54-branch/Source/WebCore/css/CSSStyleSelector.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/css/CSSStyleSelector.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/css/CSSStyleSelector.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -4333,6 +4333,10 @@
                         face = "-webkit-monospace";
                         fontDescription.setGenericFamily(FontDescription::MonospaceFamily);
                         break;
+                    case CSSValueWebkitPictograph:
+                        face = "-webkit-pictograph";
+                        fontDescription.setGenericFamily(FontDescription::PictographFamily);
+                        break;
                 }
             }
 

Modified: branches/safari-534.54-branch/Source/WebCore/css/CSSValueKeywords.in (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/css/CSSValueKeywords.in	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/css/CSSValueKeywords.in	2012-01-12 22:53:16 UTC (rev 104862)
@@ -104,6 +104,7 @@
 fantasy
 monospace
 -webkit-body
+-webkit-pictograph 
 #
 #
 # CSS_PROP_*_COLOR

Modified: branches/safari-534.54-branch/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/inspector/front-end/CSSKeywordCompletions.js	2012-01-12 22:53:16 UTC (rev 104862)
@@ -284,7 +284,7 @@
         "-webkit-control", "status-bar", "italic", "oblique", "small-caps", "normal", "bold", "bolder", "lighter",
         "100", "200", "300", "400", "500", "600", "700", "800", "900", "xx-small", "x-small", "small", "medium",
         "large", "x-large", "xx-large", "-webkit-xxx-large", "smaller", "larger", "serif", "sans-serif", "cursive",
-        "fantasy", "monospace", "-webkit-body"
+        "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
     ],
     "dominant-baseline": [
         "middle", "auto", "central", "text-before-edge", "text-after-edge", "ideographic", "alphabetic", "hanging",
@@ -348,7 +348,7 @@
         "absolute", "fixed", "relative", "static"
     ],
     "font-family": [
-        "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body"
+        "serif", "sans-serif", "cursive", "fantasy", "monospace", "-webkit-body", "-webkit-pictograph"
     ],
     "text-overflow-mode": [
         "clip", "ellipsis"

Modified: branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js	2012-01-12 22:53:16 UTC (rev 104862)
@@ -93,8 +93,8 @@
         "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
         "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
         "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
-        "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right",
-        "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+        "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",
+        "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
     ].keySet();
 
     this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();

Modified: branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js	2012-01-12 22:53:16 UTC (rev 104862)
@@ -92,8 +92,8 @@
         "visibleFill", "visiblePainted", "visibleStroke", "visual", "w-resize", "wait", "wave", "white", "wider", "window", "windowframe", "windowtext",
         "x-large", "x-small", "xor", "xx-large", "xx-small", "yellow", "-wap-marquee", "-webkit-activelink", "-webkit-auto", "-webkit-baseline-middle",
         "-webkit-body", "-webkit-box", "-webkit-center", "-webkit-control", "-webkit-focus-ring-color", "-webkit-grab", "-webkit-grabbing",
-        "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-right",
-        "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
+        "-webkit-gradient", "-webkit-inline-box", "-webkit-left", "-webkit-link", "-webkit-marquee", "-webkit-mini-control", "-webkit-nowrap", "-webkit-pictograph",
+        "-webkit-right", "-webkit-small-control", "-webkit-text", "-webkit-xxx-large", "-webkit-zoom-in", "-webkit-zoom-out",
     ].keySet();
 
     this._mediaTypes = ["all", "aural", "braille", "embossed", "handheld", "import", "print", "projection", "screen", "tty", "tv"].keySet();

Modified: branches/safari-534.54-branch/Source/WebCore/page/Settings.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/page/Settings.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/page/Settings.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -242,6 +242,15 @@
     m_page->setNeedsRecalcStyleInAllFrames();
 }
 
+void Settings::setPictographFontFamily(const AtomicString& pictographFontFamily)
+{
+    if (m_pictographFontFamily == pictographFontFamily)
+        return;
+
+    m_pictographFontFamily = pictographFontFamily;
+    m_page->setNeedsRecalcStyleInAllFrames();
+}
+
 void Settings::setMinimumFontSize(int minimumFontSize)
 {
     if (m_minimumFontSize == minimumFontSize)

Modified: branches/safari-534.54-branch/Source/WebCore/page/Settings.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/page/Settings.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/page/Settings.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -74,6 +74,9 @@
         void setFantasyFontFamily(const AtomicString&);
         const AtomicString& fantasyFontFamily() const { return m_fantasyFontFamily; }
 
+        void setPictographFontFamily(const AtomicString&);
+        const AtomicString& pictographFontFamily() const { return m_pictographFontFamily; }
+
         void setMinimumFontSize(int);
         int minimumFontSize() const { return m_minimumFontSize; }
 
@@ -418,6 +421,7 @@
         AtomicString m_sansSerifFontFamily;
         AtomicString m_cursiveFontFamily;
         AtomicString m_fantasyFontFamily;
+        AtomicString m_pictographFontFamily;
         EditableLinkBehavior m_editableLinkBehavior;
         TextDirectionSubmenuInclusionBehavior m_textDirectionSubmenuInclusionBehavior;
         int m_minimumFontSize;

Modified: branches/safari-534.54-branch/Source/WebCore/platform/graphics/FontDescription.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebCore/platform/graphics/FontDescription.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebCore/platform/graphics/FontDescription.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -64,7 +64,7 @@
 class FontDescription {
 public:
     enum GenericFamilyType { NoFamily, StandardFamily, SerifFamily, SansSerifFamily, 
-                             MonospaceFamily, CursiveFamily, FantasyFamily };
+                             MonospaceFamily, CursiveFamily, FantasyFamily, PictographFamily };
 
     FontDescription()
         : m_specifiedSize(0)

Modified: branches/safari-534.54-branch/Source/WebKit/mac/ChangeLog (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/mac/ChangeLog	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/mac/ChangeLog	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1,3 +1,24 @@
+2011-1-11  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 91777
+
+    2011-07-26  Dan Bernstein  <m...@apple.com>
+
+            <rdar://problem/9842889> Add a generic pictograph font family
+            https://bugs.webkit.org/show_bug.cgi?id=65197
+
+            Reviewed by Anders Carlsson.
+
+            * WebView/WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey.
+            * WebView/WebPreferences.mm:
+            (+[WebPreferences initialize]): Set the default pictograph font family to
+            "Apple Color Emoji".
+            (-[WebPreferences pictographFontFamily]): Added this getter.
+            (-[WebPreferences setPictographFontFamily:]): Added this setter.
+            * WebView/WebPreferencesPrivate.h:
+            * WebView/WebView.mm:
+            (-[WebView _preferencesChanged:]): Pass the preference through to WebCore.
+
 2011-1-5  Lucas Forschler  <lforsch...@apple.com>
 
     Merge 99439

Modified: branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -36,6 +36,7 @@
 #define WebKitSansSerifFontPreferenceKey @"WebKitSansSerifFont"
 #define WebKitCursiveFontPreferenceKey @"WebKitCursiveFont"
 #define WebKitFantasyFontPreferenceKey @"WebKitFantasyFont"
+#define WebKitPictographFontPreferenceKey @"WebKitPictographFont"
 #define WebKitMinimumFontSizePreferenceKey @"WebKitMinimumFontSize"
 #define WebKitMinimumLogicalFontSizePreferenceKey @"WebKitMinimumLogicalFontSize"
 #define WebKitDefaultFontSizePreferenceKey @"WebKitDefaultFontSize"

Modified: branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferences.mm (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferences.mm	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferences.mm	2012-01-12 22:53:16 UTC (rev 104862)
@@ -306,6 +306,7 @@
         @"Helvetica",                   WebKitSansSerifFontPreferenceKey,
         @"Apple Chancery",              WebKitCursiveFontPreferenceKey,
         @"Papyrus",                     WebKitFantasyFontPreferenceKey,
+        @"Apple Color Emoji",           WebKitPictographFontPreferenceKey,
         @"0",                           WebKitMinimumFontSizePreferenceKey,
         @"9",                           WebKitMinimumLogicalFontSizePreferenceKey, 
         @"16",                          WebKitDefaultFontSizePreferenceKey,
@@ -1472,6 +1473,17 @@
 {
     return [self _boolValueForKey:WebKitAVFoundationEnabledKey];
 }
+
+- (NSString *)pictographFontFamily
+{
+    return [self _stringValueForKey: WebKitPictographFontPreferenceKey];
+}
+
+- (void)setPictographFontFamily:(NSString *)family
+{
+    [self _setStringValue: family forKey: WebKitPictographFontPreferenceKey];
+}
+
 @end
 
 @implementation WebPreferences (WebInternal)

Modified: branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -210,6 +210,9 @@
 - (BOOL)hyperlinkAuditingEnabled;
 - (void)setHyperlinkAuditingEnabled:(BOOL)enabled;
 
+- (NSString *)pictographFontFamily;
+- (void)setPictographFontFamily:(NSString *)family;
+
 // Other private methods
 - (void)_postPreferencesChangedNotification;
 - (void)_postPreferencesChangedAPINotification;

Modified: branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebView.mm (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebView.mm	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/mac/WebView/WebView.mm	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1501,6 +1501,7 @@
     settings->setJavaScriptCanOpenWindowsAutomatically([preferences _javascript_CanOpenWindowsAutomatically]);
     settings->setMinimumFontSize([preferences minimumFontSize]);
     settings->setMinimumLogicalFontSize([preferences minimumLogicalFontSize]);
+    settings->setPictographFontFamily([preferences pictographFontFamily]);
     settings->setPluginsEnabled([preferences arePlugInsEnabled]);
 #if ENABLE(DATABASE)
     AbstractDatabase::setIsAvailable([preferences databasesEnabled]);

Modified: branches/safari-534.54-branch/Source/WebKit/win/ChangeLog (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/ChangeLog	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/ChangeLog	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1,3 +1,27 @@
+2011-1-11  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 91777
+
+    2011-07-26  Dan Bernstein  <m...@apple.com>
+
+            <rdar://problem/9842889> Add a generic pictograph font family
+            https://bugs.webkit.org/show_bug.cgi?id=65197
+
+            Reviewed by Anders Carlsson.
+
+            * Interfaces/IWebPreferences.idl: Added pictographFontFamily() and
+            setPictographFontFamily().
+            * WebPreferenceKeysPrivate.h: Added WebKitPictographFontPreferenceKey.
+            * WebPreferences.cpp:
+            (WebPreferences::initializeDefaultSettings): Initialize the pictograph font
+            preference to "Times New Roman".
+            (WebPreferences::pictographFontFamily): Added this getter.
+            (WebPreferences::setPictographFontFamily): Added this setter.
+            * WebPreferences.h:
+            * WebView.cpp:
+            (WebView::notifyPreferencesChanged): Pass the preference value through to
+            WebCore.
+
 2011-1-6  Lucas Forschler  <lforsch...@apple.com>
 
     Merge 104296

Modified: branches/safari-534.54-branch/Source/WebKit/win/Interfaces/IWebPreferences.idl (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/Interfaces/IWebPreferences.idl	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/Interfaces/IWebPreferences.idl	2012-01-12 22:53:16 UTC (rev 104862)
@@ -98,6 +98,9 @@
     HRESULT fantasyFontFamily([out, retval] BSTR* family);
     HRESULT setFantasyFontFamily([in] BSTR family);
 
+    HRESULT pictographFontFamily([out, retval] BSTR* family);
+    HRESULT setPictographFontFamily([in] BSTR family);
+
     HRESULT defaultFontSize([out, retval] int* fontSize);
     HRESULT setDefaultFontSize([in] int fontSize);
 

Modified: branches/safari-534.54-branch/Source/WebKit/win/WebPreferenceKeysPrivate.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/WebPreferenceKeysPrivate.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/WebPreferenceKeysPrivate.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -36,6 +36,7 @@
 #define WebKitSansSerifFontPreferenceKey "WebKitSansSerifFont"
 #define WebKitCursiveFontPreferenceKey "WebKitCursiveFont"
 #define WebKitFantasyFontPreferenceKey "WebKitFantasyFont"
+#define WebKitPictographFontPreferenceKey "WebKitPictographFont"
 #define WebKitMinimumFontSizePreferenceKey "WebKitMinimumFontSize"
 #define WebKitMinimumLogicalFontSizePreferenceKey "WebKitMinimumLogicalFontSize"
 #define WebKitDefaultFontSizePreferenceKey "WebKitDefaultFontSize"

Modified: branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -189,6 +189,7 @@
     CFDictionaryAddValue(defaults, CFSTR(WebKitSansSerifFontPreferenceKey), CFSTR("Arial"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitCursiveFontPreferenceKey), CFSTR("Comic Sans MS"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitFantasyFontPreferenceKey), CFSTR("Comic Sans MS"));
+    CFDictionaryAddValue(defaults, CFSTR(WebKitPictographFontPreferenceKey), CFSTR("Times New Roman"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumFontSizePreferenceKey), CFSTR("0"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitMinimumLogicalFontSizePreferenceKey), CFSTR("9"));
     CFDictionaryAddValue(defaults, CFSTR(WebKitDefaultFontSizePreferenceKey), CFSTR("16"));
@@ -648,6 +649,20 @@
     return S_OK;
 }
 
+HRESULT STDMETHODCALLTYPE WebPreferences::pictographFontFamily( 
+    /* [retval][out] */ BSTR* family)
+{
+    *family = stringValueForKey(CFSTR(WebKitPictographFontPreferenceKey));
+    return (*family) ? S_OK : E_FAIL;
+}
+
+HRESULT STDMETHODCALLTYPE WebPreferences::setPictographFontFamily( 
+    /* [in] */ BSTR family)
+{
+    setStringValue(CFSTR(WebKitPictographFontPreferenceKey), family);
+    return S_OK;
+}
+
 HRESULT STDMETHODCALLTYPE WebPreferences::defaultFontSize( 
     /* [retval][out] */ int* fontSize)
 {

Modified: branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/WebPreferences.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -91,6 +91,12 @@
     virtual HRESULT STDMETHODCALLTYPE setFantasyFontFamily( 
         /* [in] */ BSTR family);
     
+    virtual HRESULT STDMETHODCALLTYPE pictographFontFamily( 
+        /* [retval][out] */ BSTR* family);
+    
+    virtual HRESULT STDMETHODCALLTYPE setPictographFontFamily( 
+        /* [in] */ BSTR family);
+    
     virtual HRESULT STDMETHODCALLTYPE defaultFontSize( 
         /* [retval][out] */ int* fontSize);
     

Modified: branches/safari-534.54-branch/Source/WebKit/win/WebView.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit/win/WebView.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit/win/WebView.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -4577,6 +4577,12 @@
     settings->setFixedFontFamily(AtomicString(str, SysStringLen(str)));
     SysFreeString(str);
 
+    hr = preferences->pictographFontFamily(&str);
+    if (FAILED(hr))
+        return hr;
+    settings->setPictographFontFamily(AtomicString(str, SysStringLen(str)));
+    SysFreeString(str);
+
     hr = preferences->isJavaEnabled(&enabled);
     if (FAILED(hr))
         return hr;

Modified: branches/safari-534.54-branch/Source/WebKit2/ChangeLog (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit2/ChangeLog	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit2/ChangeLog	2012-01-12 22:53:16 UTC (rev 104862)
@@ -1,3 +1,20 @@
+2011-1-11  Lucas Forschler  <lforsch...@apple.com>
+
+    Merge 91777
+
+    2011-07-26  Dan Bernstein  <m...@apple.com>
+
+            <rdar://problem/9842889> Add a generic pictograph font family
+            https://bugs.webkit.org/show_bug.cgi?id=65197
+
+            Reviewed by Anders Carlsson.
+
+            * Shared/WebPreferencesStore.h:
+            * UIProcess/API/C/WKPreferences.cpp:
+            (WKPreferencesSetPictographFontFamily): Added.
+            (WKPreferencesCopyPictographFontFamily): Added.
+            * UIProcess/API/C/WKPreferences.h:
+
 2011-1-9  Lucas Forschler  <lforsch...@apple.com>
 
     Merge 102377

Modified: branches/safari-534.54-branch/Source/WebKit2/Shared/WebPreferencesStore.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit2/Shared/WebPreferencesStore.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit2/Shared/WebPreferencesStore.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -113,6 +113,7 @@
     macro(FixedFontFamily, fixedFontFamily, String, String, "Courier New") \
     macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Arial") \
     macro(SerifFontFamily, serifFontFamily, String, String, "Times New Roman") \
+    macro(PictographFontFamily, pictographFontFamily, String, String, "Times New Roman") \
     \
 
 #elif PLATFORM(MAC)
@@ -124,6 +125,7 @@
     macro(FixedFontFamily, fixedFontFamily, String, String, "Courier") \
     macro(SansSerifFontFamily, sansSerifFontFamily, String, String, "Helvetica") \
     macro(SerifFontFamily, serifFontFamily, String, String, "Times") \
+    macro(PictographFontFamily, pictographFontFamily, String, String, "Apple Color Emoji") \
     \
 
 #elif PLATFORM(QT) || PLATFORM(GTK)

Modified: branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp	2012-01-12 22:53:16 UTC (rev 104862)
@@ -232,6 +232,16 @@
     return toCopiedAPI(toImpl(preferencesRef)->fantasyFontFamily());
 }
 
+void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family)
+{
+    toImpl(preferencesRef)->setPictographFontFamily(toWTFString(family));
+}
+
+WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef)
+{
+    return toCopiedAPI(toImpl(preferencesRef)->pictographFontFamily());
+}
+
 void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t size)
 {
     toImpl(preferencesRef)->setDefaultFontSize(size);

Modified: branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.h (104861 => 104862)


--- branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.h	2012-01-12 22:39:25 UTC (rev 104861)
+++ branches/safari-534.54-branch/Source/WebKit2/UIProcess/API/C/WKPreferences.h	2012-01-12 22:53:16 UTC (rev 104862)
@@ -107,6 +107,9 @@
 WK_EXPORT void WKPreferencesSetFantasyFontFamily(WKPreferencesRef preferencesRef, WKStringRef family);
 WK_EXPORT WKStringRef WKPreferencesCopyFantasyFontFamily(WKPreferencesRef preferencesRef);
 
+WK_EXPORT void WKPreferencesSetPictographFontFamily(WKPreferencesRef preferencesRef, WKStringRef family);
+WK_EXPORT WKStringRef WKPreferencesCopyPictographFontFamily(WKPreferencesRef preferencesRef);
+
 // Defaults to 16.
 WK_EXPORT void WKPreferencesSetDefaultFontSize(WKPreferencesRef preferencesRef, uint32_t);
 WK_EXPORT uint32_t WKPreferencesGetDefaultFontSize(WKPreferencesRef preferencesRef);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to