Diff
Modified: trunk/LayoutTests/ChangeLog (282446 => 282447)
--- trunk/LayoutTests/ChangeLog 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/ChangeLog 2021-09-15 12:09:40 UTC (rev 282447)
@@ -1,3 +1,14 @@
+2021-09-15 Martin Robinson <[email protected]>
+
+ offsetLeft on display:inline element in vertical-rl parent can return a negative number
+ https://bugs.webkit.org/show_bug.cgi?id=230217
+
+ Reviewed by Darin Adler.
+
+ * TestExpectations: Unskip a newly passing test.
+ * platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt:
+ * platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt:
+
2021-09-15 Youenn Fablet <[email protected]>
Use event queue to fire RTCPeerConnection events
Modified: trunk/LayoutTests/TestExpectations (282446 => 282447)
--- trunk/LayoutTests/TestExpectations 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/TestExpectations 2021-09-15 12:09:40 UTC (rev 282447)
@@ -3348,8 +3348,6 @@
webkit.org/b/199039 editing/deleting/smart-delete-paragraph-003.html [ Skip ]
-imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-inline.html [ ImageOnlyFailure ]
-
# Test is failing and is printing different values when it fails.
fast/mediastream/captureStream/canvas2d.html [ Failure Pass ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (282446 => 282447)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2021-09-15 12:09:40 UTC (rev 282447)
@@ -1,3 +1,13 @@
+2021-09-15 Martin Robinson <[email protected]>
+
+ offsetLeft on display:inline element in vertical-rl parent can return a negative number
+ https://bugs.webkit.org/show_bug.cgi?id=230217
+
+ Reviewed by Darin Adler.
+
+ * web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt:
+ * web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt:
+
2021-09-15 Youenn Fablet <[email protected]>
Use event queue to fire RTCPeerConnection events
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt (282446 => 282447)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt 2021-09-15 12:09:40 UTC (rev 282447)
@@ -7,5 +7,5 @@
PASS offsetTop/Left of empty inline elements should work as if they were not empty: 0
FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 1 assert_equals: offsetLeft expected 34 but got 0
-FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 34 but got 0
+FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 108 but got 0
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt (282446 => 282447)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt 2021-09-15 12:09:40 UTC (rev 282447)
@@ -7,5 +7,5 @@
PASS offsetTop/Left of empty inline elements should work as if they were not empty: 0
FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 1 assert_equals: offsetLeft expected 34 but got 0
-FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 34 but got 0
+FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 108 but got 0
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt (282446 => 282447)
--- trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-empty-inline-expected.txt 2021-09-15 12:09:40 UTC (rev 282447)
@@ -7,5 +7,5 @@
PASS offsetTop/Left of empty inline elements should work as if they were not empty: 0
FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 1 assert_equals: offsetLeft expected 36 but got 0
-FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 36 but got 0
+FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 105 but got 0
Modified: trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt (282446 => 282447)
--- trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/LayoutTests/platform/ios-simulator-wk2/imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-leading-space-inline-expected.txt 2021-09-15 12:09:40 UTC (rev 282447)
@@ -7,5 +7,5 @@
PASS offsetTop/Left of empty inline elements should work as if they were not empty: 0
FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 1 assert_equals: offsetLeft expected 36 but got 0
-FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 36 but got 0
+FAIL offsetTop/Left of empty inline elements should work as if they were not empty: 2 assert_equals: offsetLeft expected 105 but got 0
Modified: trunk/Source/WebCore/ChangeLog (282446 => 282447)
--- trunk/Source/WebCore/ChangeLog 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/Source/WebCore/ChangeLog 2021-09-15 12:09:40 UTC (rev 282447)
@@ -1,3 +1,17 @@
+2021-09-15 Martin Robinson <[email protected]>
+
+ offsetLeft on display:inline element in vertical-rl parent can return a negative number
+ https://bugs.webkit.org/show_bug.cgi?id=230217
+
+ Reviewed by Darin Adler.
+
+ No new tests. This is covered by imported/w3c/web-platform-tests/css/cssom-view/offsetTopLeft-inline.html.
+
+ * rendering/RenderInline.cpp:
+ (WebCore::RenderInline::firstInlineBoxTopLeft const): When calculating offsetLeft and offsetTop instead
+ of using topLeft unconditionally, use LegacyInlineBox::locationIncludingFlipping which takes into
+ account writing mode.
+
2021-09-15 Youenn Fablet <[email protected]>
Use event queue to fire RTCPeerConnection events
Modified: trunk/Source/WebCore/rendering/RenderInline.cpp (282446 => 282447)
--- trunk/Source/WebCore/rendering/RenderInline.cpp 2021-09-15 09:53:27 UTC (rev 282446)
+++ trunk/Source/WebCore/rendering/RenderInline.cpp 2021-09-15 12:09:40 UTC (rev 282447)
@@ -344,7 +344,7 @@
return lineLayout->firstInlineBoxRect(*this).location();
#endif
if (LegacyInlineBox* firstBox = firstLineBox())
- return flooredLayoutPoint(firstBox->topLeft());
+ return flooredLayoutPoint(firstBox->locationIncludingFlipping());
return { };
}