diff options
author | mrobinson@webkit.org <mrobinson@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-12-18 18:44:48 +0000 |
---|---|---|
committer | mrobinson@webkit.org <mrobinson@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2010-12-18 18:44:48 +0000 |
commit | 0c93172735126c1178b6b72368e8ec8e9ea2a59e (patch) | |
tree | 0c07610a7885bd9cd892b029040ff3e5c67cba59 /third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt | |
parent | a35547dc807b5001a51ff9d3017cee7b44e52871 (diff) | |
download | chromium_src-0c93172735126c1178b6b72368e8ec8e9ea2a59e.zip chromium_src-0c93172735126c1178b6b72368e8ec8e9ea2a59e.tar.gz chromium_src-0c93172735126c1178b6b72368e8ec8e9ea2a59e.tar.bz2 |
2010-12-18 Helder Correia <helder@sencha.com> and Martin Robinson <mrobinson@igalia.com>
Reviewed by Ariya Hidayat.
[Qt] Canvas shadow offset should not be affected by any transformation
https://bugs.webkit.org/show_bug.cgi?id=50422
On a canvas context, shadows are currently affected by all
transformations except scaling. According to the spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows
"The shadowOffsetX and shadowOffsetY attributes specify the distance
that the shadow will be offset in the positive horizontal and positive
vertical distance respectively. Their values are in coordinate space
units. They are not affected by the current transformation matrix."
NOTE: this applies only to canvas, not to box shadows.
Add new test to ensure that shadows are correctly transformed keeping
the relative offset to the shape.
* fast/canvas/canvas-scale-strokePath-shadow-expected.txt: See strokePath below.
* fast/canvas/canvas-transforms-fillRect-shadow-expected.txt: Added.
* fast/canvas/canvas-transforms-fillRect-shadow.html: Added.
* fast/canvas/script-tests/canvas-scale-fillPath-shadow.js:
* fast/canvas/script-tests/canvas-scale-fillRect-shadow.js:
* fast/canvas/script-tests/canvas-scale-strokePath-shadow.js: Now using
a lineWidth > 1 to make it easier to test and more fair among all
ports, since there can be different transformation smoothness or
aliasing settings.
* fast/canvas/script-tests/canvas-transforms-fillRect-shadow.js: Added.
* platform/gtk/Skipped: GTK port needs to implement this feature.
* platform/gtk/fast/canvas/canvas-scale-fillPath-shadow-expected.txt: Removed.
* platform/gtk/fast/canvas/canvas-scale-fillRect-shadow-expected.txt: Removed.
* platform/gtk/fast/canvas/canvas-scale-strokePath-shadow-expected.txt: Removed.
2010-12-18 Helder Correia <helder@sencha.com> and Martin Robinson <mrobinson@igalia.com>
Reviewed by Ariya Hidayat.
[Qt] Canvas shadow offset should not be affected by any transformation
https://bugs.webkit.org/show_bug.cgi?id=50422
On a canvas context, shadows are currently affected by all
transformations except scaling. According to the spec:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#shadows
"The shadowOffsetX and shadowOffsetY attributes specify the distance
that the shadow will be offset in the positive horizontal and positive
vertical distance respectively. Their values are in coordinate space
units. They are not affected by the current transformation matrix."
NOTE: this applies only to canvas, not to box shadows.
Test: fast/canvas/canvas-transforms-fillRect-shadow.html
* platform/graphics/ContextShadow.cpp:
(WebCore::ContextShadow::ContextShadow):
(WebCore::ContextShadow::calculateLayerBoundingRect):
* platform/graphics/ContextShadow.h:
(WebCore::ContextShadow::setShadowsIgnoreTransforms):
(WebCore::ContextShadow::shadowsIgnoreTransforms):
(WebCore::ContextShadow::offset):
* platform/graphics/qt/ContextShadowQt.cpp:
(WebCore::ContextShadow::beginShadowLayer):
(WebCore::ContextShadow::endShadowLayer):
* platform/graphics/qt/GraphicsContextQt.cpp:
(WebCore::mustUseContextShadow):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::setPlatformShadow):
git-svn-id: svn://svn.chromium.org/blink/trunk@74317 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt')
-rw-r--r-- | third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt b/third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt new file mode 100644 index 0000000..013b891 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/canvas/canvas-transforms-fillRect-shadow-expected.txt @@ -0,0 +1,57 @@ +Ensure correct behavior of canvas with fillRect+shadow after translation+rotation+scaling. A blue and red checkered pattern should be displayed. + +On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". + + +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is 255 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is 255 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is 255 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 127 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 127 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 127 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 106 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 106 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 83 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 36 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 36 +PASS d[0] is 255 +PASS d[1] is 0 +PASS d[2] is 0 +PASS d[3] is around 36 +PASS successfullyParsed is true + +TEST COMPLETE + |