Title: [228981] trunk/Source/WebCore
Revision
228981
Author
[email protected]
Date
2018-02-25 14:36:37 -0800 (Sun, 25 Feb 2018)

Log Message

[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:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (228980 => 228981)


--- trunk/Source/WebCore/ChangeLog	2018-02-25 21:48:13 UTC (rev 228980)
+++ trunk/Source/WebCore/ChangeLog	2018-02-25 22:36:37 UTC (rev 228981)
@@ -1,3 +1,20 @@
+2018-02-25  Wenson Hsieh  <[email protected]>
+
+        [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  <[email protected]>
 
         Service workers do not work well inside Web.app

Modified: trunk/Source/WebCore/page/Settings.yaml (228980 => 228981)


--- trunk/Source/WebCore/page/Settings.yaml	2018-02-25 21:48:13 UTC (rev 228980)
+++ trunk/Source/WebCore/page/Settings.yaml	2018-02-25 22:36:37 UTC (rev 228981)
@@ -204,7 +204,7 @@
 # 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

Modified: trunk/Source/WebCore/page/SettingsBase.cpp (228980 => 228981)


--- trunk/Source/WebCore/page/SettingsBase.cpp	2018-02-25 21:48:13 UTC (rev 228980)
+++ trunk/Source/WebCore/page/SettingsBase.cpp	2018-02-25 22:36:37 UTC (rev 228981)
@@ -120,6 +120,15 @@
 #endif
 }
 
+bool SettingsBase::defaultDownloadableBinaryFontsEnabled()
+{
+#if ENABLE(EXTRA_ZOOM_MODE)
+    return false;
+#else
+    return true;
+#endif
+}
+
 #if !PLATFORM(COCOA)
 const String& SettingsBase::defaultMediaContentTypesRequiringHardwareSupport()
 {

Modified: trunk/Source/WebCore/page/SettingsBase.h (228980 => 228981)


--- trunk/Source/WebCore/page/SettingsBase.h	2018-02-25 21:48:13 UTC (rev 228980)
+++ trunk/Source/WebCore/page/SettingsBase.h	2018-02-25 22:36:37 UTC (rev 228981)
@@ -117,6 +117,7 @@
     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;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to