Changeset 246278 in webkit
- Timestamp:
- Jun 10, 2019 1:43:17 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r246277 r246278 1 2019-06-10 Antti Koivisto <antti@apple.com> 2 3 Event region should be set on scrolledContentsLayer if it exists 4 https://bugs.webkit.org/show_bug.cgi?id=198717 5 <rdar://problem/51572169> 6 7 Reviewed by Simon Fraser. 8 9 * pointerevents/ios/touch-action-region-backing-sharing-expected.txt: 10 * pointerevents/ios/touch-action-region-overflow-expected.txt: Added. 11 * pointerevents/ios/touch-action-region-overflow.html: Added. 12 1 13 2019-06-10 Daniel Bates <dabates@apple.com> 2 14 -
trunk/LayoutTests/pointerevents/ios/touch-action-region-backing-sharing-expected.txt
r245175 r246278 2 2 (anchor 0.00 0.00) 3 3 (bounds 800.00 600.00) 4 (deep color 1)5 4 (children 1 6 5 (GraphicsLayer … … 10 9 (rect (0,0) width=800 height=600) 11 10 ) 12 (deep color 1)13 11 (children 2 14 12 (GraphicsLayer 15 13 (position 8.00 13.00) 16 14 (bounds 200.00 200.00) 17 (event region18 (rect (0,0) width=500 height=500)19 )20 (deep color 1)21 15 (children 1 22 16 (GraphicsLayer … … 27 21 (bounds 500.00 500.00) 28 22 (drawsContent 1) 29 (deep color 1) 23 (event region 24 (rect (0,0) width=500 height=500) 25 ) 30 26 ) 31 27 ) … … 49 45 ) 50 46 ) 51 (deep color 1)52 47 ) 53 48 ) -
trunk/Source/WebCore/ChangeLog
r246277 r246278 1 2019-06-10 Antti Koivisto <antti@apple.com> 2 3 Event region should be set on scrolledContentsLayer if it exists 4 https://bugs.webkit.org/show_bug.cgi?id=198717 5 <rdar://problem/51572169> 6 7 Reviewed by Simon Fraser. 8 9 Test: pointerevents/ios/touch-action-region-overflow.html 10 11 * rendering/RenderLayerBacking.cpp: 12 (WebCore::RenderLayerBacking::updateConfiguration): 13 14 Move to updateBackingAndHierarchy. 15 16 (WebCore::RenderLayerBacking::updateEventRegion): 17 18 - Set event region on scrolledContentsLayer if it exists 19 - Translate away the scroll offset 20 - Get the offset from renderer from the GraphicsLayer so scrolling and non-scrolling case can be handled uniformly. 21 22 * rendering/RenderLayerBacking.h: 23 * rendering/RenderLayerCompositor.cpp: 24 (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): 25 26 Invoke updateEventRegion after geometry update so offsets are already available on GraphicsLayer. 27 1 28 2019-06-10 Daniel Bates <dabates@apple.com> 2 29 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r246019 r246278 842 842 updateRootLayerConfiguration(); 843 843 844 updateEventRegion();845 846 844 // Requires layout. 847 845 if (contentsInfo.isDirectlyCompositedImage()) … … 1527 1525 layer->paintLayerWithEffects(nullContext, paintingInfo, paintFlags); 1528 1526 1529 auto contentOffset = roundedIntSize(contentOffsetInCompositingLayer()); 1530 eventRegion.translate(contentOffset); 1531 m_graphicsLayer->setEventRegion(WTFMove(eventRegion)); 1532 1527 GraphicsLayer& layerForEventRegion = m_scrolledContentsLayer ? *m_scrolledContentsLayer : *m_graphicsLayer; 1528 1529 auto layerOffset = toIntSize(layerForEventRegion.scrollOffset()) - roundedIntSize(layerForEventRegion.offsetFromRenderer()); 1530 eventRegion.translate(layerOffset); 1531 1532 layerForEventRegion.setEventRegion(WTFMove(eventRegion)); 1533 1533 #endif 1534 1534 } -
trunk/Source/WebCore/rendering/RenderLayerBacking.h
r245977 r246278 217 217 // Returns true if changed. 218 218 bool updateCompositedBounds(); 219 220 void updateEventRegion(); 219 221 220 222 void updateAfterWidgetResize(); … … 359 361 360 362 void updateDrawsContent(PaintedContentsInfo&); 361 void updateEventRegion();362 363 363 364 // Returns true if this compositing layer has no visible content. -
trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp
r246231 r246278 1211 1211 scrollingNodeChanges.add(ScrollingNodeChangeFlags::LayerGeometry); 1212 1212 1213 // This needs to happen after any geometry update. 1214 // FIXME: Use separate bit for event region invalidation. 1215 if (layerNeedsUpdate || layer.needsCompositingConfigurationUpdate()) 1216 layerBacking->updateEventRegion(); 1217 1213 1218 if (auto* reflection = layer.reflectionLayer()) { 1214 1219 if (auto* reflectionBacking = reflection->backing()) {
Note: See TracChangeset
for help on using the changeset viewer.