Title: [251845] trunk/Source/WebCore
- Revision
- 251845
- Author
- za...@apple.com
- Date
- 2019-10-31 08:07:16 -0700 (Thu, 31 Oct 2019)
Log Message
[LFC][IFC] Line::appendTextContent::willCollapseCompletely should check for isCollapsible()
https://bugs.webkit.org/show_bug.cgi?id=203653
<rdar://problem/56766949>
Reviewed by Antti Koivisto.
When deciding whether the current collapsible whitespace run collapses completely, we need to check whether the previous
run is collapsible and not whether it is collapsed (it addresses the cases when the previous whitespace length is 1, so it is collapsible but not
collapsed -> " " followed by '\n' <- no preserved segment break.)
* layout/inlineformatting/InlineLine.cpp:
(WebCore::Layout::Line::appendTextContent):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (251844 => 251845)
--- trunk/Source/WebCore/ChangeLog 2019-10-31 14:52:05 UTC (rev 251844)
+++ trunk/Source/WebCore/ChangeLog 2019-10-31 15:07:16 UTC (rev 251845)
@@ -1,5 +1,20 @@
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>
+
+ Reviewed by Antti Koivisto.
+
+ When deciding whether the current collapsible whitespace run collapses completely, we need to check whether the previous
+ run is collapsible and not whether it is collapsed (it addresses the cases when the previous whitespace length is 1, so it is collapsible but not
+ collapsed -> " " followed by '\n' <- no preserved segment break.)
+
+ * layout/inlineformatting/InlineLine.cpp:
+ (WebCore::Layout::Line::appendTextContent):
+
+2019-10-31 Zalan Bujtas <za...@apple.com>
+
[LFC][IFC] Add justify expansion information to Display::Runs
https://bugs.webkit.org/show_bug.cgi?id=203535
<rdar://problem/56689268>
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp (251844 => 251845)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-10-31 14:52:05 UTC (rev 251844)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.cpp 2019-10-31 15:07:16 UTC (rev 251845)
@@ -355,7 +355,7 @@
// : "<span> </span> " <- the trailing whitespace collapses completely.
// Not that when the inline container has preserve whitespace style, "<span style="white-space: pre"> </span> " <- this whitespace stays around.
if (run->isText())
- return run->isCollapsed();
+ return run->isCollapsible();
ASSERT(run->isContainerStart() || run->isContainerEnd());
}
return true;
Modified: trunk/Source/WebCore/layout/inlineformatting/InlineLine.h (251844 => 251845)
--- trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-10-31 14:52:05 UTC (rev 251844)
+++ trunk/Source/WebCore/layout/inlineformatting/InlineLine.h 2019-10-31 15:07:16 UTC (rev 251845)
@@ -93,6 +93,7 @@
void setIsCollapsed();
void setCollapsesToZeroAdvanceWidth();
+ bool isCollapsible() const { return m_inlineItem.isText() && downcast<InlineTextItem>(m_inlineItem).isCollapsible(); }
bool isWhitespace() const;
bool canBeExtended() const;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes