Title: [285160] trunk/Source/WebCore
- Revision
- 285160
- Author
- za...@apple.com
- Date
- 2021-11-02 08:56:29 -0700 (Tue, 02 Nov 2021)
Log Message
[LFC][IFC] Line should keep track of whether the content needs visual reordering
https://bugs.webkit.org/show_bug.cgi?id=232601
Reviewed by Antti Koivisto.
* layout/formattingContexts/inline/InlineLine.cpp:
(WebCore::Layout::Line::initialize):
(WebCore::Layout::Line::append):
* layout/formattingContexts/inline/InlineLine.h:
(WebCore::Layout::Line::contentNeedsBidiReordering const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (285159 => 285160)
--- trunk/Source/WebCore/ChangeLog 2021-11-02 15:42:57 UTC (rev 285159)
+++ trunk/Source/WebCore/ChangeLog 2021-11-02 15:56:29 UTC (rev 285160)
@@ -1,5 +1,18 @@
2021-11-02 Alan Bujtas <za...@apple.com>
+ [LFC][IFC] Line should keep track of whether the content needs visual reordering
+ https://bugs.webkit.org/show_bug.cgi?id=232601
+
+ Reviewed by Antti Koivisto.
+
+ * layout/formattingContexts/inline/InlineLine.cpp:
+ (WebCore::Layout::Line::initialize):
+ (WebCore::Layout::Line::append):
+ * layout/formattingContexts/inline/InlineLine.h:
+ (WebCore::Layout::Line::contentNeedsBidiReordering const):
+
+2021-11-02 Alan Bujtas <za...@apple.com>
+
[LFC][IFC] Pass in the visual order list to display box construction
https://bugs.webkit.org/show_bug.cgi?id=232600
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp (285159 => 285160)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp 2021-11-02 15:42:57 UTC (rev 285159)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp 2021-11-02 15:56:29 UTC (rev 285160)
@@ -55,6 +55,7 @@
m_inlineBoxListWithClonedDecorationEnd.clear();
m_clonedEndDecorationWidthForInlineBoxRuns = { };
m_nonSpanningInlineLevelBoxCount = 0;
+ m_hasNonDefaultBidiLevelRun = false;
m_contentLogicalWidth = { };
m_runs.clear();
resetTrailingContent();
@@ -257,6 +258,7 @@
appendNonReplacedInlineLevelBox(inlineItem, style, logicalWidth);
else
ASSERT_NOT_REACHED();
+ m_hasNonDefaultBidiLevelRun = m_hasNonDefaultBidiLevelRun || inlineItem.bidiLevel() != UBIDI_DEFAULT_LTR;
}
void Line::appendInlineBoxStart(const InlineItem& inlineItem, const RenderStyle& style, InlineLayoutUnit logicalWidth)
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.h (285159 => 285160)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.h 2021-11-02 15:42:57 UTC (rev 285159)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.h 2021-11-02 15:56:29 UTC (rev 285160)
@@ -49,7 +49,7 @@
bool hasContent() const { return !m_runs.isEmpty() && !m_runs.last().isLineSpanningInlineBoxStart(); }
- bool contentNeedsBidiReordering() const { return false; }
+ bool contentNeedsBidiReordering() const { return m_hasNonDefaultBidiLevelRun; }
InlineLayoutUnit contentLogicalWidth() const { return m_contentLogicalWidth; }
InlineLayoutUnit contentLogicalRight() const { return lastRunLogicalRight() + m_clonedEndDecorationWidthForInlineBoxRuns; }
@@ -229,6 +229,7 @@
std::optional<InlineLayoutUnit> m_trailingSoftHyphenWidth { 0 };
InlineBoxListWithClonedDecorationEnd m_inlineBoxListWithClonedDecorationEnd;
InlineLayoutUnit m_clonedEndDecorationWidthForInlineBoxRuns { 0 };
+ bool m_hasNonDefaultBidiLevelRun { false };
};
inline void Line::TrimmableTrailingContent::reset()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes