[Extra zoom mode] Disable downloadable binary fonts by default
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Feb 2018 22:36:37 +0000 (22:36 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 25 Feb 2018 22:36:37 +0000 (22:36 +0000)
https://bugs.webkit.org/show_bug.cgi?id=183102
<rdar://problem/37860699>

Reviewed by Tim Horton.

Disable downloadable binary fonts by default in extra zoom mode by making the initial value of
`downloadableBinaryFontsEnabled` conditional. Layout tests are not possible at this time; test to be added once
layout test support is in place.

* page/Settings.yaml:
* page/SettingsBase.cpp:
(WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
* page/SettingsBase.h:

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

Source/WebCore/ChangeLog
Source/WebCore/page/Settings.yaml
Source/WebCore/page/SettingsBase.cpp
Source/WebCore/page/SettingsBase.h

index 92b274f..cc66964 100644 (file)
@@ -1,3 +1,20 @@
+2018-02-25  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        [Extra zoom mode] Disable downloadable binary fonts by default
+        https://bugs.webkit.org/show_bug.cgi?id=183102
+        <rdar://problem/37860699>
+
+        Reviewed by Tim Horton.
+
+        Disable downloadable binary fonts by default in extra zoom mode by making the initial value of
+        `downloadableBinaryFontsEnabled` conditional. Layout tests are not possible at this time; test to be added once
+        layout test support is in place.
+
+        * page/Settings.yaml:
+        * page/SettingsBase.cpp:
+        (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
+        * page/SettingsBase.h:
+
 2018-02-25  Chris Dumez  <cdumez@apple.com>
 
         Service workers do not work well inside Web.app
index 806520f..00d9dab 100644 (file)
@@ -204,7 +204,7 @@ javaScriptRuntimeFlags:
 # FIXME: This should really be disabled by default as it makes platforms that don't support the feature download files
 # they can't use by. Leaving enabled for now to not change existing behavior.
 downloadableBinaryFontsEnabled:
-  initial: true
+  initial: defaultDownloadableBinaryFontsEnabled()
 
 xssAuditorEnabled:
   initial: false
index 4184cc2..fd2e125 100644 (file)
@@ -120,6 +120,15 @@ float SettingsBase::defaultMaxTextAutosizingScaleIncrease()
 #endif
 }
 
+bool SettingsBase::defaultDownloadableBinaryFontsEnabled()
+{
+#if ENABLE(EXTRA_ZOOM_MODE)
+    return false;
+#else
+    return true;
+#endif
+}
+
 #if !PLATFORM(COCOA)
 const String& SettingsBase::defaultMediaContentTypesRequiringHardwareSupport()
 {
index 426eb36..db7e7fc 100644 (file)
@@ -117,6 +117,7 @@ public:
     WEBCORE_EXPORT static float defaultOneLineTextMultiplierCoefficient();
     WEBCORE_EXPORT static float defaultMultiLineTextMultiplierCoefficient();
     WEBCORE_EXPORT static float defaultMaxTextAutosizingScaleIncrease();
+    WEBCORE_EXPORT static bool defaultDownloadableBinaryFontsEnabled();
 
     static const unsigned defaultMaximumHTMLParserDOMTreeDepth = 512;
     static const unsigned defaultMaximumRenderTreeDepth = 512;