WebKit Bugzilla
Attachment 369679 Details for
Bug 197825
: When the set of backing-sharing layers changes, we need to issue a repaint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-197825-20190512112407.patch (text/plain), 5.64 KB, created by
Simon Fraser (smfr)
on 2019-05-12 11:24:08 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Simon Fraser (smfr)
Created:
2019-05-12 11:24:08 PDT
Size:
5.64 KB
patch
obsolete
>Subversion Revision: 245212 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index a31e10da89e3bfe555adc7d08c11924cf09336b1..6a5f72407311497ff4dbfda8a7158e96ea8fe845 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,19 @@ >+2019-05-12 Simon Fraser <simon.fraser@apple.com> >+ >+ When the set of backing-sharing layers changes, we need to issue a repaint >+ https://bugs.webkit.org/show_bug.cgi?id=197825 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ If the set of layers painting into a shared backing store changes, we need >+ to repaint that backing store. This happens when scrolling as shared layers >+ enter the visible area. >+ >+ Test: compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html >+ >+ * rendering/RenderLayerBacking.cpp: >+ (WebCore::RenderLayerBacking::setBackingSharingLayers): >+ > 2019-05-12 Simon Fraser <simon.fraser@apple.com> > > Refactor composited backing-sharing code >diff --git a/Source/WebCore/rendering/RenderLayerBacking.cpp b/Source/WebCore/rendering/RenderLayerBacking.cpp >index f839e46e3ebd04e23439b5a940ac13d3a9bf52a1..1d14c1a36e1d2e9a2d2528e0a24109b3f4777195 100644 >--- a/Source/WebCore/rendering/RenderLayerBacking.cpp >+++ b/Source/WebCore/rendering/RenderLayerBacking.cpp >@@ -281,6 +281,10 @@ static void clearBackingSharingLayerProviders(Vector<WeakPtr<RenderLayer>>& shar > void RenderLayerBacking::setBackingSharingLayers(Vector<WeakPtr<RenderLayer>>&& sharingLayers) > { > clearBackingSharingLayerProviders(m_backingSharingLayers); >+ >+ if (sharingLayers != m_backingSharingLayers) >+ setContentsNeedDisplay(); // This could be optimize to only repaint rects for changed layers. >+ > m_backingSharingLayers = WTFMove(sharingLayers); > > for (auto& layerWeakPtr : m_backingSharingLayers) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 1885fbe51654f82e3f093766944eedc65a7fd21f..cb025049076647876b7bdaa302e9c5eedbf0fa6d 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,13 @@ >+2019-05-12 Simon Fraser <simon.fraser@apple.com> >+ >+ When the set of backing-sharing layers changes, we need to issue a repaint >+ https://bugs.webkit.org/show_bug.cgi?id=197825 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html: Added. >+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html: Added. >+ > 2019-05-11 Simon Fraser <simon.fraser@apple.com> > > Overflow scroll that becomes non-scrollable should stop being composited >diff --git a/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html b/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html >new file mode 100644 >index 0000000000000000000000000000000000000000..700cae88d624f4e9bb95139fbc7834c72b53709c >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .box.sharing { >+ background-color: blue; >+ } >+ >+ .box { >+ position: relative; >+ top: 50px; >+ left: 50px; >+ width: 180px; >+ height: 180px; >+ background-color: green; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing box"> >+ <div class="inner box"></div> >+ </div> >+ <div class="spacer"></div> >+ </div> >+</body> >+</html> >+ >diff --git a/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html b/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html >new file mode 100644 >index 0000000000000000000000000000000000000000..a908aaf9e3097ef9c53f1fd80ec102dc29c420d3 >--- /dev/null >+++ b/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html >@@ -0,0 +1,57 @@ >+<!DOCTYPE html> <!-- webkit-test-runner [ internal:AsyncOverflowScrollingEnabled=true ] --> >+<html> >+<head> >+ <title>Tests repaints of shared backing when the sharing layers change</title> >+ <style> >+ .scrollable { >+ overflow-y: scroll; >+ height: 300px; >+ width: 300px; >+ margin: 10px; >+ border: 1px solid black; >+ } >+ >+ .box.sharing { >+ background-color: blue; >+ } >+ >+ .box { >+ position: relative; >+ top: 50px; >+ left: 50px; >+ width: 180px; >+ height: 180px; >+ background-color: green; >+ } >+ >+ .spacer { >+ height: 500px; >+ } >+ </style> >+ <script> >+ if (window.testRunner) >+ testRunner.waitUntilDone(); >+ >+ window.addEventListener('load', () => { >+ let scroller = document.querySelector('.scrollable'); >+ requestAnimationFrame(() => { >+ scroller.scrollTop = 250; >+ requestAnimationFrame(() => { >+ scroller.scrollTop = 0; >+ if (window.testRunner) >+ testRunner.notifyDone(); >+ }); >+ }); >+ }, false); >+ </script> >+</head> >+<body> >+ <div class="scrollable"> >+ <div class="sharing box"> >+ <div class="inner box"></div> >+ </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 197825
: 369679