[LFC][IFC] InlineFormattingContext::Line should hold the list of runs for the current...
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2018 15:53:53 +0000 (15:53 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Nov 2018 15:53:53 +0000 (15:53 +0000)
commit684b112c9faa76f206e5a1463e7c51a2d577f310
tree391357a43ad73e76839d4f143365913e3e71eae6
parent873f980a5766988057aa51a750116032082357f6
[LFC][IFC] InlineFormattingContext::Line should hold the list of runs for the current line.
https://bugs.webkit.org/show_bug.cgi?id=191845

Reviewed by Antti Koivisto.

Collect the runs in InlineFormattingContext::Line and transfer them to InlineFormattingState during line closing.
(In the most common cases, this is only one extra vector::append() call.)

* layout/inlineformatting/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
(WebCore::Layout::InlineFormattingContext::createFinalRuns const):
(WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
(WebCore::Layout::InlineFormattingContext::closeLine const):
(WebCore::Layout::InlineFormattingContext::appendContentToLine const):
(WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
(WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
(WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const): Deleted.
* layout/inlineformatting/InlineFormattingContext.h:
(WebCore::Layout::InlineFormattingContext::Line::hasContent const):
(WebCore::Layout::InlineFormattingContext::Line::runs):
* layout/inlineformatting/InlineFormattingContextGeometry.cpp:
(WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
(WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
(WebCore::Layout::InlineFormattingContext::Geometry::alignRuns):
* layout/inlineformatting/Line.cpp:
(WebCore::Layout::InlineFormattingContext::Line::init):
(WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
(WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
(WebCore::Layout::InlineFormattingContext::Line::appendContent):
(WebCore::Layout::InlineFormattingContext::Line::close):
(WebCore::Layout::InlineFormattingContext::Line::Line): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238402 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
Source/WebCore/layout/inlineformatting/InlineFormattingContextGeometry.cpp
Source/WebCore/layout/inlineformatting/Line.cpp