Add platform support for -webkit-background-blend-mode to CG context
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 21:43:50 +0000 (21:43 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 15 Feb 2013 21:43:50 +0000 (21:43 +0000)
commit82fe77ec2ba8e6a24338a1e7bcf361f43c33489c
tree382e3567b03d0c67903652c58ffd1b4dfd5268dc
parent8ec646bb45a07854f6f18ee71b7137eae25d7bda
Add platform support for -webkit-background-blend-mode to CG context
https://bugs.webkit.org/show_bug.cgi?id=108549

Patch by Rik Cabanier <cabanier@adobe.com> on 2013-02-15
Reviewed by Dean Jackson.

Source/WebCore:

Tests: css3/compositing/effect-background-blend-mode-stacking.html
       css3/compositing/effect-background-blend-mode.html

This patch adds support for blending on background images to the Core Graphics port of WebKit.

* platform/graphics/CrossfadeGeneratedImage.cpp: Added interface change for blending.
(WebCore::CrossfadeGeneratedImage::drawPattern):
* platform/graphics/CrossfadeGeneratedImage.h: Added interface change for blending.
(CrossfadeGeneratedImage):
* platform/graphics/GeneratedImage.h: Added interface change for blending.
(GeneratedImage):
* platform/graphics/GeneratorGeneratedImage.cpp: Added interface change for blending.
(WebCore::GeneratorGeneratedImage::drawPattern):
* platform/graphics/GeneratorGeneratedImage.h: Added interface change for blending.
(GeneratorGeneratedImage):
* platform/graphics/GraphicsContext.cpp: Added interface change for blending and passes blend mode to image object.
(WebCore::GraphicsContext::drawTiledImage):
(WebCore::GraphicsContext::blendModeOperation):
(WebCore):
* platform/graphics/GraphicsContext.h: Added interface change for blending.
(GraphicsContext):
* platform/graphics/Image.cpp: Added interface change for blending and passed it to graphics layer.
(WebCore::Image::drawTiled):
* platform/graphics/Image.h: Added interface change for blending.
(Image):
* platform/graphics/cg/ImageCG.cpp: Added interface change for blending and passed it to OS.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp: Passed blend mode when drawing background images.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* platform/graphics/cairo/ImageCairo.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* platform/graphics/qt/ImageQt.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* platform/graphics/skia/ImageSkia.cpp: Added interface change for blending.
(WebCore::Image::drawPattern):
* rendering/RenderBoxModelObject.cpp: Added interface change for blending.
(WebCore::RenderBoxModelObject::paintFillLayerExtended):
* svg/graphics/SVGImageForContainer.cpp: Added interface change for blending.
(WebCore::SVGImageForContainer::drawPattern):
* svg/graphics/SVGImageForContainer.h: Added interface change for blending.

Source/WebKit:

Fixed build issue.

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

Source/WebKit/win:

Fixed build issue.

* WebKit.vcproj/WebKitExports.def.in:

LayoutTests:

Added tests for background images.

* css3/compositing/effect-background-blend-mode-expected.png: Added.
* css3/compositing/effect-background-blend-mode-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-stacking-expected.png: Added.
* css3/compositing/effect-background-blend-mode-stacking-expected.txt: Added.
* css3/compositing/effect-background-blend-mode-stacking.html: Added.
* css3/compositing/effect-background-blend-mode.html: Added.
* css3/compositing/resources/ducky.png: Added.
* platform/chromium/TestExpectations:
* platform/mac/css3/compositing: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-expected.png: Added.
* platform/mac/css3/compositing/effect-background-blend-mode-stacking-expected.png: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@143046 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/css3/compositing/effect-background-blend-mode-expected.png [new file with mode: 0644]
LayoutTests/css3/compositing/effect-background-blend-mode-expected.txt [new file with mode: 0644]
LayoutTests/css3/compositing/effect-background-blend-mode-stacking-expected.png [new file with mode: 0644]
LayoutTests/css3/compositing/effect-background-blend-mode-stacking-expected.txt [new file with mode: 0644]
LayoutTests/css3/compositing/effect-background-blend-mode-stacking.html [new file with mode: 0644]
LayoutTests/css3/compositing/effect-background-blend-mode.html [new file with mode: 0644]
LayoutTests/css3/compositing/resources/ducky.png [new file with mode: 0644]
LayoutTests/platform/chromium/TestExpectations
LayoutTests/platform/mac/css3/compositing/effect-background-blend-mode-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/css3/compositing/effect-background-blend-mode-stacking-expected.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.h
Source/WebCore/platform/graphics/GeneratedImage.h
Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratorGeneratedImage.h
Source/WebCore/platform/graphics/GraphicsContext.cpp
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/Image.h
Source/WebCore/platform/graphics/cairo/ImageCairo.cpp
Source/WebCore/platform/graphics/cg/ImageCG.cpp
Source/WebCore/platform/graphics/qt/ImageQt.cpp
Source/WebCore/platform/graphics/skia/ImageSkia.cpp
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/svg/graphics/SVGImageForContainer.cpp
Source/WebCore/svg/graphics/SVGImageForContainer.h
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in
Source/WebKit/win/ChangeLog
Source/WebKit/win/WebKit.vcproj/WebKitExports.def.in