Title: [284836] branches/safari-612-branch
Revision
284836
Author
[email protected]
Date
2021-10-25 14:51:17 -0700 (Mon, 25 Oct 2021)

Log Message

Cherry-pick r284247. rdar://problem/84629726

    REGRESSION (r276370): Elements with animated transform property might not properly rendered
    https://bugs.webkit.org/show_bug.cgi?id=230753

    Reviewed by Myles C. Maxfield.

    Source/WebCore:

    The change in r276370 was incorrect, resulting in the geometry map being used when
    an element had a transform and `transform-style: preserves-3d`.

    Fix by going back to testing for the presence of the various transform properties which
    affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.

    Test: fast/repaint/transform-preserve-3d-repaint.html

    * rendering/RenderGeometryMap.cpp:
    (WebCore::canMapBetweenRenderersViaLayers):

    LayoutTests:

    * fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
    * fast/repaint/transform-preserve-3d-repaint.html: Added.

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284247 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Added Paths

Diff

Modified: branches/safari-612-branch/LayoutTests/ChangeLog (284835 => 284836)


--- branches/safari-612-branch/LayoutTests/ChangeLog	2021-10-25 21:51:13 UTC (rev 284835)
+++ branches/safari-612-branch/LayoutTests/ChangeLog	2021-10-25 21:51:17 UTC (rev 284836)
@@ -1,5 +1,45 @@
 2021-10-25  Null  <[email protected]>
 
+        Cherry-pick r284247. rdar://problem/84629726
+
+    REGRESSION (r276370): Elements with animated transform property might not properly rendered
+    https://bugs.webkit.org/show_bug.cgi?id=230753
+    
+    Reviewed by Myles C. Maxfield.
+    
+    Source/WebCore:
+    
+    The change in r276370 was incorrect, resulting in the geometry map being used when
+    an element had a transform and `transform-style: preserves-3d`.
+    
+    Fix by going back to testing for the presence of the various transform properties which
+    affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.
+    
+    Test: fast/repaint/transform-preserve-3d-repaint.html
+    
+    * rendering/RenderGeometryMap.cpp:
+    (WebCore::canMapBetweenRenderersViaLayers):
+    
+    LayoutTests:
+    
+    * fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
+    * fast/repaint/transform-preserve-3d-repaint.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-10-15  Simon Fraser  <[email protected]>
+
+            REGRESSION (r276370): Elements with animated transform property might not properly rendered
+            https://bugs.webkit.org/show_bug.cgi?id=230753
+
+            Reviewed by Myles C. Maxfield.
+
+            * fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
+            * fast/repaint/transform-preserve-3d-repaint.html: Added.
+
+2021-10-25  Null  <[email protected]>
+
         Cherry-pick r283979. rdar://problem/84630712
 
     WebGL first clear is lost when scissor is used for preserveDrawingBuffer:true in some conditions

Added: branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint-expected.txt (0 => 284836)


--- branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint-expected.txt	                        (rev 0)
+++ branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint-expected.txt	2021-10-25 21:51:17 UTC (rev 284836)
@@ -0,0 +1,6 @@
+(repaint rects
+  (rect 38 20 220 150)
+  (rect 38 20 220 150)
+  (rect 28 20 220 150)
+)
+

Added: branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint.html (0 => 284836)


--- branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint.html	                        (rev 0)
+++ branches/safari-612-branch/LayoutTests/fast/repaint/transform-preserve-3d-repaint.html	2021-10-25 21:51:17 UTC (rev 284836)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .container {
+            position: relative;
+            transform-style: preserve-3d;
+            z-index: 0;
+            width: 300px;
+            margin: 20px;
+            height: 0px;
+            
+        }
+        .box {
+            position: relative;
+            width: 220px;
+            height: 150px;
+            margin: 10px;
+            background-color: silver;
+        }
+        
+        #console {
+            margin-top: 100px;
+        }
+    </style>
+    <script src=""
+    <script>
+        function repaintTest()
+        {
+            const container = document.querySelector('.container');
+            container.style.transform = 'translate(-10px, 0)';
+        }
+    </script>
+</head>
+<body _onload_="runRepaintTest()">
+    <div class="container">
+        <div class="box"></div>
+    </div>
+</body>
+</html>

Modified: branches/safari-612-branch/Source/WebCore/ChangeLog (284835 => 284836)


--- branches/safari-612-branch/Source/WebCore/ChangeLog	2021-10-25 21:51:13 UTC (rev 284835)
+++ branches/safari-612-branch/Source/WebCore/ChangeLog	2021-10-25 21:51:17 UTC (rev 284836)
@@ -1,5 +1,53 @@
 2021-10-25  Null  <[email protected]>
 
+        Cherry-pick r284247. rdar://problem/84629726
+
+    REGRESSION (r276370): Elements with animated transform property might not properly rendered
+    https://bugs.webkit.org/show_bug.cgi?id=230753
+    
+    Reviewed by Myles C. Maxfield.
+    
+    Source/WebCore:
+    
+    The change in r276370 was incorrect, resulting in the geometry map being used when
+    an element had a transform and `transform-style: preserves-3d`.
+    
+    Fix by going back to testing for the presence of the various transform properties which
+    affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.
+    
+    Test: fast/repaint/transform-preserve-3d-repaint.html
+    
+    * rendering/RenderGeometryMap.cpp:
+    (WebCore::canMapBetweenRenderersViaLayers):
+    
+    LayoutTests:
+    
+    * fast/repaint/transform-preserve-3d-repaint-expected.txt: Added.
+    * fast/repaint/transform-preserve-3d-repaint.html: Added.
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2021-10-15  Simon Fraser  <[email protected]>
+
+            REGRESSION (r276370): Elements with animated transform property might not properly rendered
+            https://bugs.webkit.org/show_bug.cgi?id=230753
+
+            Reviewed by Myles C. Maxfield.
+
+            The change in r276370 was incorrect, resulting in the geometry map being used when
+            an element had a transform and `transform-style: preserves-3d`.
+
+            Fix by going back to testing for the presence of the various transform properties which
+            affect geometry. hasTransformRelatedProperty() is still useful as a fast bit-check.
+
+            Test: fast/repaint/transform-preserve-3d-repaint.html
+
+            * rendering/RenderGeometryMap.cpp:
+            (WebCore::canMapBetweenRenderersViaLayers):
+
+2021-10-25  Null  <[email protected]>
+
         Cherry-pick r284007. rdar://problem/84630339
 
     Cocoa GraphicsContextGLOpenGL uses depth and stencil for pbuffers on ANGLE Metal

Modified: branches/safari-612-branch/Source/WebCore/rendering/RenderGeometryMap.cpp (284835 => 284836)


--- branches/safari-612-branch/Source/WebCore/rendering/RenderGeometryMap.cpp	2021-10-25 21:51:13 UTC (rev 284835)
+++ branches/safari-612-branch/Source/WebCore/rendering/RenderGeometryMap.cpp	2021-10-25 21:51:17 UTC (rev 284836)
@@ -154,7 +154,7 @@
         if (current->isFixedPositioned() || style.isFlippedBlocksWritingMode())
             return false;
 
-        if (current->hasTransformRelatedProperty() && !current->style().preserves3D())
+        if (current->hasTransformRelatedProperty() && (style.hasTransform() || style.translate() || style.scale() || style.rotate() || style.hasPerspective()))
             return false;
         
         if (current->isRenderFragmentedFlow())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to