Title: [292667] branches/safari-613-branch
- Revision
- 292667
- Author
- [email protected]
- Date
- 2022-04-08 17:14:44 -0700 (Fri, 08 Apr 2022)
Log Message
Cherry-pick r291493. rdar://problem/91446052
REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
https://bugs.webkit.org/show_bug.cgi?id=238047
<rdar://problem/90451319>
Reviewed by Alan Bujtas.
Source/WebCore:
In r290628 I added a call to clearRepaintRects() when changing the backing sharing
target layer for a RenderLayer. However, for a layer using backing sharing, this
gets called twice during a normal compositing update, which has the effect of
clearing the cached repaint rects so that a layer repaint always computes new rects.
Thus, if a layer moved, we'd fail to repaint the old rect.
RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
rects when state changes, so we don't need this clearing.
Test: compositing/repaint/move-backing-sharing-layer.html
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setBackingProviderLayer):
LayoutTests:
* compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
* compositing/repaint/move-backing-sharing-layer.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Added Paths
Diff
Modified: branches/safari-613-branch/LayoutTests/ChangeLog (292666 => 292667)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-04-09 00:14:40 UTC (rev 292666)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-04-09 00:14:44 UTC (rev 292667)
@@ -1,5 +1,50 @@
2022-04-07 Alan Coon <[email protected]>
+ Cherry-pick r291493. rdar://problem/91446052
+
+ REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
+ https://bugs.webkit.org/show_bug.cgi?id=238047
+ <rdar://problem/90451319>
+
+ Reviewed by Alan Bujtas.
+
+ Source/WebCore:
+
+ In r290628 I added a call to clearRepaintRects() when changing the backing sharing
+ target layer for a RenderLayer. However, for a layer using backing sharing, this
+ gets called twice during a normal compositing update, which has the effect of
+ clearing the cached repaint rects so that a layer repaint always computes new rects.
+ Thus, if a layer moved, we'd fail to repaint the old rect.
+
+ RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
+ rects when state changes, so we don't need this clearing.
+
+ Test: compositing/repaint/move-backing-sharing-layer.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::setBackingProviderLayer):
+
+ LayoutTests:
+
+ * compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
+ * compositing/repaint/move-backing-sharing-layer.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-18 Simon Fraser <[email protected]>
+
+ REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
+ https://bugs.webkit.org/show_bug.cgi?id=238047
+ <rdar://problem/90451319>
+
+ Reviewed by Alan Bujtas.
+
+ * compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
+ * compositing/repaint/move-backing-sharing-layer.html: Added.
+
+2022-04-07 Alan Coon <[email protected]>
+
Cherry-pick r291118. rdar://problem/91446071
[iOS] Netflix.com fails to resume after moving app to background during playback
Added: branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer-expected.txt (0 => 292667)
--- branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer-expected.txt (rev 0)
+++ branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer-expected.txt 2022-04-09 00:14:44 UTC (rev 292667)
@@ -0,0 +1,27 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 817.00 585.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 817.00 585.00)
+ (contentsOpaque 1)
+ (children 2
+ (GraphicsLayer
+ (position 8.00 13.00)
+ (bounds 20.00 20.00)
+ (contentsOpaque 1)
+ )
+ (GraphicsLayer
+ (position 15.00 15.00)
+ (bounds 802.00 202.00)
+ (drawsContent 1)
+ (repaint rects
+ (rect 201.00 51.00 100.00 100.00)
+ (rect 401.00 51.00 100.00 100.00)
+ )
+ )
+ )
+ )
+ )
+)
+
Added: branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer.html (0 => 292667)
--- branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer.html (rev 0)
+++ branches/safari-613-branch/LayoutTests/compositing/repaint/move-backing-sharing-layer.html 2022-04-09 00:14:44 UTC (rev 292667)
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .trigger {
+ position: absolute;
+ width: 20px;
+ height: 20px;
+ transform: translateZ(0);
+ background-color: silver;
+ }
+
+ .composited-sharing {
+ position: absolute;
+ top: 15px;
+ left: 15px;
+ width: 800px;
+ height: 200px;
+ border: 1px solid blue;
+ }
+
+ .test {
+ position: absolute;
+ transform: scale(1, 1);
+ top: 50px;
+ left: 100px;
+ background: orange;
+ height: 100px;
+ width: 100px;
+ }
+
+ body.changed .test {
+ left: 200px;
+ }
+
+ body.changed.again .test {
+ left: 400px;
+ }
+ </style>
+ <script src=""
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ window.addEventListener('load', () => {
+ setTimeout(async () => {
+ document.body.classList.add('changed');
+ await UIHelper.renderingUpdate();
+
+ if (window.internals)
+ window.internals.startTrackingRepaints();
+
+ document.body.classList.add('again');
+
+ if (window.internals)
+ document.getElementById('layers').textContent = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }, 0);
+ }, false);
+ </script>
+</head>
+<body>
+ <div class="trigger"></div>
+ <div class="composited-sharing">
+ <div class="test"></div>
+ </div>
+<pre id="layers"></pre>
+</body>
+</html>
Added: branches/safari-613-branch/LayoutTests/platform/ios-wk2/compositing/repaint/move-backing-sharing-layer-expected.txt (0 => 292667)
--- branches/safari-613-branch/LayoutTests/platform/ios-wk2/compositing/repaint/move-backing-sharing-layer-expected.txt (rev 0)
+++ branches/safari-613-branch/LayoutTests/platform/ios-wk2/compositing/repaint/move-backing-sharing-layer-expected.txt 2022-04-09 00:14:44 UTC (rev 292667)
@@ -0,0 +1,27 @@
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 817.00 600.00)
+ (children 1
+ (GraphicsLayer
+ (bounds 817.00 600.00)
+ (contentsOpaque 1)
+ (children 2
+ (GraphicsLayer
+ (position 8.00 13.00)
+ (bounds 20.00 20.00)
+ (contentsOpaque 1)
+ )
+ (GraphicsLayer
+ (position 15.00 15.00)
+ (bounds 802.00 202.00)
+ (drawsContent 1)
+ (repaint rects
+ (rect 201.00 51.00 100.00 100.00)
+ (rect 401.00 51.00 100.00 100.00)
+ )
+ )
+ )
+ )
+ )
+)
+
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (292666 => 292667)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-04-09 00:14:40 UTC (rev 292666)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-04-09 00:14:44 UTC (rev 292667)
@@ -1,5 +1,61 @@
2022-04-07 Alan Coon <[email protected]>
+ Cherry-pick r291493. rdar://problem/91446052
+
+ REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
+ https://bugs.webkit.org/show_bug.cgi?id=238047
+ <rdar://problem/90451319>
+
+ Reviewed by Alan Bujtas.
+
+ Source/WebCore:
+
+ In r290628 I added a call to clearRepaintRects() when changing the backing sharing
+ target layer for a RenderLayer. However, for a layer using backing sharing, this
+ gets called twice during a normal compositing update, which has the effect of
+ clearing the cached repaint rects so that a layer repaint always computes new rects.
+ Thus, if a layer moved, we'd fail to repaint the old rect.
+
+ RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
+ rects when state changes, so we don't need this clearing.
+
+ Test: compositing/repaint/move-backing-sharing-layer.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::setBackingProviderLayer):
+
+ LayoutTests:
+
+ * compositing/repaint/move-backing-sharing-layer-expected.txt: Added.
+ * compositing/repaint/move-backing-sharing-layer.html: Added.
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291493 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-18 Simon Fraser <[email protected]>
+
+ REGRESSION (r290628): Scrubber makes a visual trail when scrubbing on tv.youtube.com
+ https://bugs.webkit.org/show_bug.cgi?id=238047
+ <rdar://problem/90451319>
+
+ Reviewed by Alan Bujtas.
+
+ In r290628 I added a call to clearRepaintRects() when changing the backing sharing
+ target layer for a RenderLayer. However, for a layer using backing sharing, this
+ gets called twice during a normal compositing update, which has the effect of
+ clearing the cached repaint rects so that a layer repaint always computes new rects.
+ Thus, if a layer moved, we'd fail to repaint the old rect.
+
+ RenderLayerBacking::setBackingSharingLayers() already has logic to update repaint
+ rects when state changes, so we don't need this clearing.
+
+ Test: compositing/repaint/move-backing-sharing-layer.html
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::RenderLayer::setBackingProviderLayer):
+
+2022-04-07 Alan Coon <[email protected]>
+
Cherry-pick r291118. rdar://problem/91446071
[iOS] Netflix.com fails to resume after moving app to background during playback
Modified: branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp (292666 => 292667)
--- branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp 2022-04-09 00:14:40 UTC (rev 292666)
+++ branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp 2022-04-09 00:14:44 UTC (rev 292667)
@@ -1888,10 +1888,8 @@
if (backingProvider == m_backingProviderLayer)
return;
- if (!renderer().renderTreeBeingDestroyed()) {
+ if (!renderer().renderTreeBeingDestroyed())
clearClipRectsIncludingDescendants();
- clearRepaintRects();
- }
m_backingProviderLayer = backingProvider;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes