Title: [253204] trunk/Source/WebCore
- Revision
- 253204
- Author
- [email protected]
- Date
- 2019-12-06 06:34:22 -0800 (Fri, 06 Dec 2019)
Log Message
[LFC][Integration] Support isLineBreak() in iterator
https://bugs.webkit.org/show_bug.cgi?id=204941
Reviewed by Zalan Bujtas.
* layout/displaytree/DisplayRun.h:
(WebCore::Display::Run::isLineBreak const):
* rendering/line/LineLayoutTraversalDisplayRunPath.h:
(WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
(WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):
Also remove unneeded skipping of runs without text context. All runs generated from text nodes now have them.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (253203 => 253204)
--- trunk/Source/WebCore/ChangeLog 2019-12-06 09:25:22 UTC (rev 253203)
+++ trunk/Source/WebCore/ChangeLog 2019-12-06 14:34:22 UTC (rev 253204)
@@ -1,3 +1,18 @@
+2019-12-06 Antti Koivisto <[email protected]>
+
+ [LFC][Integration] Support isLineBreak() in iterator
+ https://bugs.webkit.org/show_bug.cgi?id=204941
+
+ Reviewed by Zalan Bujtas.
+
+ * layout/displaytree/DisplayRun.h:
+ (WebCore::Display::Run::isLineBreak const):
+ * rendering/line/LineLayoutTraversalDisplayRunPath.h:
+ (WebCore::LineLayoutTraversal::DisplayRunPath::isLineBreak const):
+ (WebCore::LineLayoutTraversal::DisplayRunPath::traverseNextTextBoxInVisualOrder):
+
+ Also remove unneeded skipping of runs without text context. All runs generated from text nodes now have them.
+
2019-12-05 Zalan Bujtas <[email protected]>
[LFC][IFC] Fix css1/basic/containment.html
Modified: trunk/Source/WebCore/layout/displaytree/DisplayRun.h (253203 => 253204)
--- trunk/Source/WebCore/layout/displaytree/DisplayRun.h 2019-12-06 09:25:22 UTC (rev 253203)
+++ trunk/Source/WebCore/layout/displaytree/DisplayRun.h 2019-12-06 14:34:22 UTC (rev 253204)
@@ -98,6 +98,8 @@
void setImage(CachedImage& image) { m_cachedImage = ℑ }
CachedImage* image() const { return m_cachedImage; }
+ bool isLineBreak() const { return layoutBox().isLineBreakBox() || (textContext() && textContext()->content() == "\n" && style().preserveNewline()); }
+
const Layout::Box& layoutBox() const { return *m_layoutBox; }
const RenderStyle& style() const { return m_layoutBox->style(); }
Modified: trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h (253203 => 253204)
--- trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h 2019-12-06 09:25:22 UTC (rev 253203)
+++ trunk/Source/WebCore/rendering/line/LineLayoutTraversalDisplayRunPath.h 2019-12-06 14:34:22 UTC (rev 253204)
@@ -61,7 +61,7 @@
bool isLeftToRightDirection() const { return true; }
bool dirOverride() const { return false; }
- bool isLineBreak() const { return false; } // FIXME: Implement.
+ bool isLineBreak() const { return run().isLineBreak(); }
bool hasHyphen() const { return false; } // FIXME: Implement.
StringView text() const { return run().textContext()->content(); }
@@ -85,8 +85,6 @@
{
ASSERT(!atEnd());
++m_runIndex;
- while (!atEnd() && !run().textContext())
- ++m_runIndex;
}
void traverseNextTextBoxInTextOrder() { traverseNextTextBoxInVisualOrder(); }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes