WebKit Bugzilla
Attachment 369657 Details for
Bug 197766
: When the scroller hosting a shared layer becomes non-scrollable, content disappears
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197766-20190511115518.patch (text/plain), 5.70 KB, created by
Simon Fraser (smfr)
on 2019-05-11 11:55:19 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-11 11:55:19 PDT
Size:
5.70 KB
patch
obsolete
>Subversion Revision: 245204 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index ae97377a74e6b8c44be6355ed3ff87ff71dcdf26..904589a1a1a06bb7c40f975e2a61f193795839ac 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,20 @@ >+2019-05-11 Simon Fraser <simon.fraser@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ 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 <simon.fraser@apple.com> > > Layer bounds are incorrect for sharing layers that paint with transforms >diff --git a/Source/WebCore/rendering/RenderLayerCompositor.cpp b/Source/WebCore/rendering/RenderLayerCompositor.cpp >index ca5424e3f8ba938b881da1228dd260ef8ef317e5..283273c0f97aa8a41b3df61271d284842231eec8 100644 >--- a/Source/WebCore/rendering/RenderLayerCompositor.cpp >+++ b/Source/WebCore/rendering/RenderLayerCompositor.cpp >@@ -2366,6 +2366,9 @@ bool RenderLayerCompositor::requiresOwnBackingStore(const RenderLayer& layer, co > if (!ancestorCompositedBounds.contains(layerCompositedBoundsInAncestor)) > return true; > >+ if (layer.isComposited() && layer.backing()->hasBackingSharingLayers()) >+ return true; >+ > return false; > } > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 062c62f6161aa7f4a13fd298811d874a11dafd1c..2c183f3dda6cb48cfedf94e54506ac27e03d6c44 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2019-05-11 Simon Fraser <simon.fraser@apple.com> >+ >+ 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 NOBODY (OOPS!). >+ >+ * 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 <simon.fraser@apple.com> > > Layer bounds are incorrect for sharing layers that paint with transforms >diff --git a/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html b/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..58c158f306a951f5a5889164612302e11b260b52 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable-expected.html >@@ -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> >diff --git a/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html b/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html >new file mode 100644 >index 0000000000000000000000000000000000000000..8d4ff98f286d6f604707c74b27425dab0e0bd582 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/overflow-scroll/sharing-layer-becomes-non-scrollable.html >@@ -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>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 197766
:
369542
| 369657