Title: [153712] branches/safari-537-branch/Source/WebCore

Diff

Modified: branches/safari-537-branch/Source/WebCore/ChangeLog (153711 => 153712)


--- branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 17:33:33 UTC (rev 153711)
+++ branches/safari-537-branch/Source/WebCore/ChangeLog	2013-08-05 17:42:44 UTC (rev 153712)
@@ -1,5 +1,30 @@
 2013-08-05  Lucas Forschler  <lforsch...@apple.com>
 
+        Merge r153696
+
+    2013-08-04  Andreas Kling  <akl...@apple.com>
+
+            [Mac] Disable screen font substitution at WebCore-level in OS X 10.9+
+            <http://webkit.org/b/119474>
+            <rdar://problem/14643349>
+
+            Reviewed by Dan Bernstein.
+
+            Disable screen font substitution by default in Settings so internal WebCore clients
+            such as SVG-as-image will get the right default setting.
+
+            * page/Settings.cpp:
+            (WebCore::Settings::Settings):
+            (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
+            (WebCore::Settings::setScreenFontSubstitutionEnabled):
+            * page/Settings.h:
+            (WebCore::Settings::screenFontSubstitutionEnabled):
+            * page/Settings.in:
+            * page/mac/SettingsMac.mm:
+            (WebCore::Settings::shouldEnableScreenFontSubstitutionByDefault):
+
+2013-08-05  Lucas Forschler  <lforsch...@apple.com>
+
         Merge r153695
 
     2013-08-03  Tim Horton  <timothy_hor...@apple.com>

Modified: branches/safari-537-branch/Source/WebCore/page/Settings.cpp (153711 => 153712)


--- branches/safari-537-branch/Source/WebCore/page/Settings.cpp	2013-08-05 17:33:33 UTC (rev 153711)
+++ branches/safari-537-branch/Source/WebCore/page/Settings.cpp	2013-08-05 17:42:44 UTC (rev 153712)
@@ -136,6 +136,7 @@
 #endif
 #endif
     SETTINGS_INITIALIZER_LIST
+    , m_screenFontSubstitutionEnabled(shouldEnableScreenFontSubstitutionByDefault())
     , m_isJavaEnabled(false)
     , m_isJavaEnabledForLocalFiles(true)
     , m_loadsImagesAutomatically(false)
@@ -198,6 +199,13 @@
     return gHiddenPageDOMTimerAlignmentInterval;
 }
 
+#if !PLATFORM(MAC)
+bool Settings::shouldEnableScreenFontSubstitutionByDefault()
+{
+    return true;
+}
+#endif
+
 #if !PLATFORM(MAC) && !PLATFORM(BLACKBERRY)
 void Settings::initializeDefaultFontFamilies()
 {
@@ -465,6 +473,14 @@
     }
 }
 
+void Settings::setScreenFontSubstitutionEnabled(bool enabled)
+{
+    if (m_screenFontSubstitutionEnabled == enabled)
+        return;
+    m_screenFontSubstitutionEnabled = enabled;
+    m_page->setNeedsRecalcStyleInAllFrames();
+}
+
 void Settings::setFontRenderingMode(FontRenderingMode mode)
 {
     if (fontRenderingMode() == mode)

Modified: branches/safari-537-branch/Source/WebCore/page/Settings.h (153711 => 153712)


--- branches/safari-537-branch/Source/WebCore/page/Settings.h	2013-08-05 17:33:33 UTC (rev 153711)
+++ branches/safari-537-branch/Source/WebCore/page/Settings.h	2013-08-05 17:42:44 UTC (rev 153712)
@@ -115,6 +115,9 @@
 
         SETTINGS_GETTERS_AND_SETTERS
 
+        void setScreenFontSubstitutionEnabled(bool);
+        bool screenFontSubstitutionEnabled() const { return m_screenFontSubstitutionEnabled; }
+
         void setJavaEnabled(bool);
         bool isJavaEnabled() const { return m_isJavaEnabled; }
 
@@ -265,6 +268,7 @@
         explicit Settings(Page*);
 
         void initializeDefaultFontFamilies();
+        static bool shouldEnableScreenFontSubstitutionByDefault();
 
         Page* m_page;
 
@@ -280,6 +284,7 @@
 
         SETTINGS_MEMBER_VARIABLES
 
+        bool m_screenFontSubstitutionEnabled : 1;
         bool m_isJavaEnabled : 1;
         bool m_isJavaEnabledForLocalFiles : 1;
         bool m_loadsImagesAutomatically : 1;

Modified: branches/safari-537-branch/Source/WebCore/page/Settings.in (153711 => 153712)


--- branches/safari-537-branch/Source/WebCore/page/Settings.in	2013-08-05 17:33:33 UTC (rev 153711)
+++ branches/safari-537-branch/Source/WebCore/page/Settings.in	2013-08-05 17:42:44 UTC (rev 153712)
@@ -55,7 +55,6 @@
 shouldPrintBackgrounds initial=false
 usesDashboardBackwardCompatibilityMode initial=false, conditional=DASHBOARD_SUPPORT
 
-screenFontSubstitutionEnabled initial=true, setNeedsStyleRecalcInAllFrames=1
 textAreasAreResizable initial=false, setNeedsStyleRecalcInAllFrames=1
 authorAndUserStylesEnabled initial=true, setNeedsStyleRecalcInAllFrames=1
 acceleratedCompositingEnabled initial=true, setNeedsStyleRecalcInAllFrames=1

Modified: branches/safari-537-branch/Source/WebCore/page/mac/SettingsMac.mm (153711 => 153712)


--- branches/safari-537-branch/Source/WebCore/page/mac/SettingsMac.mm	2013-08-05 17:33:33 UTC (rev 153711)
+++ branches/safari-537-branch/Source/WebCore/page/mac/SettingsMac.mm	2013-08-05 17:42:44 UTC (rev 153712)
@@ -28,6 +28,15 @@
 
 namespace WebCore {
 
+bool Settings::shouldEnableScreenFontSubstitutionByDefault()
+{
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+    return false;
+#else
+    return true;
+#endif
+}
+
 void Settings::initializeDefaultFontFamilies()
 {
 #if !PLATFORM(IOS)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to