Support "plus-lighter" in mix-blend mode
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2015 00:08:32 +0000 (00:08 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 7 Mar 2015 00:08:32 +0000 (00:08 +0000)
commitd17cbb8663c0cf4ed5fa5f699bac80405e88d8bb
treee71920e937b6f8844404ba79a0e95392bf2b899a
parent9bb361bf781a6ef90e275382b7c595840a864156
Support "plus-lighter" in mix-blend mode
https://bugs.webkit.org/show_bug.cgi?id=142416
<rdar://problem/19993979>

Reviewed by Darin Adler and Sam Weinig.

Source/WebCore:

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

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

* css/CSSParser.cpp:
(WebCore::isValidKeywordPropertyAndValue): mix-blend-mode can now accept the
new keyword.
* css/CSSPrimitiveValueMappings.h: Add the mappings to/from the GraphicsType.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::operator BlendMode):
* css/CSSValueKeywords.in: Add comment to show plus-darker and plus-lighter
are available.
* platform/graphics/GraphicsTypes.cpp: New GraphicsType for PlusLighter.
* platform/graphics/GraphicsTypes.h:
* platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Map to the CA 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-lighter.

* 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-lighter.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-lighter-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@181191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 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-lighter.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-lighter-expected.txt [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/CSSParser.cpp
Source/WebCore/css/CSSPrimitiveValueMappings.h
Source/WebCore/css/CSSValueKeywords.in
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