Changeset 252543 in webkit
- Timestamp:
- Nov 18, 2019 9:13:51 AM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252542 r252543 1 2019-11-18 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][Invalidation] Do not collect inline items multiple times 4 https://bugs.webkit.org/show_bug.cgi?id=204296 5 <rdar://problem/57283761> 6 7 Reviewed by Antti Koivisto. 8 9 When inline layout is preceded by preferred width computation, we don't need to re-collect the inline items again. 10 11 * layout/inlineformatting/InlineFormattingContext.cpp: 12 (WebCore::Layout::InlineFormattingContext::layoutInFlowContent): 13 (WebCore::Layout::InlineFormattingContext::computedIntrinsicWidthConstraints): 14 (WebCore::Layout::InlineFormattingContext::collectInlineContentIfNeeded): 15 (WebCore::Layout::InlineFormattingContext::collectInlineContent): Deleted. 16 * layout/inlineformatting/InlineFormattingContext.h: 17 1 18 2019-11-18 Philippe Normand <pnormand@igalia.com> 2 19 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r252531 r252543 85 85 } 86 86 87 collectInlineContent ();87 collectInlineContentIfNeeded(); 88 88 lineLayout(usedHorizontalValues); 89 89 LOG_WITH_STREAM(FormattingContextLayout, stream << "[End] -> inline formatting context -> formatting root(" << &root() << ")"); … … 211 211 } 212 212 213 collectInlineContent ();213 collectInlineContentIfNeeded(); 214 214 215 215 auto maximumLineWidth = [&](auto availableWidth) { … … 322 322 } 323 323 324 void InlineFormattingContext::collectInlineContent() 325 { 324 void InlineFormattingContext::collectInlineContentIfNeeded() 325 { 326 auto& formattingState = this->formattingState(); 327 if (!formattingState.inlineItems().isEmpty()) 328 return; 326 329 // Traverse the tree and create inline items out of containers and leaf nodes. This essentially turns the tree inline structure into a flat one. 327 330 // <span>text<span></span><img></span> -> [ContainerStart][InlineBox][ContainerStart][ContainerEnd][InlineBox][ContainerEnd] 328 auto& formattingState = this->formattingState();329 331 LayoutQueue layoutQueue; 330 332 if (root().hasInFlowOrFloatingChild()) -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.h
r252531 r252543 89 89 void computeWidthAndMargin(const Box&, UsedHorizontalValues); 90 90 91 void collectInlineContent ();91 void collectInlineContentIfNeeded(); 92 92 Line::InitialConstraints initialConstraintsForLine(UsedHorizontalValues, const LayoutUnit lineLogicalTop); 93 93 void setDisplayBoxesForLine(const LineLayout::LineContent&, UsedHorizontalValues);
Note: See TracChangeset
for help on using the changeset viewer.