Title: [267045] branches/safari-610-branch
Revision
267045
Author
[email protected]
Date
2020-09-14 15:17:19 -0700 (Mon, 14 Sep 2020)

Log Message

Cherry-pick r266818. rdar://problem/68881035

    [Repaint] RenderElement::setStyle may issue redundant repaint
    https://bugs.webkit.org/show_bug.cgi?id=216324
    <rdar://problem/68595896>

    Reviewed by Simon Fraser.

    Source/WebCore:

    If we issue a repaint in ::styleWillChange, we should not need to re-issue it again in RenderElement::setStyle (see r266803 for details).

    * rendering/RenderElement.cpp:
    (WebCore::RenderElement::repaintBeforeStyleChange):
    (WebCore::RenderElement::setStyle):
    * rendering/RenderElement.h:

    LayoutTests:

    * compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt:
    * fast/css-custom-paint/delay-repaint-expected.txt:
    * fast/images/async-image-multiple-clients-repaint-expected.txt:
    * fast/repaint/horizontal-bt-overflow-child-expected.txt:
    * fast/repaint/horizontal-bt-overflow-parent-expected.txt:
    * fast/repaint/horizontal-bt-overflow-same-expected.txt:
    * fast/repaint/mutate-non-visible-expected.txt:
    * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt:
    * fast/repaint/overflow-flipped-writing-mode-table-expected.txt:
    * fast/repaint/spanner-with-margin-expected.txt:
    * fast/repaint/table-row-repaint-expected.txt:
    * fast/repaint/vertical-overflow-child-expected.txt:
    * fast/repaint/vertical-overflow-parent-expected.txt:
    * fast/repaint/vertical-overflow-same-expected.txt:
    * svg/transforms/svg-transform-foreign-object-repaint-expected.txt:

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

Modified Paths

Diff

Modified: branches/safari-610-branch/LayoutTests/ChangeLog (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/ChangeLog	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/ChangeLog	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,71 @@
 2020-09-14  Alan Coon  <[email protected]>
 
+        Cherry-pick r266818. rdar://problem/68881035
+
+    [Repaint] RenderElement::setStyle may issue redundant repaint
+    https://bugs.webkit.org/show_bug.cgi?id=216324
+    <rdar://problem/68595896>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    If we issue a repaint in ::styleWillChange, we should not need to re-issue it again in RenderElement::setStyle (see r266803 for details).
+    
+    * rendering/RenderElement.cpp:
+    (WebCore::RenderElement::repaintBeforeStyleChange):
+    (WebCore::RenderElement::setStyle):
+    * rendering/RenderElement.h:
+    
+    LayoutTests:
+    
+    * compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt:
+    * fast/css-custom-paint/delay-repaint-expected.txt:
+    * fast/images/async-image-multiple-clients-repaint-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-child-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-parent-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-same-expected.txt:
+    * fast/repaint/mutate-non-visible-expected.txt:
+    * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt:
+    * fast/repaint/overflow-flipped-writing-mode-table-expected.txt:
+    * fast/repaint/spanner-with-margin-expected.txt:
+    * fast/repaint/table-row-repaint-expected.txt:
+    * fast/repaint/vertical-overflow-child-expected.txt:
+    * fast/repaint/vertical-overflow-parent-expected.txt:
+    * fast/repaint/vertical-overflow-same-expected.txt:
+    * svg/transforms/svg-transform-foreign-object-repaint-expected.txt:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-09-10  Zalan Bujtas  <[email protected]>
+
+            [Repaint] RenderElement::setStyle may issue redundant repaint
+            https://bugs.webkit.org/show_bug.cgi?id=216324
+            <rdar://problem/68595896>
+
+            Reviewed by Simon Fraser.
+
+            * compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
+            * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt:
+            * fast/css-custom-paint/delay-repaint-expected.txt:
+            * fast/images/async-image-multiple-clients-repaint-expected.txt:
+            * fast/repaint/horizontal-bt-overflow-child-expected.txt:
+            * fast/repaint/horizontal-bt-overflow-parent-expected.txt:
+            * fast/repaint/horizontal-bt-overflow-same-expected.txt:
+            * fast/repaint/mutate-non-visible-expected.txt:
+            * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt:
+            * fast/repaint/overflow-flipped-writing-mode-table-expected.txt:
+            * fast/repaint/spanner-with-margin-expected.txt:
+            * fast/repaint/table-row-repaint-expected.txt:
+            * fast/repaint/vertical-overflow-child-expected.txt:
+            * fast/repaint/vertical-overflow-parent-expected.txt:
+            * fast/repaint/vertical-overflow-same-expected.txt:
+            * svg/transforms/svg-transform-foreign-object-repaint-expected.txt:
+
+2020-09-14  Alan Coon  <[email protected]>
+
         Cherry-pick r266803. rdar://problem/68881014
 
     [Repaint] styleWillChange may call repaint on the same renderer multiple times.

Modified: branches/safari-610-branch/LayoutTests/compositing/masks/compositing-clip-path-change-no-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/compositing/masks/compositing-clip-path-change-no-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/compositing/masks/compositing-clip-path-change-no-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -29,12 +29,10 @@
               (drawsContent 1)
               (repaint rects
                 (rect 0.00 0.00 300.00 300.00)
-                (rect 0.00 0.00 300.00 300.00)
               )
             )
           (repaint rects
             (rect 0.00 0.00 300.00 300.00)
-            (rect 0.00 0.00 300.00 300.00)
           )
         )
       )

Modified: branches/safari-610-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -18,7 +18,6 @@
           (drawsContent 1)
           (repaint rects
             (rect 151.00 81.00 71.00 110.00)
-            (rect 151.00 81.00 71.00 110.00)
           )
         )
       )

Modified: branches/safari-610-branch/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/css-custom-paint/animate-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,6 +1,5 @@
 (repaint rects
   (rect 0 0 800 600)
   (rect 8 8 150 150)
-  (rect 8 8 150 150)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/css-custom-paint/delay-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,6 +1,5 @@
 (repaint rects
   (rect 0 0 800 600)
   (rect 8 8 150 150)
-  (rect 8 8 150 150)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/images/async-image-multiple-clients-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -4,6 +4,5 @@
   (rect 8 344 200 100)
   (rect 8 344 200 100)
   (rect 8 344 200 100)
-  (rect 8 344 200 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-child-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-child-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-child-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 29 106 100 100)
-  (rect 29 106 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-parent-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-parent-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-parent-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 29 29 100 100)
-  (rect 29 29 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-same-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-same-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/horizontal-bt-overflow-same-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 29 21 100 100)
-  (rect 29 21 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/mutate-non-visible-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/mutate-non-visible-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/mutate-non-visible-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,6 +1,5 @@
 Test repaint-only style changes in non-visible elements don't trigger repaints.
 (repaint rects
   (rect 10 28 100 100)
-  (rect 10 28 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,6 +1,5 @@
 Hidden Text
 (repaint rects
   (rect 550 8 200 50)
-  (rect 550 8 200 50)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/overflow-flipped-writing-mode-table-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/overflow-flipped-writing-mode-table-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/overflow-flipped-writing-mode-table-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 8 8 100 50)
-  (rect 8 8 100 50)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/spanner-with-margin-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/spanner-with-margin-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/spanner-with-margin-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -20,6 +20,5 @@
 S
 (repaint rects
   (rect 104 334 18 37)
-  (rect 104 334 18 37)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/table-row-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/table-row-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/table-row-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 8 61 106 15)
-  (rect 8 61 106 15)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-child-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-child-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-child-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 214 21 100 100)
-  (rect 214 21 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-parent-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-parent-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-parent-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 29 29 100 100)
-  (rect 29 29 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-same-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-same-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/fast/repaint/vertical-overflow-same-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 29 21 100 100)
-  (rect 29 21 100 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/platform/ios/fast/images/async-image-multiple-clients-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -4,6 +4,5 @@
   (rect 8 348 200 100)
   (rect 8 348 200 100)
   (rect 8 348 200 100)
-  (rect 8 348 200 100)
 )
 

Modified: branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-lr-paginated-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -13,7 +13,6 @@
           (drawsContent 1)
           (repaint rects
             (rect 27.00 25.00 52.00 77.00)
-            (rect 27.00 25.00 52.00 77.00)
           )
         )
       )

Modified: branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/platform/ios-wk2/compositing/columns/composited-rl-paginated-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -15,7 +15,6 @@
           (drawsContent 1)
           (repaint rects
             (rect 27.00 25.00 52.00 77.00)
-            (rect 27.00 25.00 52.00 77.00)
           )
         )
       )

Modified: branches/safari-610-branch/LayoutTests/svg/transforms/svg-transform-foreign-object-repaint-expected.txt (267044 => 267045)


--- branches/safari-610-branch/LayoutTests/svg/transforms/svg-transform-foreign-object-repaint-expected.txt	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/LayoutTests/svg/transforms/svg-transform-foreign-object-repaint-expected.txt	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,4 @@
 (repaint rects
   (rect 58 58 100 100)
-  (rect 58 58 100 100)
 )
 

Modified: branches/safari-610-branch/Source/WebCore/ChangeLog (267044 => 267045)


--- branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/Source/WebCore/ChangeLog	2020-09-14 22:17:19 UTC (rev 267045)
@@ -1,5 +1,61 @@
 2020-09-14  Alan Coon  <[email protected]>
 
+        Cherry-pick r266818. rdar://problem/68881035
+
+    [Repaint] RenderElement::setStyle may issue redundant repaint
+    https://bugs.webkit.org/show_bug.cgi?id=216324
+    <rdar://problem/68595896>
+    
+    Reviewed by Simon Fraser.
+    
+    Source/WebCore:
+    
+    If we issue a repaint in ::styleWillChange, we should not need to re-issue it again in RenderElement::setStyle (see r266803 for details).
+    
+    * rendering/RenderElement.cpp:
+    (WebCore::RenderElement::repaintBeforeStyleChange):
+    (WebCore::RenderElement::setStyle):
+    * rendering/RenderElement.h:
+    
+    LayoutTests:
+    
+    * compositing/masks/compositing-clip-path-change-no-repaint-expected.txt:
+    * compositing/shared-backing/overflow-scroll/shared-layer-repaint-expected.txt:
+    * fast/css-custom-paint/delay-repaint-expected.txt:
+    * fast/images/async-image-multiple-clients-repaint-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-child-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-parent-expected.txt:
+    * fast/repaint/horizontal-bt-overflow-same-expected.txt:
+    * fast/repaint/mutate-non-visible-expected.txt:
+    * fast/repaint/negative-text-indent-with-overflow-hidden-expected.txt:
+    * fast/repaint/overflow-flipped-writing-mode-table-expected.txt:
+    * fast/repaint/spanner-with-margin-expected.txt:
+    * fast/repaint/table-row-repaint-expected.txt:
+    * fast/repaint/vertical-overflow-child-expected.txt:
+    * fast/repaint/vertical-overflow-parent-expected.txt:
+    * fast/repaint/vertical-overflow-same-expected.txt:
+    * svg/transforms/svg-transform-foreign-object-repaint-expected.txt:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@266818 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2020-09-10  Zalan Bujtas  <[email protected]>
+
+            [Repaint] RenderElement::setStyle may issue redundant repaint
+            https://bugs.webkit.org/show_bug.cgi?id=216324
+            <rdar://problem/68595896>
+
+            Reviewed by Simon Fraser.
+
+            If we issue a repaint in ::styleWillChange, we should not need to re-issue it again in RenderElement::setStyle (see r266803 for details).
+
+            * rendering/RenderElement.cpp:
+            (WebCore::RenderElement::repaintBeforeStyleChange):
+            (WebCore::RenderElement::setStyle):
+            * rendering/RenderElement.h:
+
+2020-09-14  Alan Coon  <[email protected]>
+
         Cherry-pick r266803. rdar://problem/68881014
 
     [Repaint] styleWillChange may call repaint on the same renderer multiple times.

Modified: branches/safari-610-branch/Source/WebCore/rendering/RenderElement.cpp (267044 => 267045)


--- branches/safari-610-branch/Source/WebCore/rendering/RenderElement.cpp	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/Source/WebCore/rendering/RenderElement.cpp	2020-09-14 22:17:19 UTC (rev 267045)
@@ -380,9 +380,13 @@
         updateImage(oldShapeValue ? oldShapeValue->image() : nullptr, newShapeValue ? newShapeValue->image() : nullptr);
 }
 
-void RenderElement::repaintBeforeStyleChange(StyleDifference diff, const RenderStyle& oldStyle, const RenderStyle& newStyle)
+bool RenderElement::repaintBeforeStyleChange(StyleDifference diff, const RenderStyle& oldStyle, const RenderStyle& newStyle)
 {
-    auto repaintBeforeStyleChange = [&] {
+    if (oldStyle.visibility() == Visibility::Hidden) {
+        // Repaint on hidden renderer is a no-op.
+        return false;
+    }
+    auto shouldRepaintBeforeStyleChange = [&] {
         if (!parent()) {
             // Can't resolve absolute coordinates.
             return false;
@@ -411,8 +415,11 @@
         }
         return false;
     }();
-    if (repaintBeforeStyleChange)
+    if (shouldRepaintBeforeStyleChange) {
         repaint();
+        return true;
+    }
+    return false;
 }
 
 void RenderElement::initializeStyle()
@@ -448,7 +455,7 @@
 
     Style::loadPendingResources(style, document(), element());
 
-    repaintBeforeStyleChange(diff, m_style, style);
+    auto didRepaint = repaintBeforeStyleChange(diff, m_style, style);
     styleWillChange(diff, style);
     auto oldStyle = m_style.replace(WTFMove(style));
     bool detachedFromParent = !parent();
@@ -487,7 +494,7 @@
             setNeedsSimplifiedNormalFlowLayout();
     }
 
-    if (updatedDiff == StyleDifference::RepaintLayer || shouldRepaintForStyleDifference(updatedDiff)) {
+    if (!didRepaint && (updatedDiff == StyleDifference::RepaintLayer || shouldRepaintForStyleDifference(updatedDiff))) {
         // Do a repaint with the new style now, e.g., for example if we go from
         // not having an outline to having an outline.
         repaint();

Modified: branches/safari-610-branch/Source/WebCore/rendering/RenderElement.h (267044 => 267045)


--- branches/safari-610-branch/Source/WebCore/rendering/RenderElement.h	2020-09-14 22:17:13 UTC (rev 267044)
+++ branches/safari-610-branch/Source/WebCore/rendering/RenderElement.h	2020-09-14 22:17:19 UTC (rev 267045)
@@ -259,7 +259,7 @@
     void setFirstChild(RenderObject* child) { m_firstChild = child; }
     void setLastChild(RenderObject* child) { m_lastChild = child; }
 
-    void repaintBeforeStyleChange(StyleDifference, const RenderStyle& oldStyle, const RenderStyle& newStyle);
+    bool repaintBeforeStyleChange(StyleDifference, const RenderStyle& oldStyle, const RenderStyle& newStyle);
 
     virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle);
     virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to