Changeset 252810 in webkit
- Timestamp:
- Nov 22, 2019 3:30:43 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r252808 r252810 1 2019-11-22 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Merge "insert inline runs" and "setup display runs" loops in InlineFormattingContext::setDisplayBoxesForLine 4 https://bugs.webkit.org/show_bug.cgi?id=204537 5 <rdar://problem/57440394> 6 7 Reviewed by Antti Koivisto. 8 9 Let's loop the new Line::Run list only once. 10 11 * layout/inlineformatting/InlineFormattingContext.cpp: 12 (WebCore::Layout::InlineFormattingContext::setDisplayBoxesForLine): 13 1 14 2019-11-22 Chris Dumez <cdumez@apple.com> 2 15 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContext.cpp
r252543 r252810 428 428 } 429 429 430 // Add final display runs to state.431 430 formattingState.addLineBox(lineContent.lineBox); 432 // FIXME: This is tempoary.433 431 auto& currentLine = *formattingState.lineBoxes().last(); 434 for (auto& lineRun : lineContent.runList) {435 // Inline level containers (<span>) don't generate display runs.436 if (lineRun.isContainerStart() || lineRun.isContainerEnd())437 continue;438 // Completely collapsed line runs don't generate display runs either.439 if (lineRun.isCollapsedToVisuallyEmpty())440 continue;441 formattingState.addInlineRun(makeUnique<Display::Run>(lineRun.layoutBox().style(), lineRun.logicalRect(), lineRun.textContext()), currentLine);442 }443 444 432 // Compute box final geometry. 445 433 auto& lineRuns = lineContent.runList; … … 449 437 auto& layoutBox = lineRun.layoutBox(); 450 438 auto& displayBox = formattingState.displayBox(layoutBox); 439 440 // Add final display runs to state first. 441 // Inline level containers (<span>) don't generate display runs and neither do completely collapsed runs. 442 auto initiatesInlineRun = !lineRun.isContainerStart() && !lineRun.isContainerEnd() && !lineRun.isCollapsedToVisuallyEmpty(); 443 if (initiatesInlineRun) 444 formattingState.addInlineRun(makeUnique<Display::Run>(lineRun.layoutBox().style(), lineRun.logicalRect(), lineRun.textContext()), currentLine); 451 445 452 446 if (lineRun.isForcedLineBreak()) {
Note: See TracChangeset
for help on using the changeset viewer.