Fix for 3685234 and 3548444, the x-offset for frame borders was off by 1 pixel,...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2004 00:27:44 +0000 (00:27 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Sep 2004 00:27:44 +0000 (00:27 +0000)
repainting happened.

        * khtml/rendering/render_canvas.cpp:
        (RenderCanvas::repaintViewRectangle):

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

WebCore/ChangeLog-2005-08-23
WebCore/khtml/rendering/render_canvas.cpp

index fb4d2b854429c500534f0be76123dee9393cdc4b..167ceb328a07cd889a3b00d29acf37a153988d17 100644 (file)
@@ -1,3 +1,11 @@
+2004-09-23  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3685234 and 3548444, the x-offset for frame borders was off by 1 pixel, causing mojibake to occur when
+       repainting happened.
+
+        * khtml/rendering/render_canvas.cpp:
+        (RenderCanvas::repaintViewRectangle):
+
 2004-09-23  Richard Williamson   <rjw@apple.com>
 
        Fixed <rdar://problem/3813271> dashboard-region-circle and dashboard-region-rectangle should be collapsed into dashboard-region
index 4164238e71d7ea3831c56ad346a59bcbdaf59377..afe8d2b06d7120e18e9030eeab6e9d778b898130 100644 (file)
@@ -268,11 +268,12 @@ void RenderCanvas::repaintViewRectangle(const QRect& ur, bool immediate)
             // rectangle.
             r.setX(r.x() - m_view->contentsX());
             r.setY(r.y() - m_view->contentsY());
-            
+
             RenderObject* obj = elt->renderer();
-            int frameOffset = (m_view->frameStyle() != QFrame::NoFrame) ? 2 : 0;
-            r.setX(r.x() + obj->borderLeft()+obj->paddingLeft() + frameOffset);
-            r.setY(r.y() + obj->borderTop()+obj->paddingTop() + frameOffset);
+            int yFrameOffset = (m_view->frameStyle() != QFrame::NoFrame) ? 2 : 0;
+            int xFrameOffset = (m_view->frameStyle() != QFrame::NoFrame) ? 1 : 0;
+            r.setX(r.x() + obj->borderLeft()+obj->paddingLeft() + xFrameOffset);
+            r.setY(r.y() + obj->borderTop()+obj->paddingTop() + yFrameOffset);
             obj->repaintRectangle(r, immediate);
         }
     }