It calls createBidiRunsForLine for each line. createBidiRunsForLine traverses past the end of the line until it finds the end of the current bidi run. If there is no text in the flow, it never finds anything and traverses the entire flow. This is O(n^2) for the number of renderers in the flow.
Created attachment 327456 [details] patch
Comment on attachment 327456 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=327456&action=review > Source/WebCore/platform/text/BidiResolver.h:248 > + bool needsContinuePastEnd() { return static_cast<DerivedClass&>(*this).needsContinuePastEndInternal(); } make the function const. > Source/WebCore/platform/text/BidiResolver.h:281 > + bool needsContinuePastEndInternal() { return true; } const > Source/WebCore/platform/text/BidiResolver.h:297 > + bool needsContinuePastEndInternal(); const > Source/WebCore/rendering/InlineIterator.h:590 > +inline bool InlineBidiResolver::needsContinuePastEndInternal() const
Created attachment 327466 [details] patch
Comment on attachment 327466 [details] patch Clearing flags on attachment: 327466 Committed r225110: <https://trac.webkit.org/changeset/225110>
All reviewed patches have been landed. Closing bug.
<rdar://problem/35674834>