Title: [292155] trunk
- Revision
- 292155
- Author
- [email protected]
- Date
- 2022-03-31 04:53:40 -0700 (Thu, 31 Mar 2022)
Log Message
Interop issue with position: sticky within contain: paint
https://bugs.webkit.org/show_bug.cgi?id=238016
Patch by Rob Buis <[email protected]> on 2022-03-31
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-expected.html: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html: Added.
* web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html: Added.
Source/WebCore:
Elements with overflow: clip (contain: paint enables it) are
not scroll containers, so they can't act as scrolling
ancestor for sticky elements.
Tests: imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html
imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::enclosingOverflowClipLayer const):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (292154 => 292155)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-31 11:48:50 UTC (rev 292154)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-31 11:53:40 UTC (rev 292155)
@@ -1,3 +1,14 @@
+2022-03-31 Rob Buis <[email protected]>
+
+ Interop issue with position: sticky within contain: paint
+ https://bugs.webkit.org/show_bug.cgi?id=238016
+
+ Reviewed by Simon Fraser.
+
+ * web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-expected.html: Added.
+ * web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html: Added.
+ * web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html: Added.
+
2022-03-31 Alex Christensen <[email protected]>
Implement units for CSS Typed OM
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-expected.html (0 => 292155)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-expected.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-expected.html 2022-03-31 11:53:40 UTC (rev 292155)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<title>Sticky elements should not consider overflow: clip containers as possible scroll ancestor</title>
+<style>
+body {
+ margin: 0;
+ overflow: hidden; /* hide scrollbars */
+}
+
+#container {
+ height: 300px;
+ overflow-y: scroll;
+}
+
+#overflowClipContainer {
+ overflow: visible;
+ height: 600px;
+}
+
+#sticky {
+ position: sticky;
+ top: 0;
+ height: 50px;
+ background-color: yellow;
+}
+</style>
+<script>
+function doTest()
+{
+ container.scrollTo(0, 50);
+}
+window.addEventListener('load', doTest, false);
+</script>
+<div id="container">
+ <div id="overflowClipContainer">
+ <div id="sticky"></div>
+ </div>
+</div>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html (0 => 292155)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html 2022-03-31 11:53:40 UTC (rev 292155)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<title>Sticky elements should not consider overflow: clip containers as possible scroll ancestor</title>
+<style>
+body {
+ margin: 0;
+ overflow: hidden; /* hide scrollbars */
+}
+
+#container {
+ height: 300px;
+ overflow-y: scroll;
+}
+
+#overflowClipContainer {
+ overflow: visible;
+ height: 600px;
+}
+
+#sticky {
+ position: sticky;
+ top: 0;
+ height: 50px;
+ background-color: yellow;
+}
+</style>
+<script>
+function doTest()
+{
+ container.scrollTo(0, 50);
+}
+window.addEventListener('load', doTest, false);
+</script>
+<div id="container">
+ <div id="overflowClipContainer">
+ <div id="sticky"></div>
+ </div>
+</div>
Added: trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html (0 => 292155)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html (rev 0)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html 2022-03-31 11:53:40 UTC (rev 292155)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html>
+<title>Sticky elements should not consider overflow: clip containers as possible scroll ancestor</title>
+<link rel="match" href="" />
+<link rel="help" href="" />
+<meta name="assert" content="This test checks that sticky elements do not consider overflow:clip containers as possible scroll ancestor"/>
+<style>
+body {
+ margin: 0;
+ overflow: hidden; /* hide scrollbars */
+}
+
+#container {
+ height: 300px;
+ overflow: auto;
+}
+
+#overflowClipContainer {
+ overflow: clip;
+ height: 600px;
+}
+
+#sticky {
+ position: sticky;
+ top: 0;
+ height: 50px;
+ background-color: yellow;
+}
+</style>
+<script>
+function doTest()
+{
+ container.scrollTo(0, 50);
+}
+window.addEventListener('load', doTest, false);
+</script>
+<div id="container">
+ <div id="overflowClipContainer">
+ <div id="sticky"></div>
+ </div>
+</div>
Modified: trunk/Source/WebCore/ChangeLog (292154 => 292155)
--- trunk/Source/WebCore/ChangeLog 2022-03-31 11:48:50 UTC (rev 292154)
+++ trunk/Source/WebCore/ChangeLog 2022-03-31 11:53:40 UTC (rev 292155)
@@ -1,3 +1,20 @@
+2022-03-31 Rob Buis <[email protected]>
+
+ Interop issue with position: sticky within contain: paint
+ https://bugs.webkit.org/show_bug.cgi?id=238016
+
+ Reviewed by Simon Fraser.
+
+ Elements with overflow: clip (contain: paint enables it) are
+ not scroll containers, so they can't act as scrolling
+ ancestor for sticky elements.
+
+ Tests: imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container-ref.html
+ imported/w3c/web-platform-tests/css/css-position/sticky/position-sticky-overflow-clip-container.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::enclosingOverflowClipLayer const):
+
2022-03-31 Kimmo Kinnunen <[email protected]>
REGRESSION? (248052@main): ASSERTION FAILED: didContain in WebCore::removeActiveContext(WebCore::WebGLRenderingContextBase &)
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (292154 => 292155)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2022-03-31 11:48:50 UTC (rev 292154)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2022-03-31 11:53:40 UTC (rev 292155)
@@ -1396,7 +1396,7 @@
{
const RenderLayer* layer = (includeSelf == IncludeSelf) ? this : parent();
while (layer) {
- if (layer->renderer().hasNonVisibleOverflow())
+ if (layer->renderer().hasPotentiallyScrollableOverflow())
return const_cast<RenderLayer*>(layer);
layer = layer->parent();
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes