Title: [121229] trunk
Revision
121229
Author
macpher...@chromium.org
Date
2012-06-25 22:23:57 -0700 (Mon, 25 Jun 2012)

Log Message

Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
https://bugs.webkit.org/show_bug.cgi?id=89542

Reviewed by Dimitri Glazkov.

Source/WebCore:

Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
Updated all other css variables tests to enable the runtime flag from JS.

* css/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
(WebCore::CSSParser::cssVariablesEnabled):
(WebCore):
(WebCore::CSSParser::detectDashToken):
(WebCore::CSSParser::lex):
* css/CSSParser.h:
(CSSParser):
* css/CSSParserMode.h:
(CSSParserContext):
* page/Settings.h:
(Settings):
(WebCore::Settings::setCSSVariablesEnabled):
(WebCore::Settings::cssVariablesEnabled):

Source/WebKit/chromium:

* features.gypi:
* public/WebSettings.h:
* src/WebSettingsImpl.cpp:
(WebKit::WebSettingsImpl::setExperimentalCSSVariablesEnabled):
(WebKit):
* src/WebSettingsImpl.h:
(WebSettingsImpl):

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/fast/css/variables/border-width.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/border-width.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/border-width.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
   border-color: green;

Added: trunk/LayoutTests/fast/css/variables/build-supports-variables-expected.txt (0 => 121229)


--- trunk/LayoutTests/fast/css/variables/build-supports-variables-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/css/variables/build-supports-variables-expected.txt	2012-06-26 05:23:57 UTC (rev 121229)
@@ -0,0 +1 @@
+YES

Added: trunk/LayoutTests/fast/css/variables/build-supports-variables.html (0 => 121229)


--- trunk/LayoutTests/fast/css/variables/build-supports-variables.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css/variables/build-supports-variables.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -0,0 +1,9 @@
+<body>NO</body>
+<script>
+if (window.testRunner)
+    testRunner.dumpAsText();
+
+internals.settings.setCSSVariablesEnabled(true);
+if (internals.settings.cssVariablesEnabled())
+    document.body.innerHTML = "YES";
+</script>

Modified: trunk/LayoutTests/fast/css/variables/colors-test.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/colors-test.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/colors-test.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-foreground: green;

Modified: trunk/LayoutTests/fast/css/variables/complex-cycle.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/complex-cycle.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/complex-cycle.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-a: -webkit-var(f);

Modified: trunk/LayoutTests/fast/css/variables/computed-style.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/computed-style.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/computed-style.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-a: bold;

Modified: trunk/LayoutTests/fast/css/variables/inherited-values.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/inherited-values.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/inherited-values.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-foreground: green;

Modified: trunk/LayoutTests/fast/css/variables/inline-styles.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/inline-styles.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/inline-styles.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <body style="-webkit-var-a: green;">
 <div style="color: -webkit-var(a);">
 This text should be green on a white background.

Modified: trunk/LayoutTests/fast/css/variables/invalid-shorthand.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/invalid-shorthand.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/invalid-shorthand.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
     -webkit-var-a: 10px solid green;

Modified: trunk/LayoutTests/fast/css/variables/invalid-variable-value.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/invalid-variable-value.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/invalid-variable-value.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
     -webkit-var-a: green;

Modified: trunk/LayoutTests/fast/css/variables/multi-level-cycle.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/multi-level-cycle.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/multi-level-cycle.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 .a {
     -webkit-var-a: -webkit-var(b);

Modified: trunk/LayoutTests/fast/css/variables/redefinition.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/redefinition.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/redefinition.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-a: red;

Modified: trunk/LayoutTests/fast/css/variables/shorthand.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/shorthand.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/shorthand.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
     -webkit-var-myborder: 10px solid green;

Modified: trunk/LayoutTests/fast/css/variables/simple-cycle.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/simple-cycle.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/simple-cycle.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-a: -webkit-var(a);

Modified: trunk/LayoutTests/fast/css/variables/transform-test.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/transform-test.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/transform-test.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
     display: inline-block;

Modified: trunk/LayoutTests/fast/css/variables/undefined.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/undefined.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/undefined.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     border: -webkit-var(myborder);

Modified: trunk/LayoutTests/fast/css/variables/use-before-defined.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/use-before-defined.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/use-before-defined.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 div {
     color: -webkit-var(a);

Modified: trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/var-inside-shorthand.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-MyBorderColor: green;

Modified: trunk/LayoutTests/fast/css/variables/variable-chain.html (121228 => 121229)


--- trunk/LayoutTests/fast/css/variables/variable-chain.html	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/LayoutTests/fast/css/variables/variable-chain.html	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,6 @@
+<script>
+internals.settings.setCSSVariablesEnabled(true);
+</script>
 <style>
 body {
     -webkit-var-c: green;

Modified: trunk/Source/WebCore/ChangeLog (121228 => 121229)


--- trunk/Source/WebCore/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/ChangeLog	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,29 @@
+2012-06-25  Luke Macpherson  <macpher...@chromium.org>
+
+        Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
+        https://bugs.webkit.org/show_bug.cgi?id=89542
+
+        Reviewed by Dimitri Glazkov.
+
+        Added fast/css/variables/build-supports-variables.html to test runtime flag in test environment.
+        Updated all other css variables tests to enable the runtime flag from JS.
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParserContext::CSSParserContext):
+        (WebCore::operator==):
+        (WebCore::CSSParser::cssVariablesEnabled):
+        (WebCore):
+        (WebCore::CSSParser::detectDashToken):
+        (WebCore::CSSParser::lex):
+        * css/CSSParser.h:
+        (CSSParser):
+        * css/CSSParserMode.h:
+        (CSSParserContext):
+        * page/Settings.h:
+        (Settings):
+        (WebCore::Settings::setCSSVariablesEnabled):
+        (WebCore::Settings::cssVariablesEnabled):
+
 2012-06-25  Simon Hausmann  <simon.hausm...@nokia.com>
 
         Unreviewed build fix after r121223.

Modified: trunk/Source/WebCore/css/CSSParser.cpp (121228 => 121229)


--- trunk/Source/WebCore/css/CSSParser.cpp	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/css/CSSParser.cpp	2012-06-26 05:23:57 UTC (rev 121229)
@@ -194,6 +194,9 @@
     , isCSSCustomFilterEnabled(false)
     , isCSSRegionsEnabled(false)
     , isCSSGridLayoutEnabled(false)
+#if ENABLE(CSS_VARIABLES)
+    , isCSSVariablesEnabled(false)
+#endif
     , needsSiteSpecificQuirks(false)
     , enforcesCSSMIMETypeInNoQuirksMode(true)
 {
@@ -207,6 +210,9 @@
     , isCSSCustomFilterEnabled(document->settings() ? document->settings()->isCSSCustomFilterEnabled() : false)
     , isCSSRegionsEnabled(document->cssRegionsEnabled())
     , isCSSGridLayoutEnabled(document->cssGridLayoutEnabled())
+#if ENABLE(CSS_VARIABLES)
+    , isCSSVariablesEnabled(document->settings() ? document->settings()->cssVariablesEnabled() : false)
+#endif
     , needsSiteSpecificQuirks(document->settings() ? document->settings()->needsSiteSpecificQuirks() : false)
     , enforcesCSSMIMETypeInNoQuirksMode(!document->settings() || document->settings()->enforceCSSMIMETypeInNoQuirksMode())
 {
@@ -221,6 +227,9 @@
         && a.isCSSCustomFilterEnabled == b.isCSSCustomFilterEnabled
         && a.isCSSRegionsEnabled == b.isCSSRegionsEnabled
         && a.isCSSGridLayoutEnabled == b.isCSSGridLayoutEnabled
+#if ENABLE(CSS_VARIABLES)
+        && a.isCSSVariablesEnabled == b.isCSSVariablesEnabled
+#endif
         && a.needsSiteSpecificQuirks == b.needsSiteSpecificQuirks
         && a.enforcesCSSMIMETypeInNoQuirksMode == b.enforcesCSSMIMETypeInNoQuirksMode;
 }
@@ -1082,6 +1091,25 @@
     return static_pointer_cast<CSSValueList>(dummyStyle->getPropertyCSSValue(CSSPropertyFontFamily));
 }
 
+#if ENABLE(CSS_VARIABLES)
+bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID propertyID, const String& string, bool important, Document* document)
+{
+    ASSERT(!string.isEmpty());
+
+    CSSParserContext context(document);
+
+    if (parseSimpleLengthValue(declaration, propertyID, string, important, context.mode))
+        return true;
+    if (parseColorValue(declaration, propertyID, string, important, context.mode))
+        return true;
+    if (parseKeywordValue(declaration, propertyID, string, important, context))
+        return true;
+
+    CSSParser parser(context);
+    return parser.parseValue(declaration, propertyID, string, important, static_cast<StyleSheetContents*>(0));
+}
+#endif
+
 bool CSSParser::parseValue(StylePropertySet* declaration, CSSPropertyID propertyID, const String& string, bool important, CSSParserMode cssParserMode, StyleSheetContents* contextStyleSheet)
 {
     ASSERT(!string.isEmpty());
@@ -2968,6 +2996,11 @@
 }
 
 #if ENABLE(CSS_VARIABLES)
+bool CSSParser::cssVariablesEnabled() const
+{
+    return m_context.isCSSVariablesEnabled;
+}
+
 void CSSParser::storeVariableDeclaration(const CSSParserString& name, PassOwnPtr<CSSParserValueList> value, bool important)
 {
     StringBuilder builder;
@@ -8597,7 +8630,7 @@
         else if (isASCIIAlphaCaselessEqual(name[10], 'x') && isEqualToCSSIdentifier(name + 1, "webkit-ma"))
             m_token = MAXFUNCTION;
 #if ENABLE(CSS_VARIABLES)
-        else if (isASCIIAlphaCaselessEqual(name[10], 'r') && isEqualToCSSIdentifier(name + 1, "webkit-va"))
+        else if (cssVariablesEnabled() && isASCIIAlphaCaselessEqual(name[10], 'r') && isEqualToCSSIdentifier(name + 1, "webkit-va"))
             m_token = VARFUNCTION;
 #endif
     } else if (length == 12 && isEqualToCSSIdentifier(name + 1, "webkit-calc"))
@@ -8939,7 +8972,7 @@
 
     case CharacterDash:
 #if ENABLE(CSS_VARIABLES)
-        if (m_currentCharacter[10] == '-' && isEqualToCSSIdentifier(m_currentCharacter, "webkit-var") && isIdentifierStartAfterDash(m_currentCharacter + 11)) {
+        if (cssVariablesEnabled() && m_currentCharacter[10] == '-' && isEqualToCSSIdentifier(m_currentCharacter, "webkit-var") && isIdentifierStartAfterDash(m_currentCharacter + 11)) {
             // handle variable declarations
             m_currentCharacter += 11;
             parseIdentifier(result, hasEscape);

Modified: trunk/Source/WebCore/css/CSSParser.h (121228 => 121229)


--- trunk/Source/WebCore/css/CSSParser.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/css/CSSParser.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -92,6 +92,8 @@
     bool parseQuotes(CSSPropertyID, bool important);
 
 #if ENABLE(CSS_VARIABLES)
+    static bool parseValue(StylePropertySet*, CSSPropertyID, const String&, bool important, Document*);
+    bool cssVariablesEnabled() const;
     void storeVariableDeclaration(const CSSParserString&, PassOwnPtr<CSSParserValueList>, bool important);
 #endif
 

Modified: trunk/Source/WebCore/css/CSSParserMode.h (121228 => 121229)


--- trunk/Source/WebCore/css/CSSParserMode.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/css/CSSParserMode.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -65,6 +65,9 @@
     bool isCSSCustomFilterEnabled;
     bool isCSSRegionsEnabled;
     bool isCSSGridLayoutEnabled;
+#if ENABLE(CSS_VARIABLES)
+    bool isCSSVariablesEnabled;
+#endif
     bool needsSiteSpecificQuirks;
     bool enforcesCSSMIMETypeInNoQuirksMode;
 };

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (121228 => 121229)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2012-06-26 05:23:57 UTC (rev 121229)
@@ -3325,7 +3325,7 @@
 
     // FIXME: It would be faster not to re-parse from strings, but for now CSS property validation lives inside the parser so we do it there.
     RefPtr<StylePropertySet> resultSet = StylePropertySet::create();
-    if (!CSSParser::parseValue(resultSet.get(), id, _expression_.second, false, CSSStrictMode, 0))
+    if (!CSSParser::parseValue(resultSet.get(), id, _expression_.second, false, document()))
         return; // _expression_ failed to parse.
 
     for (unsigned i = 0; i < resultSet->propertyCount(); i++) {

Modified: trunk/Source/WebCore/page/Settings.h (121228 => 121229)


--- trunk/Source/WebCore/page/Settings.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/page/Settings.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -331,6 +331,14 @@
         bool cssRegionsEnabled() const { return false; }
 #endif
 
+#if ENABLE(CSS_VARIABLES)
+        void setCSSVariablesEnabled(bool enabled) { m_cssVariablesEnabled = enabled; }
+        bool cssVariablesEnabled() const { return true; }
+#else
+        void setCSSVariablesEnabled(bool) { }
+        bool cssVariablesEnabled() const { return false; }
+#endif
+
         void setRegionBasedColumnsEnabled(bool enabled) { m_regionBasedColumnsEnabled = enabled; }
         bool regionBasedColumnsEnabled() const { return m_regionBasedColumnsEnabled; }
 
@@ -677,6 +685,9 @@
 #if ENABLE(CSS_REGIONS)
         bool m_cssRegionsEnabled : 1;
 #endif
+#if ENABLE(CSS_VARIABLES)
+        bool m_cssVariablesEnabled : 1;
+#endif
         bool m_regionBasedColumnsEnabled : 1;
         bool m_cssGridLayoutEnabled : 1;
         bool m_downloadableBinaryFontsEnabled : 1;

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (121228 => 121229)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2012-06-26 05:23:57 UTC (rev 121229)
@@ -348,6 +348,18 @@
     RuntimeEnabledFeatures::setCSSExclusionsEnabled(enabled);
 }
 
+void InternalSettings::setCSSVariablesEnabled(bool enabled, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    settings()->setCSSVariablesEnabled(enabled);
+}
+
+bool InternalSettings::cssVariablesEnabled(ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettingsReturn(false);
+    return settings()->cssVariablesEnabled();
+}
+
 void InternalSettings::setMediaPlaybackRequiresUserGesture(bool enabled, ExceptionCode& ec)
 {
     InternalSettingsGuardForSettings();

Modified: trunk/Source/WebCore/testing/InternalSettings.h (121228 => 121229)


--- trunk/Source/WebCore/testing/InternalSettings.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -75,6 +75,8 @@
     void setEnableScrollAnimator(bool enabled, ExceptionCode&);
     bool scrollAnimatorEnabled(ExceptionCode&);
     void setCSSExclusionsEnabled(bool enabled, ExceptionCode&);
+    void setCSSVariablesEnabled(bool enabled, ExceptionCode&);
+    bool cssVariablesEnabled(ExceptionCode&);
     void setMediaPlaybackRequiresUserGesture(bool, ExceptionCode&);
     void setEditingBehavior(const String&, ExceptionCode&);
     void setFixedPositionCreatesStackingContext(bool, ExceptionCode&);

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (121228 => 121229)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2012-06-26 05:23:57 UTC (rev 121229)
@@ -54,6 +54,8 @@
         void setEnableScrollAnimator(in boolean enabled) raises(DOMException);
         boolean scrollAnimatorEnabled() raises(DOMException);
         void setCSSExclusionsEnabled(in boolean enabled) raises(DOMException);
+        void setCSSVariablesEnabled(in boolean enabled) raises(DOMException);
+        boolean cssVariablesEnabled() raises(DOMException);
         void setMediaPlaybackRequiresUserGesture(in boolean enabled) raises(DOMException);
         void setEditingBehavior(in DOMString behavior) raises(DOMException);
         void setFixedPositionCreatesStackingContext(in boolean creates) raises(DOMException);

Modified: trunk/Source/WebKit/chromium/ChangeLog (121228 => 121229)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-06-26 05:23:57 UTC (rev 121229)
@@ -1,3 +1,18 @@
+2012-06-25  Luke Macpherson  <macpher...@chromium.org>
+
+        Add runtime flag to enable/disable CSS variables (in addition to existing compile-time flag).
+        https://bugs.webkit.org/show_bug.cgi?id=89542
+
+        Reviewed by Dimitri Glazkov.
+
+        * features.gypi:
+        * public/WebSettings.h:
+        * src/WebSettingsImpl.cpp:
+        (WebKit::WebSettingsImpl::setExperimentalCSSVariablesEnabled):
+        (WebKit):
+        * src/WebSettingsImpl.h:
+        (WebSettingsImpl):
+
 2012-06-25  Adrienne Walker  <e...@google.com>
 
         [chromium] Add WebPluginScrollbar and WebPluginScrollbarClient stub implementations

Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (121228 => 121229)


--- trunk/Source/WebKit/chromium/public/WebSettings.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebKit/chromium/public/WebSettings.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -105,6 +105,7 @@
     virtual void setExperimentalCSSRegionsEnabled(bool) = 0;
     virtual void setExperimentalCSSGridLayoutEnabled(bool) = 0;
     virtual void setExperimentalCSSCustomFilterEnabled(bool) = 0;
+    virtual void setExperimentalCSSVariablesEnabled(bool) = 0;
     virtual void setOpenGLMultisamplingEnabled(bool) = 0;
     virtual void setPrivilegedWebGLExtensionsEnabled(bool) = 0;
     virtual void setWebGLErrorsToConsoleEnabled(bool) = 0;

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp (121228 => 121229)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp	2012-06-26 05:23:57 UTC (rev 121229)
@@ -338,6 +338,11 @@
     m_settings->setCSSCustomFilterEnabled(enabled);
 }
 
+void WebSettingsImpl::setExperimentalCSSVariablesEnabled(bool enabled)
+{
+    m_settings->setCSSVariablesEnabled(enabled);
+}
+
 void WebSettingsImpl::setOpenGLMultisamplingEnabled(bool enabled)
 {
     m_settings->setOpenGLMultisamplingEnabled(enabled);

Modified: trunk/Source/WebKit/chromium/src/WebSettingsImpl.h (121228 => 121229)


--- trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-06-26 04:47:14 UTC (rev 121228)
+++ trunk/Source/WebKit/chromium/src/WebSettingsImpl.h	2012-06-26 05:23:57 UTC (rev 121229)
@@ -97,6 +97,7 @@
     virtual void setExperimentalCSSRegionsEnabled(bool);
     virtual void setExperimentalCSSGridLayoutEnabled(bool);
     virtual void setExperimentalCSSCustomFilterEnabled(bool);
+    virtual void setExperimentalCSSVariablesEnabled(bool);
     virtual void setOpenGLMultisamplingEnabled(bool);
     virtual void setPrivilegedWebGLExtensionsEnabled(bool);
     virtual void setWebGLErrorsToConsoleEnabled(bool);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to