WebKit Bugzilla
Attachment 373461 Details for
Bug 199495
: [LFC][IFC] Empty text node should generate empty InlineTextItem
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199495-20190704062410.patch (text/plain), 2.82 KB, created by
zalan
on 2019-07-04 06:24:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
zalan
Created:
2019-07-04 06:24:15 PDT
Size:
2.82 KB
patch
obsolete
>Subversion Revision: 247085 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3df5f88decfe9ab63edfb3c637070825a1669b52..fd30926cfe9a7d6c81a4c10dd038e18b7deba824 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-07-04 Zalan Bujtas <zalan@apple.com> >+ >+ [LFC][IFC] Empty text node should generate empty InlineTextItem >+ https://bugs.webkit.org/show_bug.cgi?id=199495 >+ <rdar://problem/52643225> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Empty text nodes generate empty RenderText renderers but they don't generate inline boxes. >+ This patch aligns LFC with the current rendering code. >+ >+ * layout/inlineformatting/InlineLine.cpp: >+ (WebCore::Layout::Line::appendTextContent): >+ * layout/inlineformatting/InlineTextItem.cpp: >+ (WebCore::Layout::InlineTextItem::createAndAppendTextItems): >+ > 2019-07-02 Said Abou-Hallawa <sabouhallawa@apple.com> > > Assertion fires when animating the 'class' attribute of an SVG element >diff --git a/Source/WebCore/layout/inlineformatting/InlineLine.cpp b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >index 87ca42163daad4f32b034ea86eaf4bdfd668c869..58170cc62731b57175fbb08370c977a7a9a9f210 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineLine.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineLine.cpp >@@ -236,6 +236,11 @@ void Line::appendTextContent(const InlineTextItem& inlineItem, LayoutUnit logica > m_trimmableContent.clear(); > > auto shouldCollapseCompletely = [&] { >+ // Empty run. >+ if (!inlineItem.length()) { >+ ASSERT(!logicalWidth); >+ return true; >+ } > if (!isTrimmable) > return false; > // Leading whitespace. >diff --git a/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp b/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp >index 6e2a8fa89c99ca26520c221a6780b5d2ea01da97..f9eef4782af78395cc342e4388bd76e527d9f818 100644 >--- a/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp >+++ b/Source/WebCore/layout/inlineformatting/InlineTextItem.cpp >@@ -88,12 +88,14 @@ static unsigned moveToNextBreakablePosition(unsigned startPosition, LazyLineBrea > > void InlineTextItem::createAndAppendTextItems(InlineItems& inlineContent, const InlineBox& inlineBox) > { >+ auto text = inlineBox.textContent(); >+ if (!text.length()) >+ return inlineContent.append(std::make_unique<InlineTextItem>(inlineBox, 0, 0, false, false)); >+ > auto& style = inlineBox.style(); > auto preserveNewline = style.preserveNewline(); > auto collapseWhiteSpace = style.collapseWhiteSpace(); >- auto text = inlineBox.textContent(); > LazyLineBreakIterator lineBreakIterator(text); >- > unsigned currentPosition = 0; > while (currentPosition < text.length()) { > // Soft linebreak?
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199495
: 373461