haikuwebkit/LayoutTests/css3/blending/svg-blend-plus-darker.html

21 lines
750 B
HTML
Raw Permalink Normal View History

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. Canonical link: https://commits.webkit.org/158639@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@178710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-01-20 16:03:53 +00:00
<!DOCTYPE HTML>
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="400px" height="400px" >
<defs>
<g id="patch">
<rect x="0" y="0" width="10" height="40" fill="rgb(255,0,0)"/>
<rect x="10" y="0" width="10" height="40" fill="rgb(0,255,0)"/>
<rect x="20" y="0" width="10" height="40" fill="rgb(0,0,255)"/>
<rect x="30" y="0" width="10" height="40" fill="rgb(127,127,0)"/>
</g>
<rect x="0" y="0" width="10" height="10" fill="rgb(255,0,0)"/>
</defs>
<g transform="scale(4 4)">
<use xlink:href="#patch" x="0" y="0" width="40" height="10"></use>
<use xlink:href="#patch" x="0" y="0" width="40" height="10" transform="rotate(90 20 20)" style="mix-blend-mode: plus-darker"></use>
</g>
</svg>
</body>
</html>