Title: [245391] branches/safari-608.1.24-branch
- Revision
- 245391
- Author
- [email protected]
- Date
- 2019-05-15 23:02:03 -0700 (Wed, 15 May 2019)
Log Message
Cherry-pick r245220. rdar://problem/50686229
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 Zalan Bujtas.
Source/WebCore:
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):
LayoutTests:
* compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html: Added.
* compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-608.1.24-branch/LayoutTests/ChangeLog (245390 => 245391)
--- branches/safari-608.1.24-branch/LayoutTests/ChangeLog 2019-05-16 06:01:59 UTC (rev 245390)
+++ branches/safari-608.1.24-branch/LayoutTests/ChangeLog 2019-05-16 06:02:03 UTC (rev 245391)
@@ -1,5 +1,43 @@
2019-05-15 Kocsen Chung <[email protected]>
+ Cherry-pick r245220. rdar://problem/50686229
+
+ 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 Zalan Bujtas.
+
+ Source/WebCore:
+
+ 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):
+
+ LayoutTests:
+
+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html: Added.
+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-12 Simon Fraser <[email protected]>
+
+ 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 Zalan Bujtas.
+
+ * 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-15 Kocsen Chung <[email protected]>
+
Cherry-pick r245205. rdar://problem/50652127
Backing-sharing layers with transforms render incorrectly
Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html (0 => 245391)
--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html 2019-05-16 06:02:03 UTC (rev 245391)
@@ -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>
+
Added: branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html (0 => 245391)
--- branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html (rev 0)
+++ branches/safari-608.1.24-branch/LayoutTests/compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html 2019-05-16 06:02:03 UTC (rev 245391)
@@ -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>
+
Modified: branches/safari-608.1.24-branch/Source/WebCore/ChangeLog (245390 => 245391)
--- branches/safari-608.1.24-branch/Source/WebCore/ChangeLog 2019-05-16 06:01:59 UTC (rev 245390)
+++ branches/safari-608.1.24-branch/Source/WebCore/ChangeLog 2019-05-16 06:02:03 UTC (rev 245391)
@@ -1,5 +1,49 @@
2019-05-15 Kocsen Chung <[email protected]>
+ Cherry-pick r245220. rdar://problem/50686229
+
+ 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 Zalan Bujtas.
+
+ Source/WebCore:
+
+ 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):
+
+ LayoutTests:
+
+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll-expected.html: Added.
+ * compositing/shared-backing/overflow-scroll/repaint-shared-on-scroll.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@245220 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-05-12 Simon Fraser <[email protected]>
+
+ 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 Zalan Bujtas.
+
+ 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-15 Kocsen Chung <[email protected]>
+
Cherry-pick r245218. rdar://problem/50705506
Refactor composited backing-sharing code
Modified: branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (245390 => 245391)
--- branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-16 06:01:59 UTC (rev 245390)
+++ branches/safari-608.1.24-branch/Source/WebCore/rendering/RenderLayerBacking.cpp 2019-05-16 06:02:03 UTC (rev 245391)
@@ -281,6 +281,10 @@
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)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes