[Chromium] Add runtime flag for font load events
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 06:35:55 +0000 (06:35 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Mar 2013 06:35:55 +0000 (06:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=111296

Patch by Kunihiko Sakamoto <ksakamoto@chromium.org> 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):

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

Source/WebCore/ChangeLog
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.cpp
Source/WebCore/bindings/generic/RuntimeEnabledFeatures.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/chromium/public/WebRuntimeFeatures.h
Source/WebKit/chromium/src/WebRuntimeFeatures.cpp

index 5fc126b..dede0e3 100644 (file)
@@ -1,3 +1,20 @@
+2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
+
+        [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  <bajones@google.com>
 
         WEBGL_compressed_texture_atc implementation
index f41143e..695c7b5 100644 (file)
@@ -242,4 +242,8 @@ bool RuntimeEnabledFeatures::areExperimentalContentSecurityPolicyFeaturesEnabled
 bool RuntimeEnabledFeatures::areSeamlessIFramesEnabled = false;
 #endif
 
+#if ENABLE(FONT_LOAD_EVENTS)
+bool RuntimeEnabledFeatures::isFontLoadEventsEnabled = false;
+#endif
+
 } // namespace WebCore
index 2537e8c..8a0c009 100644 (file)
@@ -87,6 +87,14 @@ public:
     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 @@ private:
     static bool areSeamlessIFramesEnabled;
 #endif
 
+#if ENABLE(FONT_LOAD_EVENTS)
+    static bool isFontLoadEventsEnabled;
+#endif
+
 };
 
 } // namespace WebCore
index 8894e70..460a819 100644 (file)
@@ -1,3 +1,21 @@
+2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
+
+        [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  <webkit.review.bot@gmail.com>
 
         Unreviewed.  Rolled Chromium DEPS to r185990.  Requested by
index c03dc5e..d1914bd 100644 (file)
@@ -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',
index a055f08..252b5c4 100644 (file)
@@ -164,6 +164,9 @@ public:
     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();
 
index 51bfdfa..c190d16 100644 (file)
@@ -710,6 +710,16 @@ bool WebRuntimeFeatures::isCSSRegionsEnabled()
     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)