WebCore:
2008-03-20 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
- fix an assertion failure due to a line being marked dirty during
computeVerticalPositionsForLine() due to temporary box destruction
Test: fast/inline/clean-after-removing-temp-boxes.html
* rendering/RenderText.cpp:
(WebCore::RenderText::setTextWithOffset): Added code to dirty lines
when this method is called on an empty text node, which has no line
boxes.
* rendering/bidi.cpp:
(WebCore::RenderBlock::computeVerticalPositionsForLine): Mark the line
clean in the end.
LayoutTests:
2008-03-20 Dan Bernstein <mitz@apple.com>
Reviewed by Anders Carlsson.
- test for an assertion failure due to a line being marked dirty during
computeVerticalPositionsForLine() due to temporary box destruction
* fast/inline/clean-after-removing-temp-boxes-expected.txt: Added.
* fast/inline/clean-after-removing-temp-boxes.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31206 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/rendering/bidi.cpp b/WebCore/rendering/bidi.cpp
index 3cfc1ef..541037e 100644
--- a/WebCore/rendering/bidi.cpp
+++ b/WebCore/rendering/bidi.cpp
@@ -711,6 +711,9 @@
// to update the static normal flow x/y of positioned elements.
r->m_object->position(r->m_box);
}
+ // Positioned objects and zero-length text nodes destroy their boxes in
+ // position(), which unnecessarily dirties the line.
+ lineBox->markDirty(false);
}
// collects one line of the paragraph and transforms it to visual order