Implement canvas blending test that should validate the following scenarios:
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Aug 2013 18:42:51 +0000 (18:42 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Aug 2013 18:42:51 +0000 (18:42 +0000)
commit3c3034c5b7560e5b2bb1bee3aac2ac922eb6ba4d
treef28afd5429913bebd565f7ea32ba030ce95074a0
parent430679b1b4a98c6d0754a9914ed5e3831e02ff8f
Implement canvas blending test that should validate the following scenarios:
Validate that all blending operators work as expected for the following layer combinations:

https://bugs.webkit.org/show_bug.cgi?id=119082

Patch by Mihai Tica <mitica@adobe.com> on 2013-08-02
Reviewed by Dirk Schulze.

* fast/canvas/canvas-blending-clipping-expected.txt: Added.
* fast/canvas/canvas-blending-clipping.html: Added.
* fast/canvas/canvas-blending-color-over-color-expected.txt: Added.
* fast/canvas/canvas-blending-color-over-color.html: Added.
* fast/canvas/canvas-blending-color-over-gradient-expected.txt: Added.
* fast/canvas/canvas-blending-color-over-gradient.html: Added.
* fast/canvas/canvas-blending-color-over-image-expected.txt: Added.
* fast/canvas/canvas-blending-color-over-image.html: Added.
* fast/canvas/canvas-blending-color-over-pattern-expected.txt: Added.
* fast/canvas/canvas-blending-color-over-pattern.html: Added.
* fast/canvas/canvas-blending-fill-style-expected.txt: Added.
* fast/canvas/canvas-blending-fill-style.html: Added.
* fast/canvas/canvas-blending-global-alpha-expected.txt: Added.
* fast/canvas/canvas-blending-global-alpha.html: Added.
* fast/canvas/canvas-blending-gradient-over-color-expected.txt: Added.
* fast/canvas/canvas-blending-gradient-over-color.html: Added.
* fast/canvas/canvas-blending-gradient-over-gradient-expected.txt: Added.
* fast/canvas/canvas-blending-gradient-over-gradient.html: Added.
* fast/canvas/canvas-blending-gradient-over-image-expected.txt: Added.
* fast/canvas/canvas-blending-gradient-over-image.html: Added.
* fast/canvas/canvas-blending-gradient-over-pattern-expected.txt: Added.
* fast/canvas/canvas-blending-gradient-over-pattern.html: Added.
* fast/canvas/canvas-blending-helpers.js: Added.
(separateBlendFunctions.normal):
(separateBlendFunctions.multiply):
(separateBlendFunctions.screen):
(separateBlendFunctions.overlay):
(separateBlendFunctions.darken):
(separateBlendFunctions.lighten):
(separateBlendFunctions.colorDodge):
(separateBlendFunctions.colorBurn):
(separateBlendFunctions.hardLight):
(separateBlendFunctions.softLight):
(separateBlendFunctions.difference):
(separateBlendFunctions.exclusion):
(applyBlendMode):
(luminosity):
(clipColor):
(setLuminosity):
(saturation):
(setSaturation):
(nonSeparateBlendFunctions.hue):
(nonSeparateBlendFunctions.saturation):
(nonSeparateBlendFunctions.color):
(nonSeparateBlendFunctions.luminosity):
(drawColorInContext):
(drawBackdropColorInContext):
(drawSourceColorInContext):
(fillPathWithColorInContext):
(fillPathWithBackdropInContext):
(fillPathWithSourceInContext):
(applyTransformsToContext):
(drawBackdropColorWithShadowInContext):
(drawSourceColorRectOverShadow):
(.backdropImage.onload):
(drawColorImageInContext):
(drawBackdropColorImageInContext):
(drawSourceColorImageInContext):
(drawColorPatternInContext):
(drawBackdropColorPatternInContext):
(drawSourceColorPatternInContext):
(drawGradientInContext):
(drawBackdropColorGradientInContext):
(drawSourceColorGradientInContext):
(blendColors):
(separateBlendColors):
(nonSeparateBlendColors):
* fast/canvas/canvas-blending-image-over-color-expected.txt: Added.
* fast/canvas/canvas-blending-image-over-color.html: Added.
* fast/canvas/canvas-blending-image-over-gradient-expected.txt: Added.
* fast/canvas/canvas-blending-image-over-gradient.html: Added.
* fast/canvas/canvas-blending-image-over-image-expected.txt: Added.
* fast/canvas/canvas-blending-image-over-image.html: Added.
* fast/canvas/canvas-blending-image-over-pattern-expected.txt: Added.
* fast/canvas/canvas-blending-image-over-pattern.html: Added.
* fast/canvas/canvas-blending-pattern-over-color-expected.txt: Added.
* fast/canvas/canvas-blending-pattern-over-color.html: Added.
* fast/canvas/canvas-blending-pattern-over-gradient-expected.txt: Added.
* fast/canvas/canvas-blending-pattern-over-gradient.html: Added.
* fast/canvas/canvas-blending-pattern-over-image-expected.txt: Added.
* fast/canvas/canvas-blending-pattern-over-image.html: Added.
* fast/canvas/canvas-blending-pattern-over-pattern-expected.txt: Added.
* fast/canvas/canvas-blending-pattern-over-pattern.html: Added.
* fast/canvas/canvas-blending-shadow-expected.txt: Added.
* fast/canvas/canvas-blending-shadow.html: Added.
* fast/canvas/canvas-blending-text-expected.txt: Added.
* fast/canvas/canvas-blending-text.html: Added.
* fast/canvas/canvas-blending-transforms-expected.txt: Added.
* fast/canvas/canvas-blending-transforms.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@153658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/canvas/canvas-blending-clipping-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-clipping.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-color-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-color.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-gradient-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-gradient.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-image-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-image.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-pattern-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-color-over-pattern.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-fill-style-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-fill-style.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-global-alpha-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-global-alpha.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-color-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-color.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-gradient.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-image-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-image.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-gradient-over-pattern.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-helpers.js [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-color-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-color.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-gradient-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-gradient.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-image-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-image.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-pattern-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-image-over-pattern.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-color-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-color.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-gradient-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-gradient.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-image-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-image.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-pattern-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-pattern-over-pattern.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-shadow-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-shadow.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-text-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-text.html [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-transforms-expected.txt [new file with mode: 0644]
LayoutTests/fast/canvas/canvas-blending-transforms.html [new file with mode: 0644]