Use the sibling limit to decide whether to create layout for whitespace
Text::textLayoutObjectIsNeeded is an optimization which avoids creating layout objects for whitespace text nodes. However LayoutTreeBuilderTraversal::nextSiblingLayoutObject traverses all siblings. For long lists of N space-separated siblings, this degenerates into an N^2 DOM walk. Oops. Text::textLayoutObjectIsNeeded already has a sibling limit; this passes the limit through to prevSiblingLayoutObject/nextSiblingLayoutObject. BUG=650938 Review-Url: https://codereview.chromium.org/2379483002 Cr-Commit-Position: refs/heads/master@{#422631}
Showing
Please register or sign in to comment