Implement css3-conditional's @supports rule
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 18:43:15 +0000 (18:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 18 Oct 2012 18:43:15 +0000 (18:43 +0000)
commitd0f63b479bbee522bd16b66fb74ea78159850078
tree4cee7812191111f74bd56f7efb742d77f3e8926d
parent6de93753ddb6c08faba4c1a6a4ce96ad22a88879
Implement css3-conditional's @supports rule
https://bugs.webkit.org/show_bug.cgi?id=86146

Patch by Pablo Flouret <pablof@motorola.com> on 2012-10-18
Reviewed by Antti Koivisto.

.:

* Source/cmake/WebKitFeatures.cmake:
* Source/cmakeconfig.h.cmake:
* configure.ac:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

Source/WebCore:

The "@supports" rule is a conditional group rule whose condition tests
whether the user agent supports CSS property:value pairs.

http://dev.w3.org/csswg/css3-conditional/#at-supports

Test: css3/supports.html

* Configurations/FeatureDefines.xcconfig:
* GNUmakefile.am:
* GNUmakefile.features.am:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

* css/CSSGrammar.y.in:
* css/CSSParser.cpp:
(WebCore):
(WebCore::CSSParser::detectSupportsToken): Tries to find 'and', 'not' and 'or' tokens.
(WebCore::CSSParser::detectAtToken): Enter SupportsMode if @supports is detected.
(WebCore::CSSParser::realLex): Try to detect supports tokens when in SupportsMode.
* css/CSSParser.h: Added new SupportsMode parsing mode.
(CSSParser):

Source/WebKit/chromium:

* features.gypi:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

Tools:

* Scripts/webkitperl/FeatureList.pm:
* qmake/mkspecs/features/features.pri:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

WebKitLibraries:

* win/tools/vsprops/FeatureDefines.vsprops:
* win/tools/vsprops/FeatureDefinesCairo.vsprops:
    Add an ENABLE_CSS3_CONDITIONAL_RULES flag.

LayoutTests:

* css3/supports-expected.txt: Added.
* css3/supports.html: Added.

* platform/chromium/TestExpectations:
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:
* platform/wk2/TestExpectations:
    Skip the test until the feature is enabled.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131783 268f45cc-cd09-0410-ab3c-d52691b4dbfc
36 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/css3/supports-expected.txt [new file with mode: 0644]
LayoutTests/css3/supports.html [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
LayoutTests/platform/wk2/TestExpectations
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebCore/GNUmakefile.am
Source/WebCore/GNUmakefile.features.am
Source/WebCore/css/CSSGrammar.y.in
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSParser.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/features.gypi
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/cmake/WebKitFeatures.cmake
Source/cmakeconfig.h.cmake
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm
Tools/qmake/mkspecs/features/features.pri
WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/vsprops/FeatureDefines.vsprops
WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.vsprops
configure.ac