Add support for parsing of -webkit-background-blend-mode
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 21:13:31 +0000 (21:13 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2013 21:13:31 +0000 (21:13 +0000)
commit68a0293227e0db15cb5cf06eacf4dc8890d5a684
tree972da5ad867e536c508fd3dc38d6a37bd1c21ff7
parented6b77bb5aad55543d8859e9bc8df285bdeab5e0
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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142168 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/compositing/background-blend-mode-property-expected.txt [new file with mode: 0644]
LayoutTests/css3/compositing/background-blend-mode-property-parsing-expected.txt [new file with mode: 0644]
LayoutTests/css3/compositing/background-blend-mode-property-parsing.html [new file with mode: 0644]
LayoutTests/css3/compositing/background-blend-mode-property.html [new file with mode: 0644]
LayoutTests/css3/compositing/script-tests/background-blend-mode-property-parsing.js [new file with mode: 0644]
LayoutTests/css3/compositing/script-tests/background-blend-mode-property.js [new file with mode: 0644]
LayoutTests/platform/chromium/css3/compositing/background-blend-mode-property-expected.txt [new file with mode: 0644]
LayoutTests/platform/chromium/css3/compositing/background-blend-mode-property-parsing-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSPropertyNames.in
Source/WebCore/css/CSSToStyleMap.cpp
Source/WebCore/css/CSSToStyleMap.h
Source/WebCore/css/StyleBuilder.cpp
Source/WebCore/rendering/style/FillLayer.cpp
Source/WebCore/rendering/style/FillLayer.h