Changeset 256499 in webkit
- Timestamp:
- Feb 12, 2020 6:47:01 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r256497 r256499 1 2020-02-12 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Remove LineLayoutContext::m_partialTrailingTextItem 4 https://bugs.webkit.org/show_bug.cgi?id=207670 5 <rdar://problem/59405854> 6 7 Reviewed by Antti Koivisto. 8 9 LineBuilder::Run does not hold a reference to these InlineItems anymore. 10 11 * layout/inlineformatting/LineLayoutContext.cpp: 12 (WebCore::Layout::LineLayoutContext::layoutLine): 13 (WebCore::Layout::LineLayoutContext::commitPartialContent): 14 * layout/inlineformatting/LineLayoutContext.h: 15 1 16 2020-02-12 Pavel Feldman <pavel.feldman@gmail.com> 2 17 -
trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.cpp
r256490 r256499 255 255 LineLayoutContext::LineContent LineLayoutContext::layoutLine(LineBuilder& line, const InlineItemRange layoutRange, Optional<unsigned> partialLeadingContentLength) 256 256 { 257 auto reset = [&] { 258 ASSERT(m_floats.isEmpty()); 259 m_partialTrailingTextItem = { }; 260 m_partialLeadingTextItem = { }; 261 }; 262 reset(); 257 ASSERT(m_floats.isEmpty()); 258 m_partialLeadingTextItem = { }; 263 259 auto lineBreaker = LineBreaker { }; 264 260 auto currentItemIndex = layoutRange.start; … … 464 460 if (auto partialRun = partialTrailingContent.partialRun) { 465 461 auto& trailingInlineTextItem = downcast<InlineTextItem>(runs[partialTrailingContent.trailingRunIndex].inlineItem); 466 // FIXME: LineBuilder should not hold on to the InlineItem. 467 ASSERT(!m_partialTrailingTextItem); 468 m_partialTrailingTextItem = trailingInlineTextItem.left(partialRun->length); 469 line.appendPartialTrailingTextItem(*m_partialTrailingTextItem, partialRun->logicalWidth, partialRun->needsHyphen); 462 auto partialTrailingTextItem = trailingInlineTextItem.left(partialRun->length); 463 line.appendPartialTrailingTextItem(partialTrailingTextItem, partialRun->logicalWidth, partialRun->needsHyphen); 470 464 return; 471 465 } -
trunk/Source/WebCore/layout/inlineformatting/LineLayoutContext.h
r256490 r256499 83 83 FloatList m_floats; 84 84 Optional<InlineTextItem> m_partialLeadingTextItem; 85 Optional<InlineTextItem> m_partialTrailingTextItem;86 85 unsigned m_successiveHyphenatedLineCount { 0 }; 87 86 };
Note: See TracChangeset
for help on using the changeset viewer.