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: http://svn.webkit.org/repository/webkit/trunk@178710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed