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/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index f60e5bb..a652a15 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,5 +1,15 @@
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
to use the old dirty bit optimization (which had been removed), and so it was pathologically slow on large documents.
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);