haikuwebkit/LayoutTests/css3/blending/background-blend-mode-prope...

42 lines
1.2 KiB
HTML
Raw Permalink Normal View History

Add support for parsing of -webkit-background-blend-mode https://bugs.webkit.org/show_bug.cgi?id=108547 Patch by Rik Cabanier <cabanier@adobe.com> on 2013-02-07 Reviewed by David Hyatt. Source/WebCore: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode Tests: css3/compositing/background-blend-mode-property-parsing.html css3/compositing/background-blend-mode-property.html * css/CSSComputedStyleDeclaration.cpp: Built value for getComputedStyle. (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: Parsed and stored value of -webkit-background-blend-mode. (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillProperty): * css/CSSProperty.cpp: Listed -webkit-background-blend-mode as a non-inherited property. (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: Added -webkit-background-blend-mode as a CSS property. * css/CSSToStyleMap.cpp: Mapped background blend mode from CSS value to enum. (WebCore::CSSToStyleMap::mapFillBlendMode): (WebCore): * css/CSSToStyleMap.h: Added function declaration 'mapFillBlendMode'. (CSSToStyleMap): * css/StyleBuilder.cpp: Set up propery handler for -webkit-background-blend-mode. (WebCore::StyleBuilder::StyleBuilder): * rendering/style/FillLayer.cpp: Added code to store and retrieve the blend mode from a layer. (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): (WebCore::FillLayer::operator==): (WebCore::FillLayer::fillUnsetProperties): * rendering/style/FillLayer.h: Added function definitions to manage blend mode in a layer. (WebCore::FillLayer::blendMode): (WebCore::FillLayer::isBlendModeSet): (WebCore::FillLayer::setBlendMode): (WebCore::FillLayer::clearBlendMode): (WebCore::FillLayer::initialFillBlendMode): (FillLayer): LayoutTests: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * platform/chromium/css3/compositing/background-blend-mode-property-expected.txt: Added. * platform/chromium/css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. Canonical link: https://commits.webkit.org/127413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-07 21:13:31 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<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>
Add support for parsing of -webkit-background-blend-mode https://bugs.webkit.org/show_bug.cgi?id=108547 Patch by Rik Cabanier <cabanier@adobe.com> on 2013-02-07 Reviewed by David Hyatt. Source/WebCore: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode Tests: css3/compositing/background-blend-mode-property-parsing.html css3/compositing/background-blend-mode-property.html * css/CSSComputedStyleDeclaration.cpp: Built value for getComputedStyle. (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: Parsed and stored value of -webkit-background-blend-mode. (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillProperty): * css/CSSProperty.cpp: Listed -webkit-background-blend-mode as a non-inherited property. (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: Added -webkit-background-blend-mode as a CSS property. * css/CSSToStyleMap.cpp: Mapped background blend mode from CSS value to enum. (WebCore::CSSToStyleMap::mapFillBlendMode): (WebCore): * css/CSSToStyleMap.h: Added function declaration 'mapFillBlendMode'. (CSSToStyleMap): * css/StyleBuilder.cpp: Set up propery handler for -webkit-background-blend-mode. (WebCore::StyleBuilder::StyleBuilder): * rendering/style/FillLayer.cpp: Added code to store and retrieve the blend mode from a layer. (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): (WebCore::FillLayer::operator==): (WebCore::FillLayer::fillUnsetProperties): * rendering/style/FillLayer.h: Added function definitions to manage blend mode in a layer. (WebCore::FillLayer::blendMode): (WebCore::FillLayer::isBlendModeSet): (WebCore::FillLayer::setBlendMode): (WebCore::FillLayer::clearBlendMode): (WebCore::FillLayer::initialFillBlendMode): (FillLayer): LayoutTests: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * platform/chromium/css3/compositing/background-blend-mode-property-expected.txt: Added. * platform/chromium/css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. Canonical link: https://commits.webkit.org/127413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-07 21:13:31 +00:00
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description("Test the parsing of the background-blend-mode property.");
var styleElement = document.createElement("style");
document.head.appendChild(styleElement);
var stylesheet = styleElement.sheet;
var cssRule;
var declaration;
function testblendmode(blendmode)
{
// add a -webkit-filter property to the start of the stylesheet
stylesheet.addRule("body", "background-blend-mode: " + blendmode + ", " + blendmode, 0);
cssRule = stylesheet.cssRules.item(0);
shouldBe("cssRule.type", "1");
declaration = cssRule.style;
shouldBe("declaration.length", "1");
shouldBe("declaration.getPropertyValue('background-blend-mode')", "\'" + blendmode + ", " + blendmode + "\'");
}
var blendmodes = ["normal", "multiply", "screen", "overlay", "darken", "lighten", "color-dodge", "color-burn", "hard-light", "soft-light", "difference", "exclusion"];
for(x in blendmodes)
testblendmode(blendmodes[x]);
successfullyParsed = true;
</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>
Add support for parsing of -webkit-background-blend-mode https://bugs.webkit.org/show_bug.cgi?id=108547 Patch by Rik Cabanier <cabanier@adobe.com> on 2013-02-07 Reviewed by David Hyatt. Source/WebCore: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode Tests: css3/compositing/background-blend-mode-property-parsing.html css3/compositing/background-blend-mode-property.html * css/CSSComputedStyleDeclaration.cpp: Built value for getComputedStyle. (WebCore): (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): * css/CSSParser.cpp: Parsed and stored value of -webkit-background-blend-mode. (WebCore::CSSParser::parseValue): (WebCore::CSSParser::parseFillProperty): * css/CSSProperty.cpp: Listed -webkit-background-blend-mode as a non-inherited property. (WebCore::CSSProperty::isInheritedProperty): * css/CSSPropertyNames.in: Added -webkit-background-blend-mode as a CSS property. * css/CSSToStyleMap.cpp: Mapped background blend mode from CSS value to enum. (WebCore::CSSToStyleMap::mapFillBlendMode): (WebCore): * css/CSSToStyleMap.h: Added function declaration 'mapFillBlendMode'. (CSSToStyleMap): * css/StyleBuilder.cpp: Set up propery handler for -webkit-background-blend-mode. (WebCore::StyleBuilder::StyleBuilder): * rendering/style/FillLayer.cpp: Added code to store and retrieve the blend mode from a layer. (WebCore::FillLayer::FillLayer): (WebCore::FillLayer::operator=): (WebCore::FillLayer::operator==): (WebCore::FillLayer::fillUnsetProperties): * rendering/style/FillLayer.h: Added function definitions to manage blend mode in a layer. (WebCore::FillLayer::blendMode): (WebCore::FillLayer::isBlendModeSet): (WebCore::FillLayer::setBlendMode): (WebCore::FillLayer::clearBlendMode): (WebCore::FillLayer::initialFillBlendMode): (FillLayer): LayoutTests: Added parsing and general CSS handling of -webkit-background-blend-mode per https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#background-blend-mode * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * css3/compositing/background-blend-mode-property-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. * css3/compositing/background-blend-mode-property-parsing.html: Added. * css3/compositing/background-blend-mode-property.html: Added. * css3/compositing/script-tests/background-blend-mode-property-parsing.js: Added. (jsWrapperClass): (shouldBeType): (testBlendModeRule): * css3/compositing/script-tests/background-blend-mode-property.js: Added. (testblendmode): * platform/chromium/css3/compositing/background-blend-mode-property-expected.txt: Added. * platform/chromium/css3/compositing/background-blend-mode-property-parsing-expected.txt: Added. Canonical link: https://commits.webkit.org/127413@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-02-07 21:13:31 +00:00
</body>
</html>