Title: [290685] branches/safari-613-branch
Revision
290685
Author
alanc...@apple.com
Date
2022-03-01 15:48:58 -0800 (Tue, 01 Mar 2022)

Log Message

Cherry-pick r289443. rdar://problem/88593617

    REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
    https://bugs.webkit.org/show_bug.cgi?id=236260

    Patch by Rob Buis <rb...@igalia.com> on 2022-02-08
    Reviewed by Simon Fraser.

    LayoutTests/imported/w3c:

    * web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
    * web-platform-tests/css/css-contain/contain-paint-049.html: Added.

    Source/WebCore:

    Paint containment did not allow collecting scrollable overflow, breaking scrolling
    of the container contents, this patch fixes that.

    Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html

    * rendering/RenderBox.cpp:
    (WebCore::RenderBox::addOverflowFromChild):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289443 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog (290684 => 290685)


--- branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-03-01 23:48:53 UTC (rev 290684)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/ChangeLog	2022-03-01 23:48:58 UTC (rev 290685)
@@ -1,3 +1,40 @@
+2022-02-28  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r289443. rdar://problem/88593617
+
+    REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
+    https://bugs.webkit.org/show_bug.cgi?id=236260
+    
+    Patch by Rob Buis <rb...@igalia.com> on 2022-02-08
+    Reviewed by Simon Fraser.
+    
+    LayoutTests/imported/w3c:
+    
+    * web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
+    * web-platform-tests/css/css-contain/contain-paint-049.html: Added.
+    
+    Source/WebCore:
+    
+    Paint containment did not allow collecting scrollable overflow, breaking scrolling
+    of the container contents, this patch fixes that.
+    
+    Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html
+    
+    * rendering/RenderBox.cpp:
+    (WebCore::RenderBox::addOverflowFromChild):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-08  Rob Buis  <rb...@igalia.com>
+
+            REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
+            https://bugs.webkit.org/show_bug.cgi?id=236260
+
+            Reviewed by Simon Fraser.
+
+            * web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
+            * web-platform-tests/css/css-contain/contain-paint-049.html: Added.
+
 2022-02-14  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r289682. rdar://problem/88843567

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049-expected.txt (0 => 290685)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049-expected.txt	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049-expected.txt	2022-03-01 23:48:58 UTC (rev 290685)
@@ -0,0 +1,3 @@
+
+PASS Scrolling overflow works when paint is contained
+

Added: branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html (0 => 290685)


--- branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html	                        (rev 0)
+++ branches/safari-613-branch/LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html	2022-03-01 23:48:58 UTC (rev 290685)
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset="utf8">
+<title>CSS Containment Test: Scrolling overflow works when paint is contained"</title>
+<link rel="help" href=""
+<meta name="assert" content="Scrolling overflow works when paint is contained.">
+
+<script src=""
+<script src=""
+
+<style>
+#container {
+  width: 100px;
+  height: 100px;
+  overflow: auto;
+  contain: paint;
+}
+.content {
+  position: absolute;
+  height: 500%;
+  width: 100%;
+}
+</style>
+
+<div id="container">
+  <div class="content">
+  </div>
+</div>
+
+<script>
+  test(() => {
+    container.scrollTo(0, 100);
+    assert_equals(container.scrollTop, 100);
+  }, "Scrolling overflow works when paint is contained");
+</script>

Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (290684 => 290685)


--- branches/safari-613-branch/Source/WebCore/ChangeLog	2022-03-01 23:48:53 UTC (rev 290684)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog	2022-03-01 23:48:58 UTC (rev 290685)
@@ -1,5 +1,47 @@
 2022-02-28  Russell Epstein  <repst...@apple.com>
 
+        Cherry-pick r289443. rdar://problem/88593617
+
+    REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
+    https://bugs.webkit.org/show_bug.cgi?id=236260
+    
+    Patch by Rob Buis <rb...@igalia.com> on 2022-02-08
+    Reviewed by Simon Fraser.
+    
+    LayoutTests/imported/w3c:
+    
+    * web-platform-tests/css/css-contain/contain-paint-049-expected.txt: Added.
+    * web-platform-tests/css/css-contain/contain-paint-049.html: Added.
+    
+    Source/WebCore:
+    
+    Paint containment did not allow collecting scrollable overflow, breaking scrolling
+    of the container contents, this patch fixes that.
+    
+    Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html
+    
+    * rendering/RenderBox.cpp:
+    (WebCore::RenderBox::addOverflowFromChild):
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289443 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-08  Rob Buis  <rb...@igalia.com>
+
+            REGRESSION (15.4): Angular virtual scrollers no longer work (because of contain:strict)
+            https://bugs.webkit.org/show_bug.cgi?id=236260
+
+            Reviewed by Simon Fraser.
+
+            Paint containment did not allow collecting scrollable overflow, breaking scrolling
+            of the container contents, this patch fixes that.
+
+            Test: imported/w3c/web-platform-tests/css/css-contain/contain-paint-049.html
+
+            * rendering/RenderBox.cpp:
+            (WebCore::RenderBox::addOverflowFromChild):
+
+2022-02-28  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r289377. rdar://problem/88178304
 
     Return 'none' for the computed style of mask when there are no mask images

Modified: branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp (290684 => 290685)


--- branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp	2022-03-01 23:48:53 UTC (rev 290684)
+++ branches/safari-613-branch/Source/WebCore/rendering/RenderBox.cpp	2022-03-01 23:48:58 UTC (rev 290685)
@@ -4985,8 +4985,6 @@
 
 void RenderBox::addOverflowFromChild(const RenderBox* child, const LayoutSize& delta)
 {
-    if (paintContainmentApplies())
-        return;
     // Never allow flow threads to propagate overflow up to a parent.
     if (child->isRenderFragmentedFlow())
         return;
@@ -5002,6 +5000,9 @@
     childLayoutOverflowRect.move(delta);
     addLayoutOverflow(childLayoutOverflowRect);
 
+    if (paintContainmentApplies())
+        return;
+
     // Add in visual overflow from the child.  Even if the child clips its overflow, it may still
     // have visual overflow of its own set from box shadows or reflections. It is unnecessary to propagate this
     // overflow if we are clipping our own overflow.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to