Changeset 283442 in webkit
- Timestamp:
- Oct 2, 2021, 6:51:47 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
layout/formattingContexts/inline/InlineLineBuilder.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r283441 r283442 1 2021-10-02 Alan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Pass in the correct style when adding a run to Line 4 https://bugs.webkit.org/show_bug.cgi?id=231100 5 6 Reviewed by Antti Koivisto. 7 8 This is in preparation for supporting first-line style. 9 10 * layout/formattingContexts/inline/InlineLineBuilder.cpp: 11 (WebCore::Layout::LineCandidate::InlineContent::appendInlineItem): 12 (WebCore::Layout::LineBuilder::handleInlineContent): 13 (WebCore::Layout::LineBuilder::commitPartialContent): 14 (WebCore::Layout::LineBuilder::rebuildLine): 15 1 16 2021-10-02 Cathie Chen <cathiechen@igalia.com> 2 17 -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp
r283440 r283442 190 190 if (m_ignoreTrailingLetterSpacing) 191 191 return { }; 192 auto letterSpacing = inlineItem.style().letterSpacing();192 auto letterSpacing = style.letterSpacing(); 193 193 if (letterSpacing <= 0) 194 194 return { }; … … 706 706 m_lineLogicalRect = lineLogicalRectForCandidateContent; 707 707 for (auto& run : candidateRuns) 708 m_line.append(run.inlineItem, run. inlineItem.style(), run.logicalWidth);708 m_line.append(run.inlineItem, run.style, run.logicalWidth); 709 709 if (lineCandidate.inlineContent.hasTrailingSoftWrapOpportunity()) { 710 710 // Check if we are allowed to wrap at this position. … … 805 805 } 806 806 // The partial run is the last content to commit. 807 m_line.append(run.inlineItem, run. inlineItem.style(), run.logicalWidth);807 m_line.append(run.inlineItem, run.style, run.logicalWidth); 808 808 return; 809 809 } 810 m_line.append(run.inlineItem, run. inlineItem.style(), run.logicalWidth);810 m_line.append(run.inlineItem, run.style, run.logicalWidth); 811 811 } 812 812 } … … 827 827 for (; currentItemIndex < layoutRange.end; ++currentItemIndex) { 828 828 auto& inlineItem = m_inlineItems[currentItemIndex]; 829 m_line.append(inlineItem, inlineItem.style(), inlineItemWidth(inlineItem, m_line.contentLogicalRight())); 829 auto& style = m_isFirstLine ? inlineItem.firstLineStyle() : inlineItem.style(); 830 m_line.append(inlineItem, style, inlineItemWidth(inlineItem, m_line.contentLogicalRight())); 830 831 if (&inlineItem == &lastInlineItemToAdd) 831 832 return currentItemIndex - layoutRange.start + 1;
Note:
See TracChangeset
for help on using the changeset viewer.