Ignore:
Timestamp:
Jun 25, 2012, 10:23:57 PM (13 years ago)
Author:
[email protected]
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):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/css/StyleResolver.cpp

    r121192 r121229  
    33263326    // 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.
    33273327    RefPtr<StylePropertySet> resultSet = StylePropertySet::create();
    3328     if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, CSSStrictMode, 0))
     3328    if (!CSSParser::parseValue(resultSet.get(), id, expression.second, false, document()))
    33293329        return; // expression failed to parse.
    33303330
Note: See TracChangeset for help on using the changeset viewer.