Title: [289828] branches/safari-613.1.17.0-branch
- Revision
- 289828
- Author
- [email protected]
- Date
- 2022-02-15 10:45:39 -0800 (Tue, 15 Feb 2022)
Log Message
Cherry-pick r289776. rdar://problem/88656665
Fix crash with deeply nested async overflow scroll
https://bugs.webkit.org/show_bug.cgi?id=236599
Source/WebCore:
rdar://88656665
Reviewed by Alan Bujtas.
mergeClippingScopesRecursive() already does the append of the rects; doing so
before calling recursing triggers double appends, hence exponentially growing
rect lists.
Test: compositing/layer-creation/clipping-scope/deeply-nested-overflow.html
* rendering/LayerOverlapMap.cpp:
(WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
LayoutTests:
Reviewed by Alan Bujtas.
* compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt: Added.
* compositing/layer-creation/clipping-scope/deeply-nested-overflow.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613.1.17.0-branch/LayoutTests/ChangeLog (289827 => 289828)
--- branches/safari-613.1.17.0-branch/LayoutTests/ChangeLog 2022-02-15 18:45:35 UTC (rev 289827)
+++ branches/safari-613.1.17.0-branch/LayoutTests/ChangeLog 2022-02-15 18:45:39 UTC (rev 289828)
@@ -1,3 +1,44 @@
+2022-02-15 Russell Epstein <[email protected]>
+
+ Cherry-pick r289776. rdar://problem/88656665
+
+ Fix crash with deeply nested async overflow scroll
+ https://bugs.webkit.org/show_bug.cgi?id=236599
+ Source/WebCore:
+
+ rdar://88656665
+
+ Reviewed by Alan Bujtas.
+
+ mergeClippingScopesRecursive() already does the append of the rects; doing so
+ before calling recursing triggers double appends, hence exponentially growing
+ rect lists.
+
+ Test: compositing/layer-creation/clipping-scope/deeply-nested-overflow.html
+
+ * rendering/LayerOverlapMap.cpp:
+ (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
+
+ LayoutTests:
+
+ Reviewed by Alan Bujtas.
+
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt: Added.
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-14 Simon Fraser <[email protected]>
+
+ Fix crash with deeply nested async overflow scroll
+ https://bugs.webkit.org/show_bug.cgi?id=236599
+
+ Reviewed by Alan Bujtas.
+
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt: Added.
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow.html: Added.
+
2022-02-14 Russell Epstein <[email protected]>
Cherry-pick r289686. rdar://problem/88689388
Added: branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt (0 => 289828)
--- branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt (rev 0)
+++ branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt 2022-02-15 18:45:39 UTC (rev 289828)
@@ -0,0 +1 @@
+This test should not crash.
Added: branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow.html (0 => 289828)
--- branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow.html (rev 0)
+++ branches/safari-613.1.17.0-branch/LayoutTests/compositing/layer-creation/clipping-scope/deeply-nested-overflow.html 2022-02-15 18:45:39 UTC (rev 289828)
@@ -0,0 +1,42 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+<style>
+ .container {
+ width: 600px;
+ border: 1px solid gray;
+ overflow-x: auto;
+ margin: 10px;
+ }
+
+ .inner {
+ padding: 10px;
+ background-color: blue;
+ }
+</style>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ window.addEventListener('load', () => {
+ const depth = 256;
+
+ let currParent = document.body;
+ for (let i = 0; i < depth; ++i) {
+
+ let div = document.createElement('div');
+ div.className = 'container';
+ currParent.appendChild(div);
+ currParent = div;
+ }
+
+ let div = document.createElement('div');
+ div.className = 'inner';
+ div.textContent = 'This test should not crash.';
+ currParent.appendChild(div);
+ }, false);
+</script>
+</head>
+<body>
+</body>
+</html>
Modified: branches/safari-613.1.17.0-branch/Source/WebCore/ChangeLog (289827 => 289828)
--- branches/safari-613.1.17.0-branch/Source/WebCore/ChangeLog 2022-02-15 18:45:35 UTC (rev 289827)
+++ branches/safari-613.1.17.0-branch/Source/WebCore/ChangeLog 2022-02-15 18:45:39 UTC (rev 289828)
@@ -1,5 +1,53 @@
2022-02-15 Russell Epstein <[email protected]>
+ Cherry-pick r289776. rdar://problem/88656665
+
+ Fix crash with deeply nested async overflow scroll
+ https://bugs.webkit.org/show_bug.cgi?id=236599
+ Source/WebCore:
+
+ rdar://88656665
+
+ Reviewed by Alan Bujtas.
+
+ mergeClippingScopesRecursive() already does the append of the rects; doing so
+ before calling recursing triggers double appends, hence exponentially growing
+ rect lists.
+
+ Test: compositing/layer-creation/clipping-scope/deeply-nested-overflow.html
+
+ * rendering/LayerOverlapMap.cpp:
+ (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
+
+ LayoutTests:
+
+ Reviewed by Alan Bujtas.
+
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow-expected.txt: Added.
+ * compositing/layer-creation/clipping-scope/deeply-nested-overflow.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@289776 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-02-14 Simon Fraser <[email protected]>
+
+ Fix crash with deeply nested async overflow scroll
+ https://bugs.webkit.org/show_bug.cgi?id=236599
+ rdar://88656665
+
+ Reviewed by Alan Bujtas.
+
+ mergeClippingScopesRecursive() already does the append of the rects; doing so
+ before calling recursing triggers double appends, hence exponentially growing
+ rect lists.
+
+ Test: compositing/layer-creation/clipping-scope/deeply-nested-overflow.html
+
+ * rendering/LayerOverlapMap.cpp:
+ (WebCore::OverlapMapContainer::mergeClippingScopesRecursive):
+
+2022-02-15 Russell Epstein <[email protected]>
+
Cherry-pick r289762. rdar://problem/88786989
REGRESSION(r286560): MediaElement's getStartDate returning an incorrect time
Modified: branches/safari-613.1.17.0-branch/Source/WebCore/rendering/LayerOverlapMap.cpp (289827 => 289828)
--- branches/safari-613.1.17.0-branch/Source/WebCore/rendering/LayerOverlapMap.cpp 2022-02-15 18:45:35 UTC (rev 289827)
+++ branches/safari-613.1.17.0-branch/Source/WebCore/rendering/LayerOverlapMap.cpp 2022-02-15 18:45:39 UTC (rev 289828)
@@ -195,10 +195,9 @@
for (auto& sourceChildScope : sourceScope.children) {
ClippingScope* destChild = destScope.childWithLayer(sourceChildScope.layer);
- if (destChild) {
- destChild->rectList.append(sourceChildScope.rectList);
+ if (destChild)
mergeClippingScopesRecursive(sourceChildScope, *destChild);
- } else {
+ else {
// New child, just copy the whole subtree.
destScope.addChild(sourceChildScope);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes