Title: [263980] trunk/Source/WebCore
Revision
263980
Author
[email protected]
Date
2020-07-06 12:48:27 -0700 (Mon, 06 Jul 2020)

Log Message

ASSERT_NOT_REACHED() in EventRegionContext::popClip()
https://bugs.webkit.org/show_bug.cgi?id=213905

Reviewed by Daniel Bates.

Fix an assertion seen on bing.com, tesla.com etc where event region painting
would have mismatched push/pop because of an obvious code error.

I spent too long trying to make a testcase and gave up.

* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::restoreClip):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (263979 => 263980)


--- trunk/Source/WebCore/ChangeLog	2020-07-06 19:45:54 UTC (rev 263979)
+++ trunk/Source/WebCore/ChangeLog	2020-07-06 19:48:27 UTC (rev 263980)
@@ -1,3 +1,18 @@
+2020-07-06  Simon Fraser  <[email protected]>
+
+        ASSERT_NOT_REACHED() in EventRegionContext::popClip()
+        https://bugs.webkit.org/show_bug.cgi?id=213905
+
+        Reviewed by Daniel Bates.
+
+        Fix an assertion seen on bing.com, tesla.com etc where event region painting
+        would have mismatched push/pop because of an obvious code error.
+
+        I spent too long trying to make a testcase and gave up.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::RenderLayer::restoreClip):
+
 2020-07-06  Sam Weinig  <[email protected]>
 
         Compile-time enable (but leave disabled at runtime by default) date/time input types on macOS to allow testing of cross platform (e.g. DOM) aspects of the controls

Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (263979 => 263980)


--- trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-06 19:45:54 UTC (rev 263979)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp	2020-07-06 19:48:27 UTC (rev 263980)
@@ -4213,12 +4213,12 @@
 
 void RenderLayer::restoreClip(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, const ClipRect& clipRect)
 {
-    if ((!clipRect.isInfinite() && clipRect.rect() != paintingInfo.paintDirtyRect) || clipRect.affectedByRadius()) {
+    bool needsClipping = !clipRect.isInfinite() && clipRect.rect() != paintingInfo.paintDirtyRect;
+    if (needsClipping || clipRect.affectedByRadius())
         context.restore();
 
-        if (paintingInfo.eventRegionContext)
-            paintingInfo.eventRegionContext->popClip();
-    }
+    if (needsClipping && paintingInfo.eventRegionContext)
+        paintingInfo.eventRegionContext->popClip();
 }
 
 static void performOverlapTests(OverlapTestRequestMap& overlapTestRequests, const RenderLayer* rootLayer, const RenderLayer* layer)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to