Assertion failure (m_nestedIsolateCount >= 1) in BidiResolver::exitIsolate()
https://bugs.webkit.org/show_bug.cgi?id=69267
Reviewed by Eric Seidel.
Source/WebCore:
The failure was caused by our updating bidi resolver's current position in layoutRunsAndFloatsInRange
without updating the number of nested isolated ancestors. Fixed the bug by computing the number of
isolated ancestors when setting a new position to the bidi resolver.
Also renamed the existing BidiResolver::setPosition to setPositionIgnoringNestedIsolates because this
version can be used only when we don't have to update the number of nested isolates.
Tests: fast/text/bidi-isolate-hang-with-neutral-expected.html
fast/text/bidi-isolate-hang-with-neutral.html
fast/text/bidi-isolate-nextlinebreak-failure.html
* platform/graphics/GraphicsContext.cpp:
(WebCore::GraphicsContext::drawBidiText):
* platform/text/BidiResolver.h:
(WebCore::BidiResolver::setPositionIgnoringNestedIsolates):
(WebCore::BidiResolver::setPosition):
* rendering/InlineIterator.h:
(WebCore::numberOfIsolateAncestors): Takes InlineIterator instead of object and root.
(WebCore::InlineBidiResolver::appendRun):
* rendering/RenderBlockLineLayout.cpp:
(WebCore::constructBidiRuns):
(WebCore::RenderBlock::layoutRunsAndFloatsInRange):
(WebCore::RenderBlock::determineStartPosition):
LayoutTests:
Add a regression test for the assertion failure. Also add a regression test for a hang
found by Levi Weintraub and Jeremy Moskovich.
This patch also fixes the assertion failure in fast/block/child-not-removed-from-parent-lineboxes-crash.html
introduced by r101268.
* fast/text/bidi-isolate-hang-with-neutral-expected.html: Added.
* fast/text/bidi-isolate-hang-with-neutral.html: Added.
* fast/text/bidi-isolate-nextlinebreak-failure-expected.txt: Added.
* fast/text/bidi-isolate-nextlinebreak-failure.html: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
10 files changed