Commit d670217
mpadded lspace attribute incorrectly positions content in RTL direction
https://bugs.webkit.org/show_bug.cgi?id=303735
rdar://166045517
Reviewed by Frédéric Wang.
In RTL mode, lspace should add space on the inline-start (physical right)
side. The previous implementation added in 303070@main simply negated lspace,
which incorrectly positioned content at the left edge instead of accounting
for the box width and content width.
For RTL with lspace="25px", width="150px", and content width 75px:
- Content should end 25px from the right edge
- Content starts at: 150 - 25 - 75 = 50px from left
The fix calculates RTL inline shift as (width - contentWidth - lspace())
to properly position content relative to the box's right edge.
* Source/WebCore/rendering/mathml/RenderMathMLPadded.cpp:
(WebCore::RenderMathMLPadded::layoutBlock):
* LayoutTests/TestExpectations: Progression
Canonical link: https://commits.webkit.org/304087@main1 parent 66f81b4 commit d670217
File tree
2 files changed
+1
-2
lines changed- LayoutTests
- Source/WebCore/rendering/mathml
2 files changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1968 | 1968 | | |
1969 | 1969 | | |
1970 | 1970 | | |
1971 | | - | |
1972 | 1971 | | |
1973 | 1972 | | |
1974 | 1973 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
123 | | - | |
| 123 | + | |
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| |||
0 commit comments