Changeset 247151 in webkit
- Timestamp:
- Jul 5, 2019 7:02:22 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r247149 r247151 1 2019-07-05 Zalan Bujtas <zalan@apple.com> 2 3 [LFC][IFC] Empty text node should generate empty InlineTextItem 4 https://bugs.webkit.org/show_bug.cgi?id=199495 5 <rdar://problem/52643225> 6 7 Reviewed by Antti Koivisto. 8 9 Empty text nodes generate empty RenderText renderers but they don't generate inline boxes. 10 This patch aligns LFC with the current rendering code. 11 12 * layout/inlineformatting/InlineLine.cpp: 13 (WebCore::Layout::Line::appendTextContent): 14 * layout/inlineformatting/InlineTextItem.cpp: 15 (WebCore::Layout::InlineTextItem::createAndAppendTextItems): 16 1 17 2019-07-05 Adrian Perez de Castro <aperez@igalia.com> 2 18 -
trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp
r246719 r247151 237 237 238 238 auto shouldCollapseCompletely = [&] { 239 // Empty run. 240 if (!inlineItem.length()) { 241 ASSERT(!logicalWidth); 242 return true; 243 } 239 244 if (!isTrimmable) 240 245 return false; -
trunk/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp
r245812 r247151 89 89 void InlineTextItem::createAndAppendTextItems(InlineItems& inlineContent, const InlineBox& inlineBox) 90 90 { 91 auto text = inlineBox.textContent(); 92 if (!text.length()) 93 return inlineContent.append(std::make_unique<InlineTextItem>(inlineBox, 0, 0, false, false)); 94 91 95 auto& style = inlineBox.style(); 92 96 auto preserveNewline = style.preserveNewline(); 93 97 auto collapseWhiteSpace = style.collapseWhiteSpace(); 94 auto text = inlineBox.textContent();95 98 LazyLineBreakIterator lineBreakIterator(text); 96 97 99 unsigned currentPosition = 0; 98 100 while (currentPosition < text.length()) {
Note: See TracChangeset
for help on using the changeset viewer.