summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authormmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:53:03 +0000
committermmoss@google.com <mmoss@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-16 22:53:03 +0000
commit816079b199b01fdea8ecd384be708bae5708d1f6 (patch)
treef118477114efbc694c84ebd188f01f99d7286247 /webkit
parent6ddd29f1f1a3d68d1f5546296bea956e502715c9 (diff)
downloadchromium_src-816079b199b01fdea8ecd384be708bae5708d1f6.zip
chromium_src-816079b199b01fdea8ecd384be708bae5708d1f6.tar.gz
chromium_src-816079b199b01fdea8ecd384be708bae5708d1f6.tar.bz2
Fix incorrect pattern offsets, and rebaseline associated test results.
This now performs a similar origin translation as ImageCG.cpp, which seems to work, though it also seems to imply a relationship between the src and dest rects which I haven't found explicitly documented or enforced anywhere. Review URL: http://codereview.chromium.org/13375 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7107 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.pngbin0 -> 20812 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.pngbin0 -> 52484 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.pngbin0 -> 160363 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.checksum1
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.pngbin0 -> 5591 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.pngbin31900 -> 31056 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.pngbin3282 -> 3295 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.pngbin17649 -> 17034 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.pngbin31904 -> 31075 bytes
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum2
-rw-r--r--webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.pngbin31738 -> 31018 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.checksum1
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.pngbin0 -> 2920 bytes
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.txt6
-rwxr-xr-xwebkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-sides-and-corners-expected.txt8
-rw-r--r--webkit/port/platform/graphics/skia/ImageSkia.cpp9
-rw-r--r--webkit/tools/layout_tests/test_lists/tests_fixable.txt2
24 files changed, 31 insertions, 9 deletions
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.checksum
new file mode 100644
index 0000000..1629ced
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.checksum
@@ -0,0 +1 @@
+80464e6795e813b4bc9a9463c2d15ff3 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.png
new file mode 100644
index 0000000..e384a4f
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum
new file mode 100644
index 0000000..18112f7
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.checksum
@@ -0,0 +1 @@
+a56ea1bc7cca5d05ea415d44f6c84735 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
new file mode 100644
index 0000000..21c2cb4
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/repeat/negative-offset-repeat-transformed-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.checksum
new file mode 100644
index 0000000..fd684b1
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.checksum
@@ -0,0 +1 @@
+63810168740425c338aa89cc9405022a \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png
new file mode 100644
index 0000000..0c3aae4
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/backgroundSize18-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.checksum
new file mode 100644
index 0000000..50fb73d
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.checksum
@@ -0,0 +1 @@
+7fa1624b97a92d278a42a525dd54e5f7 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.png
new file mode 100644
index 0000000..62dc02b
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/backgrounds/size/zero-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
index 7fb0198..f1fe369 100644
--- a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
@@ -1 +1 @@
-fad2e3ad2e9f106ac1afec16071a663e \ No newline at end of file
+b0246be0bb4be21af7af344107cb44d3 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
index 9f45f7d..d860941 100644
--- a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.checksum b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.checksum
index dc7cf80..8c1e167 100644
--- a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.checksum
@@ -1 +1 @@
-048c2b5a6143a39abfce62d99902b6f1 \ No newline at end of file
+4ea3e2253582241cf66f69559d2f9aa8 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.png b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.png
index 3011aab..7d59bbb 100644
--- a/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-linux/LayoutTests/fast/canvas/canvas-bg-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
index 1c39691..b5f29f2 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.checksum
@@ -1 +1 @@
-9942a0015bb39433153c757baa8673c1 \ No newline at end of file
+b865d2544378e35362b683bd74813b1d \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
index 96d66be..9bd9b1b 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-01-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
index c1cb94e..6da4ecf 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.checksum
@@ -1 +1 @@
-760366eabf0a385462956548386442ce \ No newline at end of file
+7cd050852e2bf5c80c0c9490723a9882 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
index 6061ca6..034388d 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-rotate-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
index 818b2c5..5ff4230 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.checksum
@@ -1 +1 @@
-f442053d82ba5f1957e47a4cbf462bfe \ No newline at end of file
+c5582fddeeb6211fc5cc9c466ee6ea28 \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
index c55ecda..f6a3ecc 100644
--- a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/borders/border-image-scale-transform-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.checksum b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.checksum
new file mode 100755
index 0000000..6425d3b
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.checksum
@@ -0,0 +1 @@
+7c6c657dec6469d268c87aeab34019ab \ No newline at end of file
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.png b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.png
new file mode 100755
index 0000000..34cda43
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.png
Binary files differ
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.txt
new file mode 100755
index 0000000..205bf06
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-expected.txt
@@ -0,0 +1,6 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,10) size 784x580
+ RenderBlock {DIV} at (10,0) size 126x126 [border: (21px none #000000) (30px none #000000) (21px none #000000)]
diff --git a/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-sides-and-corners-expected.txt b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-sides-and-corners-expected.txt
new file mode 100755
index 0000000..2f1f39a
--- /dev/null
+++ b/webkit/data/layout_tests/platform/chromium-win/LayoutTests/fast/gradients/border-image-gradient-sides-and-corners-expected.txt
@@ -0,0 +1,8 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,10) size 784x580
+ RenderBlock {DIV} at (10,0) size 100x100 [bgcolor=#0000FF] [border: (25px solid #000000)]
+ RenderBlock {DIV} at (10,110) size 100x100 [bgcolor=#0000FF] [border: (25px solid #000000)]
+ RenderBlock {DIV} at (10,220) size 100x100 [bgcolor=#0000FF] [border: (25px solid #000000)]
diff --git a/webkit/port/platform/graphics/skia/ImageSkia.cpp b/webkit/port/platform/graphics/skia/ImageSkia.cpp
index 4d3ee12..6314699 100644
--- a/webkit/port/platform/graphics/skia/ImageSkia.cpp
+++ b/webkit/port/platform/graphics/skia/ImageSkia.cpp
@@ -33,6 +33,7 @@
#include "BitmapImage.h"
#include "BitmapImageSingleFrameSkia.h"
#include "ChromiumBridge.h"
+#include "FloatConversion.h"
#include "FloatRect.h"
#include "GraphicsContext.h"
#include "Logging.h"
@@ -371,8 +372,12 @@ void Image::drawPattern(GraphicsContext* context,
// origin of the destination rect, which is what WebKit expects. Skia uses
// the coordinate system origin as the base for the patter. If WebKit wants
// a shifted image, it will shift it from there using the patternTransform.
- matrix.postTranslate(SkFloatToScalar(phase.x()),
- SkFloatToScalar(phase.y()));
+ float adjustedX = phase.x() + floatSrcRect.x() *
+ narrowPrecisionToFloat(patternTransform.a());
+ float adjustedY = phase.y() + floatSrcRect.y() *
+ narrowPrecisionToFloat(patternTransform.d());
+ matrix.postTranslate(SkFloatToScalar(adjustedX),
+ SkFloatToScalar(adjustedY));
shader->setLocalMatrix(matrix);
SkPaint paint;
diff --git a/webkit/tools/layout_tests/test_lists/tests_fixable.txt b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
index 8775a9d..0d8025c 100644
--- a/webkit/tools/layout_tests/test_lists/tests_fixable.txt
+++ b/webkit/tools/layout_tests/test_lists/tests_fixable.txt
@@ -633,8 +633,6 @@ LINUX WIN : LayoutTests/fast/canvas/canvas-text-alignment.html = FAIL
// It looks like the text is the wrong color.
WIN : LayoutTests/fast/canvas/canvas-text-baseline.html = FAIL
LayoutTests/fast/dom/SelectorAPI/NSResolver-exceptions.xhtml = FAIL
-// Linux pixeltest failure: border gradients are improperly offset
-LINUX WIN : LayoutTests/fast/gradients/border-image-gradient.html = FAIL
// Linux pixeltest failure: radial gradients don't have offset focal point
LINUX WIN : LayoutTests/fast/gradients/generated-gradients.html = FAIL
// Linux pixeltest failure: radial gradients don't have offset focal point