Use outermost containing isolate when constructing bidi runs
[WebKit-https.git] / Source / WebCore / rendering / RenderBlockLineLayout.cpp
index e1af81fd4108a705a07d6448d4977ba2c9d1df30..86e7e62e1af1efc7d5934cafd2e253a9a1583ba1 100644 (file)
@@ -876,7 +876,9 @@ static inline void constructBidiRunsForSegment(InlineBidiResolver& topResolver,
         // tree to see which parent inline is the isolate. We could change enterIsolate
         // to take a RenderObject and do this logic there, but that would be a layering
         // violation for BidiResolver (which knows nothing about RenderObject).
-        RenderInline* isolatedInline = toRenderInline(containingIsolate(&startObj, currentRoot));
+        RenderInline* isolatedInline = toRenderInline(highestContainingIsolateWithinRoot(&startObj, currentRoot));
+        ASSERT(isolatedInline);
+
         InlineBidiResolver isolatedResolver;
         EUnicodeBidi unicodeBidi = isolatedInline->style().unicodeBidi();
         TextDirection direction;