Support "plus-darker" in mix-blend mode
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 16:03:53 +0000 (16:03 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Jan 2015 16:03:53 +0000 (16:03 +0000)
commit455294245c353fe1d7108e7c966e865889919b9d
tree11f2007e1fa8428daf833cb657368270984718bc
parent7f2bfddf48984221eadd30d87399f15348191917
Support "plus-darker" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=140646
<rdar://problem/19523370>

Reviewed by Simon Fraser.

Source/WebCore:

Support the "plus-darker" blending mode to CSS.
See: https://lists.w3.org/Archives/Public/public-fx/2015JanMar/0021.html

Test: css3/blending/svg-blend-plus-darker.html

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept
the new keyword.
* css/CSSPrimitiveValueMappings.h: Add the mappings.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* platform/graphics/GraphicsTypes.cpp: Add the new GraphicsType.
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA compositing filter.
(PlatformCAFilters::setBlendingFiltersOnLayer):
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContext::setPlatformCompositeOperation): Map to the CG blending flag.

Source/WebKit2:

Output the appropriate blending type when logging.

* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):

LayoutTests:

Add tests and new expected results for plus-darker.

* css3/blending/blend-mode-property-parsing-expected.txt:
* css3/blending/blend-mode-simple-composited.html:
* css3/blending/blend-mode-simple.html:
* css3/blending/script-tests/blend-mode-property-parsing.js:
* css3/blending/svg-blend-plus-darker.html: Added.
* platform/mac/css3/blending/blend-mode-simple-composited-expected.png:
* platform/mac/css3/blending/blend-mode-simple-composited-expected.txt:
* platform/mac/css3/blending/blend-mode-simple-expected.png:
* platform/mac/css3/blending/blend-mode-simple-expected.txt:
* platform/mac/css3/blending/svg-blend-plus-darker-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/blending/blend-mode-property-parsing-expected.txt
LayoutTests/css3/blending/blend-mode-simple-composited.html
LayoutTests/css3/blending/blend-mode-simple.html
LayoutTests/css3/blending/script-tests/blend-mode-property-parsing.js
LayoutTests/css3/blending/svg-blend-plus-darker.html [new file with mode: 0644]
LayoutTests/platform/mac/css3/blending/blend-mode-simple-composited-expected.png
LayoutTests/platform/mac/css3/blending/blend-mode-simple-composited-expected.txt
LayoutTests/platform/mac/css3/blending/blend-mode-simple-expected.png
LayoutTests/platform/mac/css3/blending/blend-mode-simple-expected.txt
LayoutTests/platform/mac/css3/blending/svg-blend-plus-darker-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/platform/graphics/GraphicsTypes.cpp
Source/WebCore/platform/graphics/GraphicsTypes.h
Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm