Changeset 246486 in webkit
- Timestamp:
- Jun 16, 2019, 2:04:41 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/inlineformatting/InlineFormattingContextLineLayout.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r246484 r246486 1 2019-06-16 Zalan Bujtas <zalan@apple.com> 2 3 Address Sam's post-landing review of r246234. 4 5 * layout/inlineformatting/InlineFormattingContextLineLayout.cpp: 6 (WebCore::Layout::InlineFormattingContext::LineLayout::createDisplayRuns const): 7 1 8 2019-06-16 Zalan Bujtas <zalan@apple.com> 2 9 -
trunk/Source/WebCore/layout/inlineformatting/InlineFormattingContextLineLayout.cpp
r246484 r246486 315 315 if (lineContent.isEmpty()) { 316 316 // Spec tells us to create a zero height, empty line box. 317 auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0 , 0 };318 m_formattingState.addLineBox({ lineBox , lineContent.baseline(), lineContent.baselineOffset() });317 auto lineBoxRect = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0 , 0 }; 318 m_formattingState.addLineBox({ lineBoxRect, lineContent.baseline(), lineContent.baselineOffset() }); 319 319 return; 320 320 } … … 326 326 327 327 // Ignore the initial strut. 328 auto lineBox = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()};328 auto lineBoxRect = Display::Rect { lineContent.logicalTop(), lineContent.logicalLeft(), 0, lineContent.logicalHeight()}; 329 329 // Create final display runs. 330 330 auto& lineRuns = lineContent.runs(); … … 351 351 topLeft += Geometry::inFlowPositionedPositionOffset(layoutState(), layoutBox); 352 352 displayBox.setTopLeft(topLeft); 353 lineBox .expandHorizontally(logicalRect.width());353 lineBoxRect.expandHorizontally(logicalRect.width()); 354 354 m_formattingState.addInlineRun(std::make_unique<Display::Run>(logicalRect)); 355 355 continue; … … 359 359 if (inlineItem.isContainerStart()) { 360 360 displayBox.setTopLeft(logicalRect.topLeft()); 361 lineBox .expandHorizontally(logicalRect.width());361 lineBoxRect.expandHorizontally(logicalRect.width()); 362 362 continue; 363 363 } … … 375 375 displayBox.setContentBoxWidth(contentBoxWidth); 376 376 displayBox.setContentBoxHeight(logicalRect.height()); 377 lineBox .expandHorizontally(logicalRect.width());377 lineBoxRect.expandHorizontally(logicalRect.width()); 378 378 continue; 379 379 } … … 392 392 lastDisplayRun->textContext()->expand(lineRun->textContext->length); 393 393 } 394 lineBox .expandHorizontally(logicalRect.width());394 lineBoxRect.expandHorizontally(logicalRect.width()); 395 395 } 396 396 // FIXME take content breaking into account when part of the layout box is on the previous line. … … 407 407 } 408 408 // FIXME linebox needs to be ajusted after content alignment. 409 m_formattingState.addLineBox({ lineBox , lineContent.baseline(), lineContent.baselineOffset() });409 m_formattingState.addLineBox({ lineBoxRect, lineContent.baseline(), lineContent.baselineOffset() }); 410 410 alignRuns(m_formattingRoot.style().textAlign(), previousLineLastRunIndex.valueOr(-1) + 1, widthConstraint - lineContent.logicalWidth()); 411 411 }
Note:
See TracChangeset
for help on using the changeset viewer.