Title: [287184] trunk/Source/WebCore
- Revision
- 287184
- Author
- [email protected]
- Date
- 2021-12-17 07:17:56 -0800 (Fri, 17 Dec 2021)
Log Message
[LFC][IFC] Simple RTL content may need visual reordering
https://bugs.webkit.org/show_bug.cgi?id=234380
Reviewed by Darin Adler and Antti Koivisto.
Addressing post-commit comment (r287142).
* layout/formattingContexts/inline/InlineItemsBuilder.cpp:
(WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (287183 => 287184)
--- trunk/Source/WebCore/ChangeLog 2021-12-17 14:22:56 UTC (rev 287183)
+++ trunk/Source/WebCore/ChangeLog 2021-12-17 15:17:56 UTC (rev 287184)
@@ -1,3 +1,15 @@
+2021-12-17 Alan Bujtas <[email protected]>
+
+ [LFC][IFC] Simple RTL content may need visual reordering
+ https://bugs.webkit.org/show_bug.cgi?id=234380
+
+ Reviewed by Darin Adler and Antti Koivisto.
+
+ Addressing post-commit comment (r287142).
+
+ * layout/formattingContexts/inline/InlineItemsBuilder.cpp:
+ (WebCore::Layout::InlineItemsBuilder::breakAndComputeBidiLevels):
+
2021-12-17 Philippe Normand <[email protected]>
[GStreamer][WebRTC] Huge memory leak
Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp (287183 => 287184)
--- trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2021-12-17 14:22:56 UTC (rev 287183)
+++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp 2021-12-17 15:17:56 UTC (rev 287184)
@@ -273,11 +273,13 @@
if (!useHeuristicBaseDirection)
rootBidiLevel = root().style().isLeftToRightDirection() ? UBIDI_LTR : UBIDI_RTL;
+ auto bidiContent = StringView { paragraphContentBuilder }.upconvertedCharacters();
+ auto bidiContentLength = paragraphContentBuilder.length();
UErrorCode error = U_ZERO_ERROR;
- ASSERT(!paragraphContentBuilder.isEmpty());
+ ASSERT(bidiContentLength);
ubidi_setPara(ubidi
- , StringView(paragraphContentBuilder).upconvertedCharacters()
- , paragraphContentBuilder.length()
+ , bidiContent
+ , bidiContentLength
, rootBidiLevel
, nullptr
, &error);
@@ -289,7 +291,7 @@
size_t inlineItemIndex = 0;
auto hasSeenOpaqueItem = false;
- for (size_t currentPosition = 0; currentPosition < paragraphContentBuilder.length();) {
+ for (size_t currentPosition = 0; currentPosition < bidiContentLength;) {
UBiDiLevel bidiLevel;
int32_t endPosition = currentPosition;
ubidi_getLogicalRun(ubidi, currentPosition, &endPosition, &bidiLevel);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes