Title: [251846] trunk/Source/WebCore
- Revision
- 251846
- Author
- za...@apple.com
- Date
- 2019-10-31 08:16:42 -0700 (Thu, 31 Oct 2019)
Log Message
[LFC][IFC] Set setIsCollapsed on the line item when its content is actually collapsed
https://bugs.webkit.org/show_bug.cgi?id=203655
<rdar://problem/56767543>
Reviewed by Antti Koivisto.
Do not set the isCollapsed flag on the line run unless we actually collapsed it (changed its length from greated than 1 to 1).
* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::appendTextContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (251845 => 251846)
--- trunk/Source/WebCore/ChangeLog 2019-10-31 15:07:16 UTC (rev 251845)
+++ trunk/Source/WebCore/ChangeLog 2019-10-31 15:16:42 UTC (rev 251846)
@@ -1,5 +1,18 @@
2019-10-31 Zalan Bujtas <za...@apple.com>
+ [LFC][IFC] Set setIsCollapsed on the line item when its content is actually collapsed
+ https://bugs.webkit.org/show_bug.cgi?id=203655
+ <rdar://problem/56767543>
+
+ Reviewed by Antti Koivisto.
+
+ Do not set the isCollapsed flag on the line run unless we actually collapsed it (changed its length from greated than 1 to 1).
+
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::appendTextContent):
+
+2019-10-31 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Line::appendTextContent::willCollapseCompletely should check for isCollapsible()
https://bugs.webkit.org/show_bug.cgi?id=203653
<rdar://problem/56766949>
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (251845 => 251846)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-10-31 15:07:16 UTC (rev 251845)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-10-31 15:16:42 UTC (rev 251846)
@@ -369,9 +369,9 @@
logicalRect.setHeight(inlineItemContentHeight(inlineItem));
}
- auto collapseRun = inlineItem.isCollapsible();
+ auto collapsedRun = inlineItem.isCollapsible() && inlineItem.length() > 1;
auto contentStart = inlineItem.start();
- auto contentLength = collapseRun ? 1 : inlineItem.length();
+ auto contentLength = collapsedRun ? 1 : inlineItem.length();
auto textContent = inlineItem.layoutBox().textContent().substring(contentStart, contentLength);
auto lineRun = makeUnique<Run>(inlineItem, Display::Run { inlineItem.style(), logicalRect, Display::Run::TextContext { contentStart, contentLength, textContent } });
@@ -378,7 +378,7 @@
auto collapsesToZeroAdvanceWidth = willCollapseCompletely();
if (collapsesToZeroAdvanceWidth)
lineRun->setCollapsesToZeroAdvanceWidth();
- else if (collapseRun)
+ else if (collapsedRun)
lineRun->setIsCollapsed();
if (isTrimmable)
m_trimmableContent.add(lineRun.get());
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes