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):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@7900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/khtml/rendering/bidi.cpp b/WebCore/khtml/rendering/bidi.cpp
index 1edb498..8ec51ba 100644
--- a/WebCore/khtml/rendering/bidi.cpp
+++ b/WebCore/khtml/rendering/bidi.cpp
@@ -1367,6 +1367,8 @@
if (hasTextOverflow)
deleteEllipsisLineBoxes();
+ int oldLineBottom = lastRootBox() ? lastRootBox()->bottomOverflow() : m_height;
+
if (firstChild()) {
// layout replaced elements
bool endOfInline = false;
@@ -1443,10 +1445,9 @@
int endLineYPos;
RootInlineBox* endLine = (fullLayout || !startLine) ?
0 : determineEndPosition(startLine, cleanLineStart, endLineYPos);
-
if (startLine) {
useRepaintRect = true;
- repaintRect.setY(m_height);
+ repaintRect.setY(kMin(m_height, startLine->topOverflow()));
RenderArena* arena = renderArena();
RootInlineBox* box = startLine;
while (box) {
@@ -1585,7 +1586,7 @@
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);