Changeset 117658 in webkit
- Timestamp:
- May 18, 2012 4:47:08 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r117657 r117658 1 2012-05-18 Eric Seidel <eric@webkit.org> 2 3 Assertion failure in BidiResolver::commitExplicitEmbedding() (!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty()) at wikipedia.org 4 https://bugs.webkit.org/show_bug.cgi?id=76574 5 6 Reviewed by Levi Weintraub. 7 8 * fast/text/bidi-isolate-embedding-crash-expected.txt: Added. 9 * fast/text/bidi-isolate-embedding-crash.html: Added. 10 1 11 2012-05-18 Levi Weintraub <leviw@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r117656 r117658 1 2012-05-18 Eric Seidel <eric@webkit.org> 2 3 Assertion failure in BidiResolver::commitExplicitEmbedding() (!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty()) at wikipedia.org 4 https://bugs.webkit.org/show_bug.cgi?id=76574 5 6 Reviewed by Levi Weintraub. 7 8 Consider this example: 9 <span style="unicode-bidi: embed"><span style="unicode-bidi: isolate">a</span></span> 10 Before this patch, we would ASSERT when computing the text runs, as we would have encountered 11 the "embed LTR" directive from the outer span, but not try to "commit" this embedding until 12 we encountered the first charater (an optimization to avoid creating unnecessary bidi embedding contexts). 13 The ASSERT we were hitting was to ensure that embedding directives inside an isolated span 14 did not bleed out and effect the surrounding text. 15 16 bidi "isolate" support uses a multi-pass Unicode Bidi Algorithm (UBA), which when encountering 17 "isolated" sections of text ignores them in the first pass, and then goes back and runs 18 a separate instance of the UBA on those isolated sections. 19 20 Once we scan into an "isolate" section (during an outer UBA application) we should not respect 21 any embedding directives inside that "isolate" section. 22 23 However, in the above example, our "don't commit embeddings until we need them" and 24 "assert we don't respect embeddings inside isolated spans" were conflicting. 25 The fix is to make sure we always commit any pending embedding directives *before* 26 we enter an isolate section. 27 28 Luckly there was no functional bug here as we were still respecting 29 the embedding directives we were belatedly committing. After this change we're commiting 30 those directives at a more appropriate time, thus avoiding the ASSERT. 31 32 Test: fast/text/bidi-isolate-embedding-crash.html 33 34 * platform/text/BidiResolver.h: 35 (WebCore::::commitExplicitEmbedding): 36 * rendering/InlineIterator.h: 37 (WebCore::notifyObserverEnteredObject): 38 (WebCore::IsolateTracker::commitExplicitEmbedding): 39 1 40 2012-05-18 Pratik Solanki <psolanki@apple.com> 2 41 -
trunk/Source/WebCore/platform/text/BidiResolver.h
r116691 r117658 403 403 bool BidiResolver<Iterator, Run>::commitExplicitEmbedding() 404 404 { 405 // This gets called from bidiFirst when setting up our start position. 406 // FIXME: Re-enable this assert once https://bugs.webkit.org/show_bug.cgi?id=76574 is fixed. 407 // ASSERT(!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty()); 405 // When we're "inIsolate()" we're resolving the parent context which 406 // ignores (skips over) the isolated content, including embedding levels. 407 // We should never accrue embedding levels while skipping over isolated content. 408 ASSERT(!inIsolate() || m_currentExplicitEmbeddingSequence.isEmpty()); 408 409 409 410 using namespace WTF::Unicode; -
trunk/Source/WebCore/rendering/InlineIterator.h
r107000 r117658 133 133 } 134 134 if (isIsolated(unicodeBidi)) { 135 // Make sure that explicit embeddings are committed before we enter the isolated content. 136 observer->commitExplicitEmbedding(); 135 137 observer->enterIsolate(); 136 // Embedding/Override characters implied by dir= are handled when138 // Embedding/Override characters implied by dir= will be handled when 137 139 // we process the isolated span, not when laying out the "parent" run. 138 140 return; … … 452 454 // We don't care if we encounter bidi directional overrides. 453 455 void embed(WTF::Unicode::Direction, BidiEmbeddingSource) { } 456 void commitExplicitEmbedding() { } 454 457 455 458 void addFakeRunIfNecessary(RenderObject* obj, unsigned pos, InlineBidiResolver& resolver)
Note: See TracChangeset
for help on using the changeset viewer.