Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 46f0f6ec886e357152e65e5d78428422ce6d4194
https://github.com/WebKit/WebKit/commit/46f0f6ec886e357152e65e5d78428422ce6d4194
Author: Ahmad Saleem <[email protected]>
Date: 2023-03-10 (Fri, 10 Mar 2023)
Changed paths:
A LayoutTests/svg/text/bidi-dir-rtl-expected.html
A LayoutTests/svg/text/bidi-dir-rtl.html
M Source/WebCore/rendering/svg/SVGRootInlineBox.cpp
Log Message:
-----------
SVG text in RTL mixes characters
https://bugs.webkit.org/show_bug.cgi?id=246888
rdar://problem/101695671
Reviewed by Nikolas Zimmermann.
Merge - https://src.chromium.org/viewvc/blink?view=revision&revision=167777
Only swap positions if both characters actually are absolute positioned.
When re-ordering inline boxes within a "line", character-based absolute
positioning attributes are re-ordered to match. However, when attempting
to re-order/swap a inline box that does have a absolute positioning
attribute (and is of length 1) with one that doesn't, the positioning
attribute is copied rather than swapped - leading to additional chunks
being created and consequently additional adjustments being performed.
However, swapping is not needed/required in this case, since the attribute
is already in the correct (logical) position.
To mitigate this, only perform the attribute swap if both characters
(and consequently inline boxes) have attributes in the first place.
* Source/WebCore/rendering/svg/SVGRootInlineBox:
(SVGRootInlineBox::swapItemsInLayoutAttributes): Update to remove conditions
about First and Last Positions
* LayoutTests/svg/text/bidi-dir-rtl.html: Added Test Case
* LayoutTests/svg/text/bidi-dir-rtl-expected.html: Added Test Case Expectation
Canonical link: https://commits.webkit.org/261495@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes