Title: [144725] trunk/Source
Revision
144725
Author
[email protected]
Date
2013-03-04 22:35:55 -0800 (Mon, 04 Mar 2013)

Log Message

[Chromium] Add runtime flag for font load events
https://bugs.webkit.org/show_bug.cgi?id=111296

Patch by Kunihiko Sakamoto <[email protected]> on 2013-03-04
Reviewed by Kent Tamura.

Add a runtime feature flag for FontLoader interface (disabled by default),
and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.

Source/WebCore:

* bindings/generic/RuntimeEnabledFeatures.cpp:
(WebCore):
* bindings/generic/RuntimeEnabledFeatures.h:
(RuntimeEnabledFeatures):
(WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
(WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):

Source/WebKit/chromium:

* features.gypi:
* public/WebRuntimeFeatures.h:
(WebRuntimeFeatures):
* src/WebRuntimeFeatures.cpp:
(WebKit::WebRuntimeFeatures::enableFontLoadEvents):
(WebKit):
(WebKit::WebRuntimeFeatures::isFontLoadEventsEnabled):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (144724 => 144725)


--- trunk/Source/WebCore/ChangeLog	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebCore/ChangeLog	2013-03-05 06:35:55 UTC (rev 144725)
@@ -1,3 +1,20 @@
+2013-03-04  Kunihiko Sakamoto  <[email protected]>
+
+        [Chromium] Add runtime flag for font load events
+        https://bugs.webkit.org/show_bug.cgi?id=111296
+
+        Reviewed by Kent Tamura.
+
+        Add a runtime feature flag for FontLoader interface (disabled by default),
+        and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.
+
+        * bindings/generic/RuntimeEnabledFeatures.cpp:
+        (WebCore):
+        * bindings/generic/RuntimeEnabledFeatures.h:
+        (RuntimeEnabledFeatures):
+        (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
+        (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
+
 2013-03-04  Brandon Jones  <[email protected]>
 
         WEBGL_compressed_texture_atc implementation

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp (144724 => 144725)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp	2013-03-05 06:35:55 UTC (rev 144725)
@@ -242,4 +242,8 @@
 bool RuntimeEnabledFeatures::areSeamlessIFramesEnabled = false;
 #endif
 
+#if ENABLE(FONT_LOAD_EVENTS)
+bool RuntimeEnabledFeatures::isFontLoadEventsEnabled = false;
+#endif
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h (144724 => 144725)


--- trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h	2013-03-05 06:35:55 UTC (rev 144725)
@@ -87,6 +87,14 @@
     static bool cssRegionsEnabled() { return false; }
 #endif
 
+#if ENABLE(FONT_LOAD_EVENTS)
+    static void setFontLoadEventsEnabled(bool isEnabled) { isFontLoadEventsEnabled = isEnabled; }
+    static bool fontLoadEventsEnabled() { return isFontLoadEventsEnabled; }
+#else
+    static void setFontLoadEventsEnabled(bool) { }
+    static bool fontLoadEventsEnabled() { return false; }
+#endif
+
 #if ENABLE(FULLSCREEN_API)
     // Mozilla version
     static bool webkitFullScreenAPIEnabled() { return isFullScreenAPIEnabled; }
@@ -396,6 +404,10 @@
     static bool areSeamlessIFramesEnabled;
 #endif
 
+#if ENABLE(FONT_LOAD_EVENTS)
+    static bool isFontLoadEventsEnabled;
+#endif
+
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebKit/chromium/ChangeLog (144724 => 144725)


--- trunk/Source/WebKit/chromium/ChangeLog	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebKit/chromium/ChangeLog	2013-03-05 06:35:55 UTC (rev 144725)
@@ -1,3 +1,21 @@
+2013-03-04  Kunihiko Sakamoto  <[email protected]>
+
+        [Chromium] Add runtime flag for font load events
+        https://bugs.webkit.org/show_bug.cgi?id=111296
+
+        Reviewed by Kent Tamura.
+
+        Add a runtime feature flag for FontLoader interface (disabled by default),
+        and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.
+
+        * features.gypi:
+        * public/WebRuntimeFeatures.h:
+        (WebRuntimeFeatures):
+        * src/WebRuntimeFeatures.cpp:
+        (WebKit::WebRuntimeFeatures::enableFontLoadEvents):
+        (WebKit):
+        (WebKit::WebRuntimeFeatures::isFontLoadEventsEnabled):
+
 2013-03-04  Sheriff Bot  <[email protected]>
 
         Unreviewed.  Rolled Chromium DEPS to r185990.  Requested by

Modified: trunk/Source/WebKit/chromium/features.gypi (144724 => 144725)


--- trunk/Source/WebKit/chromium/features.gypi	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebKit/chromium/features.gypi	2013-03-05 06:35:55 UTC (rev 144725)
@@ -69,7 +69,7 @@
       'ENABLE_ENCRYPTED_MEDIA=1',
       'ENABLE_FILE_SYSTEM=1',
       'ENABLE_FILTERS=1',
-      'ENABLE_FONT_LOAD_EVENTS=0',
+      'ENABLE_FONT_LOAD_EVENTS=1',
       'ENABLE_FULLSCREEN_API=1',
       'ENABLE_GAMEPAD=1',
       'ENABLE_GEOLOCATION=1',

Modified: trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h (144724 => 144725)


--- trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebKit/chromium/public/WebRuntimeFeatures.h	2013-03-05 06:35:55 UTC (rev 144725)
@@ -164,6 +164,9 @@
     WEBKIT_EXPORT static void enableCSSRegions(bool);
     WEBKIT_EXPORT static bool isCSSRegionsEnabled();
 
+    WEBKIT_EXPORT static void enableFontLoadEvents(bool);
+    WEBKIT_EXPORT static bool isFontLoadEventsEnabled();
+
     WEBKIT_EXPORT static void enableExperimentalContentSecurityPolicyFeatures(bool);
     WEBKIT_EXPORT static bool isExperimentalContentSecurityPolicyFeaturesEnabled();
 

Modified: trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp (144724 => 144725)


--- trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2013-03-05 06:31:42 UTC (rev 144724)
+++ trunk/Source/WebKit/chromium/src/WebRuntimeFeatures.cpp	2013-03-05 06:35:55 UTC (rev 144725)
@@ -710,6 +710,16 @@
     return RuntimeEnabledFeatures::cssRegionsEnabled();
 }
 
+void WebRuntimeFeatures::enableFontLoadEvents(bool enable)
+{
+    RuntimeEnabledFeatures::setFontLoadEventsEnabled(enable);
+}
+
+bool WebRuntimeFeatures::isFontLoadEventsEnabled()
+{
+    return RuntimeEnabledFeatures::fontLoadEventsEnabled();
+}
+
 void WebRuntimeFeatures::enableRequestAutocomplete(bool enable)
 {
 #if ENABLE(REQUEST_AUTOCOMPLETE)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to