Changeset 101556 in webkit
- Timestamp:
- Nov 30, 2011 2:33:20 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r101550 r101556 1 2011-11-29 Ryosuke Niwa <rniwa@webkit.org> 2 3 Assertion failure (m_nestedIsolateCount >= 1) in BidiResolver::exitIsolate() 4 https://bugs.webkit.org/show_bug.cgi?id=69267 5 6 Reviewed by Eric Seidel. 7 8 Add a regression test for the assertion failure. Also add a regression test for a hang 9 found by Levi Weintraub and Jeremy Moskovich. 10 11 This patch also fixes the assertion failure in fast/block/child-not-removed-from-parent-lineboxes-crash.html 12 introduced by r101268. 13 14 * fast/text/bidi-isolate-hang-with-neutral-expected.html: Added. 15 * fast/text/bidi-isolate-hang-with-neutral.html: Added. 16 * fast/text/bidi-isolate-nextlinebreak-failure-expected.txt: Added. 17 * fast/text/bidi-isolate-nextlinebreak-failure.html: Added. 18 1 19 2011-11-30 Tim Horton <timothy_horton@apple.com> 2 20 -
trunk/Source/WebCore/ChangeLog
r101554 r101556 1 2011-11-29 Ryosuke Niwa <rniwa@webkit.org> 2 3 Assertion failure (m_nestedIsolateCount >= 1) in BidiResolver::exitIsolate() 4 https://bugs.webkit.org/show_bug.cgi?id=69267 5 6 Reviewed by Eric Seidel. 7 8 The failure was caused by our updating bidi resolver's current position in layoutRunsAndFloatsInRange 9 without updating the number of nested isolated ancestors. Fixed the bug by computing the number of 10 isolated ancestors when setting a new position to the bidi resolver. 11 12 Also renamed the existing BidiResolver::setPosition to setPositionIgnoringNestedIsolates because this 13 version can be used only when we don't have to update the number of nested isolates. 14 15 Tests: fast/text/bidi-isolate-hang-with-neutral-expected.html 16 fast/text/bidi-isolate-hang-with-neutral.html 17 fast/text/bidi-isolate-nextlinebreak-failure.html 18 19 * platform/graphics/GraphicsContext.cpp: 20 (WebCore::GraphicsContext::drawBidiText): 21 * platform/text/BidiResolver.h: 22 (WebCore::BidiResolver::setPositionIgnoringNestedIsolates): 23 (WebCore::BidiResolver::setPosition): 24 * rendering/InlineIterator.h: 25 (WebCore::numberOfIsolateAncestors): Takes InlineIterator instead of object and root. 26 (WebCore::InlineBidiResolver::appendRun): 27 * rendering/RenderBlockLineLayout.cpp: 28 (WebCore::constructBidiRuns): 29 (WebCore::RenderBlock::layoutRunsAndFloatsInRange): 30 (WebCore::RenderBlock::determineStartPosition): 31 1 32 2011-11-30 Brent Fulgham <bfulgham@webkit.org> 2 33 -
trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp
r98406 r101556 401 401 BidiResolver<TextRunIterator, BidiCharacterRun> bidiResolver; 402 402 bidiResolver.setStatus(BidiStatus(run.direction(), run.directionalOverride())); 403 bidiResolver.setPosition (TextRunIterator(&run, 0));403 bidiResolver.setPositionIgnoringNestedIsolates(TextRunIterator(&run, 0)); 404 404 405 405 // FIXME: This ownership should be reversed. We should pass BidiRunList -
trunk/Source/WebCore/platform/text/BidiResolver.h
r94775 r101556 178 178 179 179 const Iterator& position() const { return m_current; } 180 void setPosition(const Iterator& position) { m_current = position; } 180 void setPositionIgnoringNestedIsolates(const Iterator& position) { m_current = position; } 181 void setPosition(const Iterator& position, unsigned nestedIsolatedCount) 182 { 183 m_current = position; 184 m_nestedIsolateCount = nestedIsolatedCount; 185 } 181 186 182 187 void increment() { m_current.increment(); } -
trunk/Source/WebCore/rendering/InlineIterator.h
r101406 r101556 407 407 } 408 408 409 static inline unsigned numberOfIsolateAncestors(RenderObject* object, RenderObject* root) 410 { 411 ASSERT(object); 409 static inline unsigned numberOfIsolateAncestors(const InlineIterator& iter) 410 { 411 RenderObject* object = iter.object(); 412 if (!object) 413 return 0; 412 414 unsigned count = 0; 413 while (object && object != root) {415 while (object && object != iter.root()) { 414 416 if (isIsolatedInline(object)) 415 417 count++; … … 483 485 // Initialize our state depending on if we're starting in the middle of such an inline. 484 486 // FIXME: Could this initialize from this->inIsolate() instead of walking up the render tree? 485 IsolateTracker isolateTracker(numberOfIsolateAncestors(m_sor .m_obj, m_sor.root()));487 IsolateTracker isolateTracker(numberOfIsolateAncestors(m_sor)); 486 488 int start = m_sor.m_pos; 487 489 RenderObject* obj = m_sor.m_obj; -
trunk/Source/WebCore/rendering/RenderBlockLineLayout.cpp
r101180 r101556 967 967 if (!startObj) 968 968 continue; 969 isolatedResolver.setPosition (InlineIterator(isolatedSpan, startObj, 0));969 isolatedResolver.setPositionIgnoringNestedIsolates(InlineIterator(isolatedSpan, startObj, 0)); 970 970 971 971 // FIXME: isolatedEnd should probably equal end or the last char in isolatedSpan. … … 1217 1217 layoutState.lineInfo().setEmpty(true); 1218 1218 1219 InlineIterator oldEnd = end;1219 const InlineIterator oldEnd = end; 1220 1220 bool isNewUBAParagraph = layoutState.lineInfo().previousLineBrokeCleanly(); 1221 1221 FloatingObject* lastFloatFromPreviousLine = (m_floatingObjects && !m_floatingObjects->set().isEmpty()) ? m_floatingObjects->set().last() : 0; … … 1285 1285 removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldLogicalHeight); 1286 1286 setLogicalHeight(oldLogicalHeight + adjustment); 1287 resolver.setPosition (oldEnd);1287 resolver.setPositionIgnoringNestedIsolates(oldEnd); 1288 1288 end = oldEnd; 1289 1289 continue; … … 1325 1325 1326 1326 lineMidpointState.reset(); 1327 resolver.setPosition(end );1327 resolver.setPosition(end, numberOfIsolateAncestors(end)); 1328 1328 } 1329 1329 } … … 1640 1640 if (last) { 1641 1641 setLogicalHeight(last->lineBottomWithLeading()); 1642 resolver.setPosition(InlineIterator(this, last->lineBreakObj(), last->lineBreakPos())); 1642 InlineIterator iter = InlineIterator(this, last->lineBreakObj(), last->lineBreakPos()); 1643 resolver.setPosition(iter, numberOfIsolateAncestors(iter)); 1643 1644 resolver.setStatus(last->lineBreakBidiStatus()); 1644 1645 } else { … … 1649 1650 } 1650 1651 resolver.setStatus(BidiStatus(direction, style()->unicodeBidi() == Override)); 1651 resolver.setPosition(InlineIterator(this, bidiFirstSkippingEmptyInlines(this, &resolver), 0)); 1652 InlineIterator iter = InlineIterator(this, bidiFirstSkippingEmptyInlines(this, &resolver), 0); 1653 resolver.setPosition(iter, numberOfIsolateAncestors(iter)); 1652 1654 } 1653 1655 return curr;
Note: See TracChangeset
for help on using the changeset viewer.