Title: [288326] trunk/Source/WebCore
- Revision
- 288326
- Author
- [email protected]
- Date
- 2022-01-20 14:32:57 -0800 (Thu, 20 Jan 2022)
Log Message
[LFC][IFC] Add "previous line ends with a line break" flag to PreviousLine
https://bugs.webkit.org/show_bug.cgi?id=235405
Reviewed by Antti Koivisto.
This is in preparation for supporting unicode-bidi: plaintext where we need to know if the previous line ends in a line break or not.
* layout/formattingContexts/inline/InlineFormattingContext.cpp:
(WebCore::Layout::InlineFormattingContext::lineLayout):
* layout/formattingContexts/inline/InlineLineBuilder.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (288325 => 288326)
--- trunk/Source/WebCore/ChangeLog 2022-01-20 22:10:15 UTC (rev 288325)
+++ trunk/Source/WebCore/ChangeLog 2022-01-20 22:32:57 UTC (rev 288326)
@@ -1,5 +1,18 @@
2022-01-20 Alan Bujtas <[email protected]>
+ [LFC][IFC] Add "previous line ends with a line break" flag to PreviousLine
+ https://bugs.webkit.org/show_bug.cgi?id=235405
+
+ Reviewed by Antti Koivisto.
+
+ This is in preparation for supporting unicode-bidi: plaintext where we need to know if the previous line ends in a line break or not.
+
+ * layout/formattingContexts/inline/InlineFormattingContext.cpp:
+ (WebCore::Layout::InlineFormattingContext::lineLayout):
+ * layout/formattingContexts/inline/InlineLineBuilder.h:
+
+2022-01-20 Alan Bujtas <[email protected]>
+
[LFC][IFC] LineBuilder::layoutInlineContent should take PreviousLine
https://bugs.webkit.org/show_bug.cgi?id=235403
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (288325 => 288326)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2022-01-20 22:10:15 UTC (rev 288325)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2022-01-20 22:32:57 UTC (rev 288326)
@@ -245,7 +245,7 @@
overflowContent = { lineContent.partialTrailingContentLength, lineContent.overflowLogicalWidth };
else if (lineContent.overflowLogicalWidth)
overflowContent = { { }, *lineContent.overflowLogicalWidth };
- previousLine = LineBuilder::PreviousLine { lineContentRange, overflowContent };
+ previousLine = LineBuilder::PreviousLine { lineContentRange, !lineContent.runs.isEmpty() && lineContent.runs.last().isLineBreak(), overflowContent };
continue;
}
// Floats prevented us placing any content on the line.
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h (288325 => 288326)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h 2022-01-20 22:10:15 UTC (rev 288325)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.h 2022-01-20 22:32:57 UTC (rev 288326)
@@ -52,6 +52,7 @@
};
struct PreviousLine {
InlineItemRange range;
+ bool endsWithLineBreak { false };
struct OverflowContent {
size_t partialContentLength { 0 };
std::optional<InlineLayoutUnit> width { };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes