Changeset 242794 in webkit
- Timestamp:
- Mar 12, 2019 7:45:31 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r242791 r242794 1 2019-03-12 Antti Koivisto <antti@apple.com> 2 3 Compositing layer that renders two positioned elements should not hit test 4 https://bugs.webkit.org/show_bug.cgi?id=195371 5 <rdar://problem/48649586> 6 7 Reviewed by Simon Fraser. 8 9 * fast/scrolling/ios/overflow-scroll-overlap-2-expected.txt: Added. 10 * fast/scrolling/ios/overflow-scroll-overlap-2.html: Added. 11 1 12 2019-03-12 Enrique Ocaña González <eocanha@igalia.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r242793 r242794 1 2019-03-12 Antti Koivisto <antti@apple.com> 2 3 Compositing layer that renders two positioned elements should not hit test 4 https://bugs.webkit.org/show_bug.cgi?id=195371 5 <rdar://problem/48649586> 6 7 Reviewed by Simon Fraser. 8 9 Compute and pass an event region for layers if it differs from layer bounds. 10 11 This patch fixes various block overflow and layer expansion cases. It does not handle 12 overflowing line boxes yet (it adds tests for those too). 13 14 Test: fast/scrolling/ios/overflow-scroll-overlap-2.html 15 16 * platform/graphics/GraphicsLayer.cpp: 17 (WebCore::GraphicsLayer::setEventRegion): 18 * platform/graphics/GraphicsLayer.h: 19 (WebCore::GraphicsLayer::eventRegion): 20 * platform/graphics/Region.h: 21 * platform/graphics/ca/GraphicsLayerCA.cpp: 22 (WebCore::GraphicsLayerCA::setEventRegion): 23 (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): 24 (WebCore::GraphicsLayerCA::updateEventRegion): 25 26 Pass the region via the main platform layer of the graphics layer. 27 28 * platform/graphics/ca/GraphicsLayerCA.h: 29 * platform/graphics/ca/PlatformCALayer.h: 30 * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: 31 * rendering/PaintInfo.h: 32 * rendering/PaintPhase.h: 33 34 Add EventRegion paint phase that computes the region instead of painting anything. 35 36 * rendering/RenderBlock.cpp: 37 (WebCore::RenderBlock::paintObject): 38 * rendering/RenderLayer.cpp: 39 (WebCore::RenderLayer::paintForegroundForFragments): 40 (WebCore::RenderLayer::paintForegroundForFragmentsWithPhase): 41 42 Invoke EventRegion paint phase. 43 44 * rendering/RenderLayer.h: 45 * rendering/RenderLayerBacking.cpp: 46 (WebCore::RenderLayerBacking::paintIntoLayer): 47 48 Request event region when pointing a layer. 49 1 50 2019-03-12 Philippe Normand <pnormand@igalia.com> 2 51 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp
r241788 r242794 32 32 #include "GraphicsContext.h" 33 33 #include "LayoutRect.h" 34 #include "Region.h" 34 35 #include "RotateTransformOperation.h" 35 36 #include <wtf/HashMap.h> … … 410 411 UNUSED_PARAM(windRule); 411 412 #endif 413 } 414 415 void GraphicsLayer::setEventRegion(std::unique_ptr<Region>&& eventRegion) 416 { 417 m_eventRegion = WTFMove(eventRegion); 412 418 } 413 419 -
trunk/Source/WebCore/platform/graphics/GraphicsLayer.h
r240918 r242794 55 55 class GraphicsLayerFactory; 56 56 class Image; 57 class Region; 57 58 class TiledBacking; 58 59 class TimingFunction; … … 452 453 WindRule shapeLayerWindRule() const; 453 454 virtual void setShapeLayerWindRule(WindRule); 455 456 // Non-null if the event sensitive region of the layer differs from the layer bounds. 457 const Region* eventRegion() const { return m_eventRegion.get(); } 458 virtual void setEventRegion(std::unique_ptr<Region>&&); 454 459 455 460 // Transitions are identified by a special animation name that cannot clash with a keyframe identifier. … … 727 732 Optional<FloatRect> m_animationExtent; 728 733 734 std::unique_ptr<Region> m_eventRegion; 735 729 736 #if USE(CA) 730 737 WindRule m_shapeLayerWindRule { WindRule::NonZero }; -
trunk/Source/WebCore/platform/graphics/Region.h
r202408 r242794 54 54 WEBCORE_EXPORT bool contains(const Region&) const; 55 55 56 bool contains(const IntPoint&) const;56 WEBCORE_EXPORT bool contains(const IntPoint&) const; 57 57 58 58 // Returns true if the query region intersects any part of this region. 59 bool intersects(const Region&) const;59 WEBCORE_EXPORT bool intersects(const Region&) const; 60 60 61 61 WEBCORE_EXPORT unsigned totalArea() const; -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
r241852 r242794 40 40 #include "PlatformCALayer.h" 41 41 #include "PlatformScreen.h" 42 #include "Region.h" 42 43 #include "RotateTransformOperation.h" 43 44 #include "ScaleTransformOperation.h" … … 52 53 #include <wtf/MathExtras.h> 53 54 #include <wtf/NeverDestroyed.h> 55 #include <wtf/PointerComparison.h> 54 56 #include <wtf/SetForScope.h> 55 57 #include <wtf/SystemTracing.h> … … 983 985 } 984 986 987 void GraphicsLayerCA::setEventRegion(std::unique_ptr<Region>&& eventRegion) 988 { 989 if (arePointingToEqualData(eventRegion, m_eventRegion)) 990 return; 991 992 GraphicsLayer::setEventRegion(WTFMove(eventRegion)); 993 noteLayerPropertyChanged(EventRegionChanged, DontScheduleFlush); 994 } 995 985 996 bool GraphicsLayerCA::shouldRepaintOnSizeChange() const 986 997 { … … 1845 1856 updateMasksToBoundsRect(); 1846 1857 1858 if (m_uncommittedChanges & EventRegionChanged) 1859 updateEventRegion(); 1860 1847 1861 if (m_uncommittedChanges & MaskLayerChanged) { 1848 1862 updateMaskLayer(); … … 1854 1868 if (m_uncommittedChanges & ContentsNeedsDisplay) 1855 1869 updateContentsNeedsDisplay(); 1856 1870 1857 1871 if (m_uncommittedChanges & SupportsSubpixelAntialiasedTextChanged) 1858 1872 updateSupportsSubpixelAntialiasedText(); … … 2754 2768 } 2755 2769 } 2770 } 2771 2772 void GraphicsLayerCA::updateEventRegion() 2773 { 2774 m_layer->setEventRegion(eventRegion()); 2756 2775 } 2757 2776 -
trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h
r240047 r242794 125 125 WEBCORE_EXPORT void setShapeLayerWindRule(WindRule) override; 126 126 127 WEBCORE_EXPORT void setEventRegion(std::unique_ptr<Region>&&) override; 128 127 129 WEBCORE_EXPORT void suspendAnimations(MonotonicTime) override; 128 130 WEBCORE_EXPORT void resumeAnimations() override; … … 414 416 void updateContentsRects(); 415 417 void updateMasksToBoundsRect(); 418 void updateEventRegion(); 416 419 void updateMaskLayer(); 417 420 void updateReplicatedLayers(); … … 532 535 UserInteractionEnabledChanged = 1LLU << 38, 533 536 NeedsComputeVisibleAndCoverageRect = 1LLU << 39, 537 EventRegionChanged = 1LLU << 40, 534 538 }; 535 539 typedef uint64_t LayerChangeFlags; -
trunk/Source/WebCore/platform/graphics/ca/PlatformCALayer.h
r240918 r242794 234 234 virtual WindRule shapeWindRule() const = 0; 235 235 virtual void setShapeWindRule(WindRule) = 0; 236 237 virtual const Region* eventRegion() const = 0; 238 virtual void setEventRegion(const Region*) = 0; 236 239 237 240 virtual GraphicsLayer::CustomAppearance customAppearance() const = 0; -
trunk/Source/WebCore/platform/graphics/ca/cocoa/PlatformCALayerCocoa.h
r238108 r242794 169 169 void updateCustomAppearance(GraphicsLayer::CustomAppearance) override; 170 170 171 const Region* eventRegion() const override { return nullptr; } 172 void setEventRegion(const Region*) override { } 173 171 174 GraphicsLayer::EmbeddedViewID embeddedViewID() const override; 172 175 -
trunk/Source/WebCore/platform/graphics/ca/win/PlatformCALayerWin.h
r238152 r242794 158 158 void updateCustomAppearance(GraphicsLayer::CustomAppearance customAppearance) override { m_customAppearance = customAppearance; } 159 159 160 const Region* eventRegion() const override { return nullptr; } 161 void setEventRegion(const Region*) override { } 162 160 163 GraphicsLayer::EmbeddedViewID embeddedViewID() const override; 161 164 -
trunk/Source/WebCore/rendering/PaintInfo.h
r239461 r242794 39 39 40 40 class OverlapTestRequestClient; 41 class Region; 41 42 class RenderInline; 42 43 class RenderLayer; … … 130 131 bool requireSecurityOriginAccessForWidgets { false }; 131 132 const RenderLayer* m_enclosingSelfPaintingLayer { nullptr }; 133 Region* eventRegion { nullptr }; // For PaintPhase::EventRegion. 132 134 133 135 private: -
trunk/Source/WebCore/rendering/PaintPhase.h
r234619 r242794 50 50 TextClip, 51 51 Mask, 52 ClippingMask 52 ClippingMask, 53 EventRegion, 53 54 }; 54 55 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r240641 r242794 1241 1241 return; 1242 1242 1243 if (paintPhase == PaintPhase::EventRegion) { 1244 // FIXME: Handle inlines, lineboxes, SVG too. 1245 // FIXME: Transforms? 1246 if (style().pointerEvents() != PointerEvents::None) 1247 paintInfo.eventRegion->unite(enclosingIntRect(LayoutRect(paintOffset, size()))); 1248 1249 // No need to check descendants if we don't have overflow. 1250 if (!hasVisualOverflow()) 1251 return; 1252 } 1253 1243 1254 // Adjust our painting position if we're inside a scrolled layer (e.g., an overflow:auto div). 1244 1255 LayoutPoint scrolledOffset = paintOffset; -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r242561 r242794 4747 4747 paintForegroundForFragmentsWithPhase(PaintPhase::Foreground, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer); 4748 4748 paintForegroundForFragmentsWithPhase(PaintPhase::ChildOutlines, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer); 4749 if (localPaintingInfo.eventRegion) 4750 paintForegroundForFragmentsWithPhase(PaintPhase::EventRegion, layerFragments, context, localPaintingInfo, localPaintBehavior, subtreePaintRootForRenderer); 4749 4751 } 4750 4752 … … 4768 4770 if (phase == PaintPhase::Foreground) 4769 4771 paintInfo.overlapTestRequests = localPaintingInfo.overlapTestRequests; 4772 if (phase == PaintPhase::EventRegion) 4773 paintInfo.eventRegion = localPaintingInfo.eventRegion; 4770 4774 renderer().paint(paintInfo, toLayoutPoint(fragment.layerBounds.location() - renderBoxLocation() + localPaintingInfo.subpixelOffset)); 4771 4775 -
trunk/Source/WebCore/rendering/RenderLayer.h
r242561 r242794 67 67 class HitTestResult; 68 68 class HitTestingTransformState; 69 class Region; 69 70 class RenderFragmentedFlow; 70 71 class RenderGeometryMap; … … 906 907 bool requireSecurityOriginAccessForWidgets; 907 908 bool clipToDirtyRect { true }; 909 Region* eventRegion { nullptr }; 908 910 }; 909 911 -
trunk/Source/WebCore/rendering/RenderLayerBacking.cpp
r242700 r242794 52 52 #include "PluginViewBase.h" 53 53 #include "ProgressTracker.h" 54 #include "Region.h" 54 55 #include "RenderFragmentContainer.h" 55 56 #include "RenderFragmentedFlow.h" … … 2574 2575 renderer().view().frameView().willPaintContents(context, paintDirtyRect, paintingState); 2575 2576 2576 // FIXME: GraphicsLayers need a way to split for RenderFragmentContainers.2577 2577 RenderLayer::LayerPaintingInfo paintingInfo(&m_owningLayer, paintDirtyRect, paintBehavior, -m_subpixelOffsetFromRenderer); 2578 2579 auto eventRegion = std::make_unique<Region>(); 2580 paintingInfo.eventRegion = eventRegion.get(); 2581 2578 2582 m_owningLayer.paintLayerContents(context, paintingInfo, paintFlags); 2583 2584 paintingInfo.eventRegion = nullptr; 2585 // Use null event region to indicate the entire layer is sensitive to events (the common case). 2586 // FIXME: We could optimize Region so it doesn't use lots of memory if it contains a single rect only. 2587 if (eventRegion->contains(roundedIntRect(compositedBounds()))) 2588 eventRegion = nullptr; 2589 else 2590 eventRegion->translate(roundedIntSize(contentOffsetInCompositingLayer())); 2591 m_graphicsLayer->setEventRegion(WTFMove(eventRegion)); 2579 2592 2580 2593 if (m_owningLayer.containsDirtyOverlayScrollbars()) -
trunk/Source/WebKit/ChangeLog
r242788 r242794 1 2019-03-12 Antti Koivisto <antti@apple.com> 2 3 Compositing layer that renders two positioned elements should not hit test 4 https://bugs.webkit.org/show_bug.cgi?id=195371 5 <rdar://problem/48649586> 6 7 Reviewed by Simon Fraser. 8 9 * Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm: 10 (WebKit::RemoteLayerTreePropertyApplier::applyProperties): 11 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h: 12 * Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm: 13 (WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties): 14 (WebKit::RemoteLayerTreeTransaction::LayerProperties::encode const): 15 (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): 16 17 Pass event region to UI process. 18 19 * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h: 20 (WebKit::RemoteLayerTreeNode::layerID const): 21 (WebKit::RemoteLayerTreeNode::eventRegion const): 22 * UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm: 23 (WebKit::RemoteLayerTreeNode::RemoteLayerTreeNode): 24 (WebKit::RemoteLayerTreeNode::~RemoteLayerTreeNode): 25 (WebKit::RemoteLayerTreeNode::setEventRegion): 26 27 Maintain event region in RemoteLayerTreeNodes. 28 29 (WebKit::RemoteLayerTreeNode::initializeLayer): 30 (WebKit::RemoteLayerTreeNode::layerID): 31 (WebKit::RemoteLayerTreeNode::forCALayer): 32 33 Move layerID to RemoteLayerTreeNode and store RemoteLayerTreeNode pointer to CALayers instead. 34 This makes it easy to find the matching RemoteLayerTreeNode from a layer, globally. 35 36 (WebKit::RemoteLayerTreeNode::setLayerID): Deleted. 37 * UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm: 38 (WebKit::collectDescendantViewsAtPoint): 39 40 If we have event region, use it for hit testing. 41 42 (-[UIView _web_findDescendantViewAtPoint:withEvent:]): 43 (collectDescendantViewsAtPoint): Deleted. 44 * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp: 45 (WebKit::PlatformCALayerRemote::eventRegion const): 46 (WebKit::PlatformCALayerRemote::setEventRegion): 47 * WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h: 48 1 49 2019-03-12 Carlos Garcia Campos <cgarcia@igalia.com> 2 50 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreePropertyApplier.mm
r240717 r242794 262 262 updateMask(node, properties, relatedLayers); 263 263 264 if (properties.changedProperties & RemoteLayerTreeTransaction::EventRegionChanged) 265 node.setEventRegion(properties.eventRegion ? std::make_unique<WebCore::Region>(*properties.eventRegion) : nullptr); 266 264 267 #if PLATFORM(IOS_FAMILY) 265 268 applyPropertiesToUIView(node.uiView(), properties, relatedLayers); -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.h
r241899 r242794 93 93 CustomAppearanceChanged = 1LLU << 36, 94 94 UserInteractionEnabledChanged = 1LLU << 37, 95 EventRegionChanged = 1LLU << 38, 95 96 }; 96 97 … … 172 173 bool contentsHidden; 173 174 bool userInteractionEnabled; 175 std::unique_ptr<WebCore::Region> eventRegion; 174 176 }; 175 177 -
trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerTreeTransaction.mm
r239427 r242794 33 33 #import <QuartzCore/QuartzCore.h> 34 34 #import <WebCore/LengthFunctions.h> 35 #import <WebCore/Region.h> 35 36 #import <WebCore/TimingFunction.h> 36 37 #import <wtf/text/CString.h> … … 155 156 if (other.filters) 156 157 filters = std::make_unique<WebCore::FilterOperations>(*other.filters); 158 159 if (other.eventRegion) 160 eventRegion = std::make_unique<WebCore::Region>(*other.eventRegion); 161 157 162 } 158 163 … … 277 282 if (changedProperties & UserInteractionEnabledChanged) 278 283 encoder << userInteractionEnabled; 284 285 if (changedProperties & EventRegionChanged) { 286 encoder << !!eventRegion; 287 if (eventRegion) 288 encoder << *eventRegion; 289 } 279 290 } 280 291 … … 498 509 if (!decoder.decode(result.userInteractionEnabled)) 499 510 return false; 511 } 512 513 if (result.changedProperties & EventRegionChanged) { 514 bool hasEventRegion = false; 515 if (!decoder.decode(hasEventRegion)) 516 return false; 517 if (hasEventRegion) { 518 auto eventRegion = std::make_unique<WebCore::Region>(); 519 if (!decoder.decode(*eventRegion)) 520 return false; 521 result.eventRegion = WTFMove(eventRegion); 522 } 500 523 } 501 524 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.h
r239689 r242794 54 54 #endif 55 55 56 WebCore::GraphicsLayer::PlatformLayerID layerID() const { return m_layerID; } 57 58 const WebCore::Region* eventRegion() const { return m_eventRegion.get(); } 59 void setEventRegion(std::unique_ptr<WebCore::Region>&&); 60 56 61 void detachFromParent(); 57 62 58 63 static WebCore::GraphicsLayer::PlatformLayerID layerID(CALayer *); 64 static RemoteLayerTreeNode* forCALayer(CALayer *); 65 59 66 static NSString *appendLayerDescription(NSString *description, CALayer *); 60 67 61 68 private: 62 void setLayerID(WebCore::GraphicsLayer::PlatformLayerID); 69 void initializeLayer(); 70 71 WebCore::GraphicsLayer::PlatformLayerID m_layerID; 63 72 64 73 RetainPtr<CALayer> m_layer; … … 66 75 RetainPtr<UIView> m_uiView; 67 76 #endif 77 78 std::unique_ptr<WebCore::Region> m_eventRegion; 68 79 }; 69 80 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/RemoteLayerTreeNode.mm
r238547 r242794 46 46 namespace WebKit { 47 47 48 static NSString *const WKRemoteLayerTreeNodePropertyKey = @"WKRemoteLayerTreeNode"; 49 48 50 RemoteLayerTreeNode::RemoteLayerTreeNode(WebCore::GraphicsLayer::PlatformLayerID layerID, RetainPtr<CALayer> layer) 49 : m_layer(WTFMove(layer)) 51 : m_layerID(layerID) 52 , m_layer(WTFMove(layer)) 50 53 { 51 setLayerID(layerID);54 initializeLayer(); 52 55 [m_layer setDelegate:[WebActionDisablingCALayerDelegate shared]]; 53 56 } … … 55 58 #if PLATFORM(IOS_FAMILY) 56 59 RemoteLayerTreeNode::RemoteLayerTreeNode(WebCore::GraphicsLayer::PlatformLayerID layerID, RetainPtr<UIView> uiView) 57 : m_layer([uiView.get() layer]) 60 : m_layerID(layerID) 61 , m_layer([uiView.get() layer]) 58 62 , m_uiView(WTFMove(uiView)) 59 63 { 60 setLayerID(layerID);64 initializeLayer(); 61 65 } 62 66 #endif 63 67 64 RemoteLayerTreeNode::~RemoteLayerTreeNode() = default; 68 RemoteLayerTreeNode::~RemoteLayerTreeNode() 69 { 70 [layer() setValue:nil forKey:WKRemoteLayerTreeNodePropertyKey]; 71 } 65 72 66 73 std::unique_ptr<RemoteLayerTreeNode> RemoteLayerTreeNode::createWithPlainLayer(WebCore::GraphicsLayer::PlatformLayerID layerID) … … 81 88 } 82 89 83 static NSString *const WKLayerIDPropertyKey = @"WKLayerID"; 90 void RemoteLayerTreeNode::setEventRegion(std::unique_ptr<WebCore::Region>&& eventRegion) 91 { 92 m_eventRegion = WTFMove(eventRegion); 93 } 84 94 85 void RemoteLayerTreeNode:: setLayerID(WebCore::GraphicsLayer::PlatformLayerID layerID)95 void RemoteLayerTreeNode::initializeLayer() 86 96 { 87 [layer() setValue: @(layerID) forKey:WKLayerIDPropertyKey];97 [layer() setValue:[NSValue valueWithPointer:this] forKey:WKRemoteLayerTreeNodePropertyKey]; 88 98 } 89 99 90 100 WebCore::GraphicsLayer::PlatformLayerID RemoteLayerTreeNode::layerID(CALayer *layer) 91 101 { 92 return [[layer valueForKey:WKLayerIDPropertyKey] unsignedLongLongValue]; 102 auto* node = forCALayer(layer); 103 return node ? node->layerID() : 0; 104 } 105 106 RemoteLayerTreeNode* RemoteLayerTreeNode::forCALayer(CALayer *layer) 107 { 108 return static_cast<RemoteLayerTreeNode*>([[layer valueForKey:WKRemoteLayerTreeNodePropertyKey] pointerValue]); 93 109 } 94 110 -
trunk/Source/WebKit/UIProcess/RemoteLayerTree/ios/RemoteLayerTreeViews.mm
r242564 r242794 30 30 31 31 #import "RemoteLayerTreeHost.h" 32 #import "RemoteLayerTreeNode.h" 32 33 #import "UIKitSPI.h" 33 34 #import "WKDrawingView.h" 35 #import <WebCore/Region.h> 34 36 #import <pal/spi/cocoa/QuartzCoreSPI.h> 35 37 #import <wtf/SoftLinking.h> 38 39 namespace WebKit { 36 40 37 41 static void collectDescendantViewsAtPoint(Vector<UIView *, 16>& viewsAtPoint, UIView *parent, CGPoint point, UIEvent *event) … … 54 58 }(); 55 59 56 if (!isTransparent && [view pointInside:subviewPoint withEvent:event]) 57 viewsAtPoint.append(view); 60 if (!isTransparent && [view pointInside:subviewPoint withEvent:event]) { 61 auto* node = RemoteLayerTreeNode::forCALayer(view.layer); 62 auto* eventRegion = node ? node->eventRegion() : nullptr; 63 if (!eventRegion || eventRegion->contains(WebCore::IntPoint(subviewPoint))) 64 viewsAtPoint.append(view); 65 } 58 66 59 67 if (![view subviews]) … … 64 72 } 65 73 74 } 75 66 76 @interface UIView (WKHitTesting) 67 77 - (UIView *)_web_findDescendantViewAtPoint:(CGPoint)point withEvent:(UIEvent *)event; … … 73 83 { 74 84 Vector<UIView *, 16> viewsAtPoint; 75 collectDescendantViewsAtPoint(viewsAtPoint, self, point, event);85 WebKit::collectDescendantViewsAtPoint(viewsAtPoint, self, point, event); 76 86 77 87 for (auto i = viewsAtPoint.size(); i--;) { -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.cpp
r241925 r242794 39 39 #import <WebCore/PlatformCALayerCocoa.h> 40 40 #import <WebCore/TiledBacking.h> 41 #import <wtf/PointerComparison.h> 41 42 42 43 namespace WebKit { … … 871 872 } 872 873 874 const Region* PlatformCALayerRemote::eventRegion() const 875 { 876 return m_properties.eventRegion.get(); 877 } 878 879 void PlatformCALayerRemote::setEventRegion(const WebCore::Region* eventRegion) 880 { 881 const auto* oldEventRegion = m_properties.eventRegion.get(); 882 if (arePointingToEqualData(oldEventRegion, eventRegion)) 883 return; 884 885 m_properties.eventRegion = eventRegion ? std::make_unique<WebCore::Region>(*eventRegion) : nullptr; 886 m_properties.notePropertiesChanged(RemoteLayerTreeTransaction::EventRegionChanged); 887 } 888 873 889 GraphicsLayer::EmbeddedViewID PlatformCALayerRemote::embeddedViewID() const 874 890 { -
trunk/Source/WebKit/WebProcess/WebPage/RemoteLayerTree/PlatformCALayerRemote.h
r241899 r242794 175 175 void updateCustomAppearance(WebCore::GraphicsLayer::CustomAppearance) override; 176 176 177 const WebCore::Region* eventRegion() const override; 178 void setEventRegion(const WebCore::Region*) override; 179 177 180 WebCore::GraphicsLayer::EmbeddedViewID embeddedViewID() const override; 178 181
Note: See TracChangeset
for help on using the changeset viewer.