Title: [206665] trunk/Source
Revision
206665
Author
[email protected]
Date
2016-09-30 14:16:07 -0700 (Fri, 30 Sep 2016)

Log Message

Create runtime flag for variation font work
https://bugs.webkit.org/show_bug.cgi?id=162780

Reviewed by Alex Christensen.

Source/WebCore:

No new tests because there is no behavior change.

Variation font work should be behind a runtime flag.

* page/Settings.in:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::variationFontsEnabled):
(WebCore::InternalSettings::setVariationFontsEnabled):
* testing/InternalSettings.h:
* testing/InternalSettings.idl:

Source/WebKit2:

* Shared/WebPreferencesDefinitions.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (206664 => 206665)


--- trunk/Source/WebCore/ChangeLog	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebCore/ChangeLog	2016-09-30 21:16:07 UTC (rev 206665)
@@ -1,5 +1,25 @@
 2016-09-30  Myles C. Maxfield  <[email protected]>
 
+        Create runtime flag for variation font work
+        https://bugs.webkit.org/show_bug.cgi?id=162780
+
+        Reviewed by Alex Christensen.
+
+        No new tests because there is no behavior change.
+
+        Variation font work should be behind a runtime flag.
+
+        * page/Settings.in:
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::Backup::Backup):
+        (WebCore::InternalSettings::Backup::restoreTo):
+        (WebCore::InternalSettings::variationFontsEnabled):
+        (WebCore::InternalSettings::setVariationFontsEnabled):
+        * testing/InternalSettings.h:
+        * testing/InternalSettings.idl:
+
+2016-09-30  Myles C. Maxfield  <[email protected]>
+
         Templatize internal FontFeatureSettings class for variation font support
         https://bugs.webkit.org/show_bug.cgi?id=162774
 

Modified: trunk/Source/WebCore/page/Settings.in (206664 => 206665)


--- trunk/Source/WebCore/page/Settings.in	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebCore/page/Settings.in	2016-09-30 21:16:07 UTC (rev 206665)
@@ -273,6 +273,8 @@
 
 treatIPAddressAsDomain initial=false
 
+variationFontsEnabled initial=false, setNeedsStyleRecalcInAllFrames=1
+
 # Runtime-enabled features
 visualViewportEnabled initial=false
 

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (206664 => 206665)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2016-09-30 21:16:07 UTC (rev 206665)
@@ -108,6 +108,7 @@
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     , m_indexedDBWorkersEnabled(RuntimeEnabledFeatures::sharedFeatures().indexedDBWorkersEnabled())
 #endif
+    , m_variationFontsEnabled(settings.variationFontsEnabled())
     , m_userInterfaceDirectionPolicy(settings.userInterfaceDirectionPolicy())
     , m_systemLayoutDirection(settings.systemLayoutDirection())
     , m_pdfImageCachingPolicy(settings.pdfImageCachingPolicy())
@@ -183,6 +184,7 @@
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
     RuntimeEnabledFeatures::sharedFeatures().setIndexedDBWorkersEnabled(m_indexedDBWorkersEnabled);
 #endif
+    settings.setVariationFontsEnabled(m_variationFontsEnabled);
     settings.setUserInterfaceDirectionPolicy(m_userInterfaceDirectionPolicy);
     settings.setSystemLayoutDirection(m_systemLayoutDirection);
     settings.setPdfImageCachingPolicy(m_pdfImageCachingPolicy);
@@ -649,6 +651,18 @@
     Settings::setAllowsAnySSLCertificate(allowsAnyCertificate);
 }
 
+bool InternalSettings::variationFontsEnabled(ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettingsReturn(false);
+    return settings()->variationFontsEnabled();
+}
+
+void InternalSettings::setVariationFontsEnabled(bool enabled, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    settings()->setVariationFontsEnabled(enabled);
+}
+
 // If you add to this list, make sure that you update the Backup class for test reproducability!
 
 }

Modified: trunk/Source/WebCore/testing/InternalSettings.h (206664 => 206665)


--- trunk/Source/WebCore/testing/InternalSettings.h	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2016-09-30 21:16:07 UTC (rev 206665)
@@ -107,6 +107,8 @@
 #if ENABLE(INDEXED_DATABASE_IN_WORKERS)
         bool m_indexedDBWorkersEnabled;
 #endif
+        bool m_variationFontsEnabled;
+
         UserInterfaceDirectionPolicy m_userInterfaceDirectionPolicy;
         TextDirection m_systemLayoutDirection;
         PDFImageCachingPolicy m_pdfImageCachingPolicy;
@@ -166,6 +168,8 @@
     void setUserInterfaceDirectionPolicy(const String& policy, ExceptionCode&);
     String systemLayoutDirection(ExceptionCode&);
     void setSystemLayoutDirection(const String& direction, ExceptionCode&);
+    bool variationFontsEnabled(ExceptionCode&);
+    void setVariationFontsEnabled(bool, ExceptionCode&);
 
     static void setAllowsAnySSLCertificate(bool);
 

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (206664 => 206665)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2016-09-30 21:16:07 UTC (rev 206665)
@@ -85,5 +85,8 @@
     [RaisesException] void setUserInterfaceDirectionPolicy(DOMString policy);
     [RaisesException] DOMString systemLayoutDirection();
     [RaisesException] void setSystemLayoutDirection(DOMString direction);
+
+    [RaisesException] boolean variationFontsEnabled();
+    [RaisesException] void setVariationFontsEnabled(boolean enabled);
 };
 

Modified: trunk/Source/WebKit2/ChangeLog (206664 => 206665)


--- trunk/Source/WebKit2/ChangeLog	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebKit2/ChangeLog	2016-09-30 21:16:07 UTC (rev 206665)
@@ -1,3 +1,14 @@
+2016-09-30  Myles C. Maxfield  <[email protected]>
+
+        Create runtime flag for variation font work
+        https://bugs.webkit.org/show_bug.cgi?id=162780
+
+        Reviewed by Alex Christensen.
+
+        * Shared/WebPreferencesDefinitions.h:
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::updatePreferences):
+
 2016-09-30  Chris Dumez  <[email protected]>
 
         [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint

Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (206664 => 206665)


--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h	2016-09-30 21:16:07 UTC (rev 206665)
@@ -287,12 +287,13 @@
 
 #define FOR_EACH_WEBKIT_EXPERIMENTAL_FEATURE_PREFERENCE(macro) \
     macro(CSSGridLayoutEnabled, cssGridLayoutEnabled, Bool, bool, true, "CSS Grid", "CSS Grid Layout Module support") \
+    macro(SpringTimingFunctionEnabled, springTimingFunctionEnabled, Bool, bool, true, "CSS Spring Animations", "CSS Spring Animation prototype") \
     macro(CustomElementsEnabled, customElementsEnabled, Bool, bool, true, "Custom Elements", "HTML Custom Elements prototype") \
     macro(GamepadsEnabled, gamepadsEnabled, Bool, bool, false, "Gamepads", "Web Gamepad API support") \
     macro(ModernMediaControlsEnabled, modernMediaControlsEnabled, Bool, bool, false, "Modern Media Controls", "Use modern media controls look") \
-    macro(SpringTimingFunctionEnabled, springTimingFunctionEnabled, Bool, bool, true, "CSS Spring Animations", "CSS Spring Animation prototype") \
+    macro(VariationFontsEnabled, variationFontsEnabled, Bool, bool, false, "Variation Fonts", "Enable variation fonts") \
+    macro(VisualViewportEnabled, visualViewportEnabled, Bool, bool, false, "Visual Viewport", "Use Visual Viewport for fixed elements when zooming") \
     macro(WebGL2Enabled, webGL2Enabled, Bool, bool, true, "WebGL 2.0", "WebGL 2 prototype") \
-    macro(VisualViewportEnabled, visualViewportEnabled, Bool, bool, false, "Visual Viewport", "Use Visual Viewport for fixed elements when zooming") \
     \
 
 #if PLATFORM(COCOA)

Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (206664 => 206665)


--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-09-30 21:11:21 UTC (rev 206664)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp	2016-09-30 21:16:07 UTC (rev 206665)
@@ -3224,6 +3224,8 @@
 
     settings.setVisualViewportEnabled(store.getBoolValueForKey(WebPreferencesKey::visualViewportEnabledKey()));
 
+    settings.setVariationFontsEnabled(store.getBoolValueForKey(WebPreferencesKey::variationFontsEnabledKey()));
+
     RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(store.getBoolValueForKey(WebPreferencesKey::modernMediaControlsEnabledKey()));
 
     bool processSuppressionEnabled = store.getBoolValueForKey(WebPreferencesKey::pageVisibilityBasedProcessSuppressionEnabledKey());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to