Fix for 3948123, rolling over link erases nearby text. The repaint rect check for...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jan 2005 23:08:50 +0000 (23:08 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 18 Jan 2005 23:08:50 +0000 (23:08 +0000)
two lines overlapped.

        Reviewed by kocienda

        * khtml/rendering/render_flow.cpp:
        (RenderFlow::paintLines):

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

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

index 6460656a3db36fff43d651f7d0f1607f23d58db9..0ad9cc42837357197d5d40b8a880a1888d27abe0 100644 (file)
@@ -1,3 +1,13 @@
+2005-01-18  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3948123, rolling over link erases nearby text.  The repaint rect check for lines was wrong whenever
+       two lines overlapped.
+       
+        Reviewed by kocienda
+
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::paintLines):
+
 2005-01-18  Ken Kocienda  <kocienda@apple.com>
 
         Reviewed by Hyatt
index bd6473fbf0a1cf3773a9ca423226eaf83ef575f8..935547613c25c5c1761506ba74bf78cc60928545 100644 (file)
@@ -384,8 +384,10 @@ void RenderFlow::paintLines(PaintInfo& i, int _tx, int _ty)
             }
         }
 
-        yPos = _ty + curr->root()->selectionTop() - maximalOutlineSize(i.phase);
-        h = curr->root()->selectionHeight() + 2 * maximalOutlineSize(i.phase);
+        int top = kMin(curr->root()->topOverflow(), curr->root()->selectionTop()) - maximalOutlineSize(i.phase);
+        int bottom = kMax(curr->root()->selectionTop() + curr->root()->selectionHeight(), curr->root()->bottomOverflow()) + maximalOutlineSize(i.phase);
+        h = bottom - top;
+        yPos = _ty + top;
         if ((yPos < i.r.y() + i.r.height()) && (yPos + h > i.r.y()))
             curr->paint(i, _tx, _ty);
     }