Title: [245206] trunk
- Revision
- 245206
- Author
- [email protected]
- Date
- 2019-05-11 13:58:52 -0700 (Sat, 11 May 2019)
Log Message
When the scroller hosting a shared layer becomes non-scrollable, content disappears
https://bugs.webkit.org/show_bug.cgi?id=197766
<rdar://problem/50695808>
Reviewed by Zalan Bujtas.
Source/WebCore:
RenderLayerCompositor::requiresOwnBackingStore() should return true for a layer that shares
its backing store. We always made backing for overlap layers, so even if the sharing layers
have no painted content, this should rarely be a backing store memory regression.
Test: compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
LayoutTests:
* compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html: Added.
* compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (245205 => 245206)
--- trunk/LayoutTests/ChangeLog 2019-05-11 17:35:30 UTC (rev 245205)
+++ trunk/LayoutTests/ChangeLog 2019-05-11 20:58:52 UTC (rev 245206)
@@ -1,5 +1,16 @@
2019-05-11 Simon Fraser <[email protected]>
+ When the scroller hosting a shared layer becomes non-scrollable, content disappears
+ https://bugs.webkit.org/show_bug.cgi?id=197766
+ <rdar://problem/50695808>
+
+ Reviewed by Zalan Bujtas.
+
+ * compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html: Added.
+ * compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html: Added.
+
+2019-05-11 Simon Fraser <[email protected]>
+
Backing-sharing layers with transforms render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=197692
<rdar://problem/50652127>
Added: trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html (0 => 245206)
--- trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html (rev 0)
+++ trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html 2019-05-11 20:58:52 UTC (rev 245206)
@@ -0,0 +1,35 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <style>
+ .scrollable {
+ overflow-y: scroll;
+ height: 400px;
+ width: 300px;
+ margin: 10px;
+ border: 1px solid black;
+ }
+
+ .sharing {
+ margin: 20px;
+ width: 150px;
+ height: 130px;
+ background-color: green;
+ opacity: 0.75;
+ }
+
+ .spacer {
+ height: 100px;
+ width: 20px;
+ background-color: silver;
+ }
+ </style>
+</head>
+<body>
+ <div class="scrollable">
+ <div class="sharing">
+ </div>
+ <div class="spacer"></div>
+ </div>
+</body>
+</html>
Added: trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html (0 => 245206)
--- trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html (rev 0)
+++ trunk/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html 2019-05-11 20:58:52 UTC (rev 245206)
@@ -0,0 +1,52 @@
+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] -->
+<html>
+<head>
+ <title>Tests that the sharing layer still has backing store and paints shared layers after a tree config change</title>
+ <style>
+ .scrollable {
+ overflow-y: scroll;
+ height: 400px;
+ width: 300px;
+ margin: 10px;
+ border: 1px solid black;
+ }
+
+ .sharing {
+ margin: 20px;
+ width: 150px;
+ height: 130px;
+ background-color: green;
+ opacity: 0.75;
+ }
+
+ .spacer {
+ height: 500px;
+ width: 20px;
+ background-color: silver;
+ }
+
+ .spacer.changed {
+ height: 100px;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ window.addEventListener('load', () => {
+ setTimeout(() => {
+ document.querySelector('.spacer').classList.add('changed');
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }, false);
+ </script>
+</head>
+<body>
+ <div class="scrollable">
+ <div class="sharing">
+ </div>
+ <div class="spacer"></div>
+ </div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (245205 => 245206)
--- trunk/Source/WebCore/ChangeLog 2019-05-11 17:35:30 UTC (rev 245205)
+++ trunk/Source/WebCore/ChangeLog 2019-05-11 20:58:52 UTC (rev 245206)
@@ -1,5 +1,22 @@
2019-05-11 Simon Fraser <[email protected]>
+ When the scroller hosting a shared layer becomes non-scrollable, content disappears
+ https://bugs.webkit.org/show_bug.cgi?id=197766
+ <rdar://problem/50695808>
+
+ Reviewed by Zalan Bujtas.
+
+ RenderLayerCompositor::requiresOwnBackingStore() should return true for a layer that shares
+ its backing store. We always made backing for overlap layers, so even if the sharing layers
+ have no painted content, this should rarely be a backing store memory regression.
+
+ Test: compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html
+
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::requiresOwnBackingStore const):
+
+2019-05-11 Simon Fraser <[email protected]>
+
Backing-sharing layers with transforms render incorrectly
https://bugs.webkit.org/show_bug.cgi?id=197692
<rdar://problem/50652127>
Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (245205 => 245206)
--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-11 17:35:30 UTC (rev 245205)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2019-05-11 20:58:52 UTC (rev 245206)
@@ -2366,6 +2366,9 @@
if (!ancestorCompositedBounds.contains(layerCompositedBoundsInAncestor))
return true;
+ if (layer.isComposited() && layer.backing()->hasBackingSharingLayers())
+ return true;
+
return false;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes