Changeset 283314 in webkit
- Timestamp:
- Sep 30, 2021, 8:43:13 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
layout/formattingContexts/inline/InlineLineBox.cpp (modified) (1 diff)
-
layout/formattingContexts/inline/InlineLineBox.h (modified) (1 diff)
-
layout/formattingContexts/inline/InlineLineBoxBuilder.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r283313 r283314 1 2021-09-30 Alan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] RootInlineBox should use the first-line style when applicable 4 https://bugs.webkit.org/show_bug.cgi?id=231003 5 6 Reviewed by Antti Koivisto. 7 8 This is in preparation for supporting first-line style. 9 10 * layout/formattingContexts/inline/InlineLineBox.cpp: 11 (WebCore::Layout::LineBox::LineBox): 12 * layout/formattingContexts/inline/InlineLineBox.h: 13 * layout/formattingContexts/inline/InlineLineBoxBuilder.cpp: 14 (WebCore::Layout::LineBoxBuilder::build): 15 1 16 2021-09-30 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.cpp
r283042 r283314 35 35 namespace Layout { 36 36 37 LineBox::LineBox(const Box& rootLayoutBox, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit contentLogicalWidth, size_t nonSpanningInlineLevelBoxCount)38 : m_rootInlineBox(rootLayoutBox, rootLayoutBox.style(), contentLogicalLeft, InlineLayoutSize { contentLogicalWidth, { } }, InlineLevelBox::Type::RootInlineBox)37 LineBox::LineBox(const Box& rootLayoutBox, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit contentLogicalWidth, size_t lineIndex, size_t nonSpanningInlineLevelBoxCount) 38 : m_rootInlineBox(rootLayoutBox, !lineIndex ? rootLayoutBox.firstLineStyle() : rootLayoutBox.style(), contentLogicalLeft, InlineLayoutSize { contentLogicalWidth, { } }, InlineLevelBox::Type::RootInlineBox) 39 39 { 40 40 m_nonRootInlineLevelBoxList.reserveInitialCapacity(nonSpanningInlineLevelBoxCount); -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBox.h
r283158 r283314 60 60 WTF_MAKE_FAST_ALLOCATED; 61 61 public: 62 LineBox(const Box& rootLayoutBox, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit contentLogicalWidth, size_t nonSpanningInlineLevelBoxCount);62 LineBox(const Box& rootLayoutBox, InlineLayoutUnit contentLogicalLeft, InlineLayoutUnit contentLogicalWidth, size_t lineIndex, size_t nonSpanningInlineLevelBoxCount); 63 63 64 64 // Note that the line can have many inline boxes and be "empty" the same time e.g. <div><span></span><span></span></div> -
trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBoxBuilder.cpp
r283260 r283314 116 116 auto textAlign = !lineIndex ? rootBox().firstLineStyle().textAlign() : rootBox().style().textAlign(); 117 117 auto contentLogicalLeft = Layout::horizontalAlignmentOffset(runs, textAlign, lineContent.lineLogicalWidth, contentLogicalWidth, lineContent.isLastLineWithInlineContent).value_or(InlineLayoutUnit { }); 118 auto lineBox = LineBox { rootBox(), contentLogicalLeft, contentLogicalWidth, line Content.nonSpanningInlineLevelBoxCount };118 auto lineBox = LineBox { rootBox(), contentLogicalLeft, contentLogicalWidth, lineIndex, lineContent.nonSpanningInlineLevelBoxCount }; 119 119 120 120 auto lineBoxLogicalHeight = constructAndAlignInlineLevelBoxes(lineBox, runs, lineIndex);
Note:
See TracChangeset
for help on using the changeset viewer.