Reviewed by Adam Roben.
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 01:06:27 +0000 (01:06 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 26 Nov 2007 01:06:27 +0000 (01:06 +0000)
        - fix off-center error images

        Covered by many pixel tests with missing images

        * rendering/RenderImage.cpp:
        (WebCore::RenderImage::paint): Account for the 1 pixel outline when
        positioning the error image.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@28025 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/rendering/RenderImage.cpp

index 728d3af9ffcec6b97aec133374bf16c0cad3280c..3ee03ec80d7fa1bb4394bb4118a8fb4f5e8ef450 100644 (file)
@@ -1,3 +1,15 @@
+2007-11-25  Dan Bernstein  <mitz@apple.com>
+
+        Reviewed by Adam Roben.
+
+        - fix off-center error images
+
+        Covered by many pixel tests with missing images
+
+        * rendering/RenderImage.cpp:
+        (WebCore::RenderImage::paint): Account for the 1 pixel outline when
+        positioning the error image.
+
 2007-11-25  Kevin Ollivier  <kevino@theolliviers.com>
 
         wx build fix. Fix filename case for case-sensitive filesystems.
index 30b1cc81607349e9fae1dfa0c1689639880d001a..117a76d58831cba70a092410d68fa744580b0f3d 100644 (file)
@@ -245,8 +245,8 @@ void RenderImage::paint(PaintInfo& paintInfo, int tx, int ty)
                 int centerY = (usableHeight - image()->height()) / 2;
                 if (centerY < 0)
                     centerY = 0;
-                imageX = leftBorder + leftPad + centerX;
-                imageY = topBorder + topPad + centerY;
+                imageX = leftBorder + leftPad + centerX + 1;
+                imageY = topBorder + topPad + centerY + 1;
                 context->drawImage(image(), IntPoint(tx + imageX, ty + imageY));
                 errorPictureDrawn = true;
             }