Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Commit fefda94

Browse files
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): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263980 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 379cd11 commit fefda94

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

Source/WebCore/ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2020-07-06 Simon Fraser <[email protected]>
2+
3+
ASSERT_NOT_REACHED() in EventRegionContext::popClip()
4+
https://bugs.webkit.org/show_bug.cgi?id=213905
5+
6+
Reviewed by Daniel Bates.
7+
8+
Fix an assertion seen on bing.com, tesla.com etc where event region painting
9+
would have mismatched push/pop because of an obvious code error.
10+
11+
I spent too long trying to make a testcase and gave up.
12+
13+
* rendering/RenderLayer.cpp:
14+
(WebCore::RenderLayer::restoreClip):
15+
116
2020-07-06 Sam Weinig <[email protected]>
217

318
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

Source/WebCore/rendering/RenderLayer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4213,12 +4213,12 @@ void RenderLayer::clipToRect(GraphicsContext& context, const LayerPaintingInfo&
42134213

42144214
void RenderLayer::restoreClip(GraphicsContext& context, const LayerPaintingInfo& paintingInfo, const ClipRect& clipRect)
42154215
{
4216-
if ((!clipRect.isInfinite() && clipRect.rect() != paintingInfo.paintDirtyRect) || clipRect.affectedByRadius()) {
4216+
bool needsClipping = !clipRect.isInfinite() && clipRect.rect() != paintingInfo.paintDirtyRect;
4217+
if (needsClipping || clipRect.affectedByRadius())
42174218
context.restore();
42184219

4219-
if (paintingInfo.eventRegionContext)
4220-
paintingInfo.eventRegionContext->popClip();
4221-
}
4220+
if (needsClipping && paintingInfo.eventRegionContext)
4221+
paintingInfo.eventRegionContext->popClip();
42224222
}
42234223

42244224
static void performOverlapTests(OverlapTestRequestMap& overlapTestRequests, const RenderLayer* rootLayer, const RenderLayer* layer)

0 commit comments

Comments
 (0)