Compositing layer that renders two positioned elements should not hit test
authorantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 22:35:36 +0000 (22:35 +0000)
committerantti@apple.com <antti@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Mar 2019 22:35:36 +0000 (22:35 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195371
<rdar://problem/48649586>

Reviewed by Simon Fraser.

Followup to fix the test case (fast/scrolling/ios/overflow-scroll-overlap-2.html)

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::setEventRegion):

Revert a last minute change (that was done to fix a Mac displaylist test).

* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::paintIntoLayer):

Compute the region on iOS only for now (it is not used on other platforms).

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

Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
Source/WebCore/rendering/RenderLayerBacking.cpp

index eca26e5..65ddbd1 100644 (file)
@@ -1,3 +1,23 @@
+2019-03-12  Antti Koivisto  <antti@apple.com>
+
+        Compositing layer that renders two positioned elements should not hit test
+        https://bugs.webkit.org/show_bug.cgi?id=195371
+        <rdar://problem/48649586>
+
+        Reviewed by Simon Fraser.
+
+        Followup to fix the test case (fast/scrolling/ios/overflow-scroll-overlap-2.html)
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::setEventRegion):
+
+        Revert a last minute change (that was done to fix a Mac displaylist test).
+
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::paintIntoLayer):
+
+        Compute the region on iOS only for now (it is not used on other platforms).
+
 2019-03-12  Dean Jackson  <dino@apple.com>
 
         [WebGL] WebGLBuffer can be too large
index a91ef00..d378fc4 100644 (file)
@@ -990,7 +990,7 @@ void GraphicsLayerCA::setEventRegion(std::unique_ptr<Region>&& eventRegion)
         return;
 
     GraphicsLayer::setEventRegion(WTFMove(eventRegion));
-    noteLayerPropertyChanged(EventRegionChanged, DontScheduleFlush);
+    noteLayerPropertyChanged(EventRegionChanged, m_isCommittingChanges ? DontScheduleFlush : ScheduleFlush);
 }
 
 bool GraphicsLayerCA::shouldRepaintOnSizeChange() const
index cf9426a..2d30cc9 100644 (file)
@@ -2576,11 +2576,14 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap
 
     RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer);
 
+#if PLATFORM(IOS_FAMILY)
     auto eventRegion = std::make_unique<Region>();
     paintingInfo.eventRegion = eventRegion.get();
+#endif
 
     m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags);
 
+#if PLATFORM(IOS_FAMILY)
     paintingInfo.eventRegion = nullptr;
     // Use null event region to indicate the entire layer is sensitive to events (the common case).
     // FIXME: We could optimize Region so it doesn't use lots of memory if it contains a single rect only.
@@ -2589,6 +2592,7 @@ void RenderLayerBacking::paintIntoLayer(const GraphicsLayer* graphicsLayer, Grap
     else
         eventRegion->translate(roundedIntSize(contentOffsetInCompositingLayer()));
     m_graphicsLayer->setEventRegion(WTFMove(eventRegion));
+#endif
 
     if (m_owningLayer.containsDirtyOverlayScrollbars())
         m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags | RenderLayer::PaintLayerPaintingOverlayScrollbars);