haikuwebkit/LayoutTests/css3/supports-dom-api.html

103 lines
5.2 KiB
HTML
Raw Permalink Normal View History

Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
<!DOCTYPE HTML>
<html>
<head>
Change LayoutTests' c* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120986. Rubber stamped by Filip Pizlo. * canvas/philip/tests/2d.composite.globalComposite.html: * compositing/repaint/shrink-layer.html: * css1/units/rounding.html: * css3/calc/color-hsl.html: * css3/calc/color-rgb.html: * css3/calc/font-size-fractional.html: * css3/calc/font-size.html: * css3/calc/font.html: * css3/calc/getComputedStyle-margin-percentage.html: * css3/calc/line-height.html: * css3/calc/margin.html: * css3/calc/table-border-spacing.html: * css3/calc/table-calcs.html: * css3/calc/zoom-with-em.html: * css3/compositing/background-blend-mode-property-parsing.html: * css3/compositing/background-blend-mode-property.html: * css3/compositing/blend-mode-property-parsing-invalid.html: * css3/compositing/blend-mode-property-parsing.html: * css3/compositing/blend-mode-property.html: * css3/compositing/should-have-compositing-layer.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: * css3/filters/custom/custom-filter-crash-inline-computed-style.html: * css3/filters/custom/custom-filter-mix-bindings.html: * css3/filters/custom/custom-filter-property-computed-style.html: * css3/filters/custom/custom-filter-property-parsing-invalid.html: * css3/filters/custom/custom-filter-property-parsing.html: * css3/filters/custom/effect-custom-disabled.html: * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: * css3/filters/should-not-have-compositing-layer.html: * css3/flexbox/align-absolute-child.html: * css3/flexbox/css-properties.html: * css3/flexbox/display-flexbox-set-get.html: * css3/flexbox/flex-align-baseline.html: * css3/flexbox/flex-flow-initial.html: * css3/flexbox/flex-longhand-parsing.html: * css3/flexbox/flex-property-parsing.html: * css3/flexbox/flexitem-no-margin-collapsing.html: * css3/flexbox/overflow-keep-scrollpos.html: * css3/font-feature-settings-parsing.html: * css3/supports-cssom.html: * css3/supports-dom-api.html: * css3/supports.html: * css3/unicode-bidi-insolate-parse.html: * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html: * css3/zoom-coords.xhtml: Canonical link: https://commits.webkit.org/138879@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 02:07:30 +00:00
<script src="../resources/js-test-pre.js"></script>
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
</head>
<body>
<script>
description("Test window.CSS.supports()");
shouldBeTrue('CSS.supports("display: none")');
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
shouldBeTrue('CSS.supports("(display: none)")');
shouldBeTrue('CSS.supports(" display: none ")');
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
shouldBeFalse('CSS.supports("(display: deadbeef)")');
shouldBeFalse('CSS.supports("display: deadbeef")');
shouldBeTrue('CSS.supports("(display: none) and ((display: block) or (display: inline))")');
shouldBeTrue('CSS.supports("(not (display: deadbeef)) and (display: block)")');
shouldBeTrue('CSS.supports("top: -webkit-calc(80% - 20px)")');
shouldBeTrue('CSS.supports("background-color: rgb(0, 128, 0)")');
shouldBeTrue('CSS.supports("background: url(\'/blah\')")');
shouldBeFalse('CSS.supports("background: invalid(\'/blah\')")');
shouldBeFalse('CSS.supports("display: none;")');
shouldBeFalse('CSS.supports("display: none; garbage")');
shouldBeFalse('CSS.supports(" display: none ; garbage ")');
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
// Negation
shouldBeTrue('CSS.supports("not (display: deadbeef)")');
shouldBeFalse('CSS.supports("not (display: none)")');
shouldBeTrue('CSS.supports("not (not (display: none))")');
shouldBeFalse('CSS.supports("not (not (not (display: none)))")');
// Conjunction.
shouldBeTrue('CSS.supports("(display: none) and (display: block)")');
shouldBeTrue('CSS.supports("(display: none) and (display: block) and (display: inline)")');
shouldBeFalse('CSS.supports("(display: none) and (display: block) and (display: deadbeef) and (display: inline)")');
// Disjunction.
shouldBeTrue('CSS.supports("(display: none) or (display: inline)")');
shouldBeTrue('CSS.supports("(display: none) or (display: block) or (display: inline)")');
shouldBeTrue('CSS.supports("(display: none) or (display: deadbeef) or (display: inline)")');
shouldBeFalse('CSS.supports("(display: ohhai) or (display: deadbeef) or (display: rainbows)")');
// Bad syntax. Can't mix operators without a layer of parentheses..
shouldBeFalse('CSS.supports("(display: none) and (display: block) or (display: inline)")');
shouldBeFalse('CSS.supports("not (display: deadbeef) and (display: block)")');
// Mix 'n match.
shouldBeTrue('CSS.supports("(not (border: 1px 1px 1px 1px 1px solid #000)) and (display: block)")');
shouldBeTrue('CSS.supports("(display: block !important) and ((display: inline) or (display: deadbeef))")');
shouldBeTrue('CSS.supports("not ((not (display: block)) or ((display: none) and (deadbeef: 1px)))")');
// Whitespace/Syntax.
shouldBeTrue('CSS.supports("not( display: deadbeef)")');
shouldBeTrue('CSS.supports("(display: none)and ( -webkit-transition: all 1s )")');
shouldBeTrue('CSS.supports("(display: none)or(-webkit-transition: all 1s)")');
shouldBeTrue('CSS.supports("(display: none) or(-webkit-transition: all 1s )")');
shouldBeTrue('CSS.supports("(((((((display: none)))))))")');
shouldBeFalse('CSS.supports("(!important)")');
shouldBeFalse('CSS.supports("!important")');
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
shouldBeFalse('CSS.supports("not not not not (display: none)")');
// Functions.
shouldBeTrue('CSS.supports("(top: -webkit-calc(80% - 20px))")');
shouldBeTrue('CSS.supports("(background-color: rgb(0, 128, 0))")');
shouldBeTrue('CSS.supports("(background: url(\'/blah\'))")');
shouldBeTrue('CSS.supports("((top: -webkit-calc(80% - 20px)) and (not (background-color: rgb(0, 128, 0)))) or (background: url(\'/blah\'))")');
shouldBeFalse('CSS.supports("(background: invalid(\'/blah\'))")');
// Property/value variant.
shouldBeTrue('CSS.supports("top", "20%")');
shouldBeTrue('CSS.supports("top", " 20px ")');
shouldBeFalse('CSS.supports("top", "20")');
shouldBeFalse('CSS.supports("dis\\nplay", "none")');
shouldBeFalse('CSS.supports("display", "rainbow")');
shouldBeFalse('CSS.supports("display", "url(rainbow.png)")');
shouldBeTrue('CSS.supports(" background ", "url(rainbow.png)")');
shouldBeFalse('CSS.supports("background", "invalid(rainbow.png)")');
shouldBeTrue('CSS.supports("background-color", "#000")');
shouldBeTrue('CSS.supports("background-color", "rgba(0,0,0,0)")');
shouldBeTrue('CSS.supports("background-color", "inherit")');
shouldBeTrue('CSS.supports("display", "none !important")');
shouldBeTrue('CSS.supports("display", "none!important")');
shouldBeFalse('CSS.supports("display", "!important none")');
shouldBeFalse('CSS.supports("display", "none !important ! important ")');
shouldBeTrue('CSS.supports("display", "none ! important")');
shouldBeTrue('CSS.supports("display", "none ! \timportant")');
shouldBeTrue('CSS.supports("display", "none ! \\nimportant")');
shouldBeFalse('CSS.supports("", "")');
shouldBeFalse('CSS.supports(true, "")');
shouldBeFalse('CSS.supports([], "none")');
shouldBeFalse('CSS.supports("display", "")');
shouldBeFalse('CSS.supports("display:", "none")');
shouldBeTrue('CSS.supports("z-index", 1)');
shouldBeFalse('CSS.supports("content", [])');
shouldBeFalse('CSS.supports("content", "!important")');
shouldBeFalse('CSS.supports("(display: none)", undefined)');
</script>
Change LayoutTests' c* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120986. Rubber stamped by Filip Pizlo. * canvas/philip/tests/2d.composite.globalComposite.html: * compositing/repaint/shrink-layer.html: * css1/units/rounding.html: * css3/calc/color-hsl.html: * css3/calc/color-rgb.html: * css3/calc/font-size-fractional.html: * css3/calc/font-size.html: * css3/calc/font.html: * css3/calc/getComputedStyle-margin-percentage.html: * css3/calc/line-height.html: * css3/calc/margin.html: * css3/calc/table-border-spacing.html: * css3/calc/table-calcs.html: * css3/calc/zoom-with-em.html: * css3/compositing/background-blend-mode-property-parsing.html: * css3/compositing/background-blend-mode-property.html: * css3/compositing/blend-mode-property-parsing-invalid.html: * css3/compositing/blend-mode-property-parsing.html: * css3/compositing/blend-mode-property.html: * css3/compositing/should-have-compositing-layer.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: * css3/filters/custom/custom-filter-crash-inline-computed-style.html: * css3/filters/custom/custom-filter-mix-bindings.html: * css3/filters/custom/custom-filter-property-computed-style.html: * css3/filters/custom/custom-filter-property-parsing-invalid.html: * css3/filters/custom/custom-filter-property-parsing.html: * css3/filters/custom/effect-custom-disabled.html: * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: * css3/filters/should-not-have-compositing-layer.html: * css3/flexbox/align-absolute-child.html: * css3/flexbox/css-properties.html: * css3/flexbox/display-flexbox-set-get.html: * css3/flexbox/flex-align-baseline.html: * css3/flexbox/flex-flow-initial.html: * css3/flexbox/flex-longhand-parsing.html: * css3/flexbox/flex-property-parsing.html: * css3/flexbox/flexitem-no-margin-collapsing.html: * css3/flexbox/overflow-keep-scrollpos.html: * css3/font-feature-settings-parsing.html: * css3/supports-cssom.html: * css3/supports-dom-api.html: * css3/supports.html: * css3/unicode-bidi-insolate-parse.html: * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html: * css3/zoom-coords.xhtml: Canonical link: https://commits.webkit.org/138879@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 02:07:30 +00:00
<script src="../resources/js-test-post.js"></script>
Implement css-conditional's CSS.supports() https://bugs.webkit.org/show_bug.cgi?id=100324 Patch by Pablo Flouret <pablof@motorola.com> on 2013-02-13 Reviewed by Antti Koivisto. Source/WebCore: http://dev.w3.org/csswg/css3-conditional/#the-css-interface The supports() method provides the css @supports rule's corresponding dom api. The patch also adds the CSS interface on DOMWindow, which holds "useful CSS-related functions that do not belong elsewhere". This is where supports() lives. Test: css3/supports-dom-api.html * CMakeLists.txt: * DerivedSources.cpp: * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: * WebCore.exp.in: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * bindings/gobject/GNUmakefile.am: * bindings/scripts/CodeGeneratorGObject.pm: (SkipFunction): Add DOMWindowCSS.* to the build systems. * bindings/scripts/CodeGenerator.pm: (WK_lcfirst): Handle CSS prefixes correctly (s/cSS/css/). * css/CSSGrammar.y.in: * css/CSSParser.cpp: (WebCore::CSSParser::CSSParser): (WebCore::CSSParser::parseSupportsCondition): (WebCore::CSSParser::detectAtToken): * css/CSSParser.h: webkit_supports_condition parses just the condition part of an @supports rule and evaluates it, outputting whether the condition is supported or not. * css/CSSAllInOne.cpp: * css/DOMWindowCSS.cpp: Added. * css/DOMWindowCSS.h: Added. * css/DOMWindowCSS.idl: Added. The CSS interface object. * page/DOMWindow.cpp: (WebCore::DOMWindow::css): * page/DOMWindow.h: * page/DOMWindow.idl: window.CSS LayoutTests: * css3/supports-dom-api-expected.txt: Added. * css3/supports-dom-api.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: Canonical link: https://commits.webkit.org/127960@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142739 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-13 13:45:05 +00:00
</body>
</html>