bidiNext should be split into two separate functions bidiNext has two (mostly unrelated) modes. Either it's walking to the next RenderText, or it's walking to the next RenderInline. This is controlled (confusingly) by the skipInlines bool, which when false, puts it in "walk to inlines" mode. Here are the 7 callsites: InlineIterator.h: o = bidiNext(root, o, resolver, skipInlines); // Just plumbing InlineIterator.h: o = bidiNext(root, o, resolver, skipInlines); // Just plumbing InlineIterator.h: moveTo(bidiNext(m_root, m_obj, resolver), 0); // The normal walk-to-the-next RenderText mode (and the only place that ever notifies the resolver when entering/leaving inlines). InlineIterator.h: obj = bidiNext(m_sor.root(), obj); // Used by InlineBidiIterator, really should just be an InlineIterator.increment() call. RenderBlock.cpp: o = bidiNext(this, o, 0, false, &endOfInline); // Wants all inlines RenderBlockLineLayout.cpp: o = bidiNext(this, o, 0, false, &endOfInline); // Wants all inlines RenderBlockLineLayout.cpp: RenderObject* next = bidiNext(block, o); // Looking for the next RenderText, probably should be an InlineIterator.increment() call. RenderBlockLineLayout.cpp: RenderObject* next = bidiNext(this, o); // Also probably should just be an InlineIterator.
Created attachment 90467 [details] Patch
Comment on attachment 90467 [details] Patch It may make the most sense to wait on landing this patch until after I've posted further re-writes and everyone can see where I'm going. I'm pretty sure that the endOfInline nonsense can be avoided.