Fix for 3848214, deleting a partial word left a repaint artifact if the partial...
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Oct 2004 21:08:41 +0000 (21:08 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Oct 2004 21:08:41 +0000 (21:08 +0000)
the previous line.

        Reviewed by kocienda

        * khtml/rendering/bidi.cpp:
        (khtml::RenderBlock::layoutInlineChildren):

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

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

index f60e5bbad303c7a0ab8ad12d3b1988b41a0faef5..a652a1581ec1bb70a984518ec29b13cfb19138b8 100644 (file)
@@ -1,3 +1,13 @@
+2004-10-26  David Hyatt  <hyatt@apple.com>
+
+       Fix for 3848214, deleting a partial word left a repaint artifact if the partial word was pulled back onto
+       the previous line.
+       
+        Reviewed by kocienda
+
+        * khtml/rendering/bidi.cpp:
+        (khtml::RenderBlock::layoutInlineChildren):
+
 2004-10-26  David Hyatt  <hyatt@apple.com>
 
        Convert selectionRect() from using a list to a dict and patch it to be like setSelection.  It was still trying
 2004-10-26  David Hyatt  <hyatt@apple.com>
 
        Convert selectionRect() from using a list to a dict and patch it to be like setSelection.  It was still trying
index 1edb498bab2290944af852804ef382e1e8429202..8ec51ba40d31425f6a5470b147d883537807b57b 100644 (file)
@@ -1367,6 +1367,8 @@ QRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
     if (hasTextOverflow)
          deleteEllipsisLineBoxes();
 
     if (hasTextOverflow)
          deleteEllipsisLineBoxes();
 
+    int oldLineBottom = lastRootBox() ? lastRootBox()->bottomOverflow() : m_height;
+    
     if (firstChild()) {
         // layout replaced elements
         bool endOfInline = false;
     if (firstChild()) {
         // layout replaced elements
         bool endOfInline = false;
@@ -1443,10 +1445,9 @@ QRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
         int endLineYPos;
         RootInlineBox* endLine = (fullLayout || !startLine) ? 
                                  0 : determineEndPosition(startLine, cleanLineStart, endLineYPos);
         int endLineYPos;
         RootInlineBox* endLine = (fullLayout || !startLine) ? 
                                  0 : determineEndPosition(startLine, cleanLineStart, endLineYPos);
-        
         if (startLine) {
             useRepaintRect = true;
         if (startLine) {
             useRepaintRect = true;
-            repaintRect.setY(m_height);
+            repaintRect.setY(kMin(m_height, startLine->topOverflow()));
             RenderArena* arena = renderArena();
             RootInlineBox* box = startLine;
             while (box) {
             RenderArena* arena = renderArena();
             RootInlineBox* box = startLine;
             while (box) {
@@ -1585,7 +1586,7 @@ QRect RenderBlock::layoutInlineChildren(bool relayoutChildren)
     if (useRepaintRect) {
         repaintRect.setWidth(kMax((int)m_width, m_overflowWidth));
         if (repaintRect.height() == 0)
     if (useRepaintRect) {
         repaintRect.setWidth(kMax((int)m_width, m_overflowWidth));
         if (repaintRect.height() == 0)
-            repaintRect.setHeight(m_overflowHeight - repaintRect.y());
+            repaintRect.setHeight(kMax(oldLineBottom, m_overflowHeight) - repaintRect.y());
     }
     
     setLinesAppended(false);
     }
     
     setLinesAppended(false);