Title: [273982] trunk
- Revision
- 273982
- Author
- [email protected]
- Date
- 2021-03-05 10:51:46 -0800 (Fri, 05 Mar 2021)
Log Message
sticky position incorrect behavior in table with dir=RTL
https://bugs.webkit.org/show_bug.cgi?id=221624
<rdar://problem/74403616>
Reviewed by Zalan Bujtas.
Source/WebCore:
We use scroll offsets when computing sticky constraints, so we should also use them
when computing layer positions in the scrolling tree.
Test: fast/css/sticky/sticky-in-rtl-overflow.html
* page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
(WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
LayoutTests:
* fast/css/sticky/sticky-in-rtl-overflow-expected.html: Added.
* fast/css/sticky/sticky-in-rtl-overflow.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (273981 => 273982)
--- trunk/LayoutTests/ChangeLog 2021-03-05 18:34:41 UTC (rev 273981)
+++ trunk/LayoutTests/ChangeLog 2021-03-05 18:51:46 UTC (rev 273982)
@@ -1,3 +1,14 @@
+2021-03-05 Simon Fraser <[email protected]>
+
+ sticky position incorrect behavior in table with dir=RTL
+ https://bugs.webkit.org/show_bug.cgi?id=221624
+ <rdar://problem/74403616>
+
+ Reviewed by Zalan Bujtas.
+
+ * fast/css/sticky/sticky-in-rtl-overflow-expected.html: Added.
+ * fast/css/sticky/sticky-in-rtl-overflow.html: Added.
+
2021-03-05 Jon Lee <[email protected]>
[GPUP] Test fast/mediacapturefromelement/CanvasCaptureMediaStream-webgl-events.html times out when media in GPU Process is enabled
Added: trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow-expected.html (0 => 273982)
--- trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow-expected.html 2021-03-05 18:51:46 UTC (rev 273982)
@@ -0,0 +1,46 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .scroller {
+ width: 500px;
+ height: 400px;
+ border: 1px solid black;
+ overflow-x: scroll;
+ }
+
+ .content {
+ height: 100%;
+ width: 500%;
+ }
+
+ .container {
+ border: 2px solid orange;
+ width: 450px;
+ height: 100%;
+ margin: 0 120px;
+ box-sizing: border-box;
+ }
+
+ .sticky {
+ position: relative;
+ top: 8px;
+ right: 0px;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ will-change: transform;
+ }
+ </style>
+
+</head>
+<body>
+ <div class="scroller" dir="rtl">
+ <div class="content">
+ <div class="container">
+ <div class="sticky"></div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow.html (0 => 273982)
--- trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow.html (rev 0)
+++ trunk/LayoutTests/fast/css/sticky/sticky-in-rtl-overflow.html 2021-03-05 18:51:46 UTC (rev 273982)
@@ -0,0 +1,45 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .scroller {
+ width: 500px;
+ height: 400px;
+ border: 1px solid black;
+ overflow-x: scroll;
+ }
+
+ .content {
+ height: 100%;
+ width: 500%;
+ }
+
+ .container {
+ border: 2px solid orange;
+ width: 450px;
+ height: 100%;
+ margin: 0 120px;
+ box-sizing: border-box;
+ }
+
+ .sticky {
+ position: sticky;
+ top: 10px;
+ right: 10px;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+ </style>
+
+</head>
+<body>
+ <div class="scroller" dir="rtl">
+ <div class="content">
+ <div class="container">
+ <div class="sticky"></div>
+ </div>
+ </div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (273981 => 273982)
--- trunk/Source/WebCore/ChangeLog 2021-03-05 18:34:41 UTC (rev 273981)
+++ trunk/Source/WebCore/ChangeLog 2021-03-05 18:51:46 UTC (rev 273982)
@@ -1,3 +1,19 @@
+2021-03-05 Simon Fraser <[email protected]>
+
+ sticky position incorrect behavior in table with dir=RTL
+ https://bugs.webkit.org/show_bug.cgi?id=221624
+ <rdar://problem/74403616>
+
+ Reviewed by Zalan Bujtas.
+
+ We use scroll offsets when computing sticky constraints, so we should also use them
+ when computing layer positions in the scrolling tree.
+
+ Test: fast/css/sticky/sticky-in-rtl-overflow.html
+
+ * page/scrolling/cocoa/ScrollingTreeStickyNode.mm:
+ (WebCore::ScrollingTreeStickyNode::computeLayerPosition const):
+
2021-03-04 Antoine Quint <[email protected]>
Refactor CSSPropertyAnimation to specify fewer wrappers and use value() functions
Modified: trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.mm (273981 => 273982)
--- trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.mm 2021-03-05 18:34:41 UTC (rev 273981)
+++ trunk/Source/WebCore/page/scrolling/cocoa/ScrollingTreeStickyNode.mm 2021-03-05 18:51:46 UTC (rev 273982)
@@ -76,7 +76,7 @@
constrainingRect = frameScrollingNode.layoutViewport();
} else {
auto& overflowScrollingNode = downcast<ScrollingTreeOverflowScrollingNode>(scrollingNode);
- constrainingRect = FloatRect(overflowScrollingNode.currentScrollPosition(), m_constraints.constrainingRectAtLastLayout().size());
+ constrainingRect = FloatRect(overflowScrollingNode.currentScrollOffset(), m_constraints.constrainingRectAtLastLayout().size());
}
return m_constraints.layerPositionForConstrainingRect(constrainingRect);
};
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes