This is in preparation to make FlowContents as iterator class.
Created attachment 245112 [details] WIP patch.
Created attachment 245183 [details] Patch
Created attachment 245198 [details] Patch
Comment on attachment 245198 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=245198&action=review > Source/WebCore/rendering/SimpleLineLayout.cpp:334 > + // Remove collapsed whitespace, or non-collapsed pre-wrap whitepsace, unless it's the only content on the line -so removing the whitesapce would produce an empty line. > + if (!(style.collapseWhitespace || (preWrap(style) && !lineState.hasWhitespaceOnly()))) This is bit difficult to read with all the !s. Maybe have a sensibly named boolean helper? > Source/WebCore/rendering/SimpleLineLayout.cpp:385 > + if (overflowedFragment.isEmpty()) { > unsigned spaceCount = 0; > - lineState.jumpTo(flowContents.style().collapseWhitespace ? flowContents.findNextNonWhitespacePosition(previousLine.position, spaceCount) : previousLine.position, 0); > + lineState.jumpTo(style.collapseWhitespace ? flowContents.findNextNonWhitespacePosition(linePositon, spaceCount) : linePositon, 0); > + } else if (lineState.fits(overflowedFragment.width)) > + lineState.addUncommitted(overflowedFragment); > + else { > + // Start over with this fragment. > + lineState.jumpTo(overflowedFragment.start, 0); > } > return lineState; This would read better with early returns. No need for else branches.
Created attachment 245200 [details] Patch
Comment on attachment 245200 [details] Patch Clearing flags on attachment: 245200 Committed r178983: <http://trac.webkit.org/changeset/178983>
All reviewed patches have been landed. Closing bug.