Title: [294495] trunk/Source/WebKit
Revision
294495
Author
[email protected]
Date
2022-05-19 11:18:01 -0700 (Thu, 19 May 2022)

Log Message

Delete WKHoverPlatter
https://bugs.webkit.org/show_bug.cgi?id=240623

Reviewed by Wenson Hsieh.

* Source/WebKit/SourcesCocoa.txt:
* Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm:
(-[WKWebView _allowsDoubleTapGestures]):
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.h:
* Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _createAndConfigureHighlightLongPressGestureRecognizer]):
(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
(-[WKContentView _locationForGesture:]):
(-[WKContentView _startPointForGesture:]):
(-[WKContentView _longPressRecognized:]):
(-[WKContentView _singleTapIdentified:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView _shouldUseContextMenus]):
(-[WKContentView setUpDragAndDropInteractions]):
(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView positionInformationForHoverPlatter:withRequest:completionHandler:]): Deleted.
(-[WKContentView interactionRegionsForHoverPlatter:inRect:completionHandler:]): Deleted.
* Source/WebKit/UIProcess/ios/WKHoverPlatter.h: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatter.mm: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h: Removed.
* Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm: Removed.
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/250754@main

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/SourcesCocoa.txt (294494 => 294495)


--- trunk/Source/WebKit/SourcesCocoa.txt	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/SourcesCocoa.txt	2022-05-19 18:18:01 UTC (rev 294495)
@@ -507,8 +507,6 @@
 UIProcess/ios/WKGeolocationProviderIOS.mm
 UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm
 UIProcess/ios/WKHighlightLongPressGestureRecognizer.mm
-UIProcess/ios/WKHoverPlatter.mm
-UIProcess/ios/WKHoverPlatterParameters.mm
 UIProcess/ios/WKImageAnalysisGestureRecognizer.mm
 UIProcess/ios/WKKeyboardScrollingAnimator.mm
 UIProcess/ios/WKModelInteractionGestureRecognizer.mm

Modified: trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/API/ios/WKWebViewIOS.mm	2022-05-19 18:18:01 UTC (rev 294495)
@@ -41,7 +41,6 @@
 #import "ViewGestureController.h"
 #import "WKBackForwardListItemInternal.h"
 #import "WKContentView.h"
-#import "WKHoverPlatterParameters.h"
 #import "WKPasswordView.h"
 #import "WKSafeBrowsingWarning.h"
 #import "WKScrollView.h"
@@ -1598,11 +1597,6 @@
 
 - (BOOL)_allowsDoubleTapGestures
 {
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForDoubleTap)
-        return YES;
-#endif
-
     if (_fastClickingIsDisabled)
         return YES;
 

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h	2022-05-19 18:18:01 UTC (rev 294495)
@@ -40,7 +40,6 @@
 #import "TextCheckingController.h"
 #import "TransactionID.h"
 #import "UIKitSPI.h"
-#import "WKHoverPlatter.h"
 #import <WebKit/WKActionSheetAssistant.h>
 #import <WebKit/WKAirPlayRoutePicker.h>
 #import <WebKit/WKContactPicker.h>
@@ -225,7 +224,6 @@
     EditableRootIsTransparentOrFullyClipped = 1 << 0,
     FocusedElementIsTooSmall = 1 << 1,
     InteractionIsHappening = 1 << 2,
-    HoverPlatterEnabled = 1 << 3,
 };
 
 struct WKSelectionDrawingInfo {
@@ -319,10 +317,6 @@
     WebCore::MouseEventPolicy _mouseEventPolicy;
 #endif
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    RetainPtr<WKHoverPlatter> _hoverPlatter;
-#endif
-
 #if HAVE(PENCILKIT_TEXT_INPUT)
     RetainPtr<UIIndirectScribbleInteraction> _scribbleInteraction;
 #endif
@@ -562,9 +556,6 @@
     , UIDragInteractionDelegate, UIDropInteractionDelegate
 #endif
     , WKTouchActionGestureRecognizerDelegate
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    , WKHoverPlatterDelegate
-#endif
 #if HAVE(UIFINDINTERACTION)
     , UITextSearching
 #endif

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2022-05-19 18:18:01 UTC (rev 294495)
@@ -59,8 +59,6 @@
 #import "WKFormSelectControl.h"
 #import "WKFrameInfoInternal.h"
 #import "WKHighlightLongPressGestureRecognizer.h"
-#import "WKHoverPlatter.h"
-#import "WKHoverPlatterParameters.h"
 #import "WKImageAnalysisGestureRecognizer.h"
 #import "WKImagePreviewViewController.h"
 #import "WKInspectorNodeSearchGestureRecognizer.h"
@@ -902,11 +900,6 @@
 
 - (void)_createAndConfigureHighlightLongPressGestureRecognizer
 {
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress)
-        return;
-#endif
-
     _highlightLongPressGestureRecognizer = adoptNS([[WKHighlightLongPressGestureRecognizer alloc] initWithTarget:self action:@selector(_highlightLongPressRecognized:)]);
     [_highlightLongPressGestureRecognizer setDelay:highlightDelay];
     [_highlightLongPressGestureRecognizer setDelegate:self];
@@ -1005,10 +998,6 @@
     [self setUpMouseGestureRecognizer];
 #endif
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    _hoverPlatter = adoptNS([[WKHoverPlatter alloc] initWithView:self.rootContentView delegate:self]);
-#endif
-
 #if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     _lookupGestureRecognizer = adoptNS([[_UILookupGestureRecognizer alloc] initWithTarget:self action:@selector(_lookupGestureRecognized:)]);
     [_lookupGestureRecognizer setDelegate:self];
@@ -1199,11 +1188,6 @@
     
 #endif
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    [_hoverPlatter invalidate];
-    _hoverPlatter = nil;
-#endif
-
 #if HAVE(LOOKUP_GESTURE_RECOGNIZER)
     [_lookupGestureRecognizer setDelegate:nil];
     [self removeGestureRecognizer:_lookupGestureRecognizer.get()];
@@ -1316,11 +1300,6 @@
     [self _handleDOMPasteRequestWithResult:WebCore::DOMPasteAccessResponse::DeniedForGesture];
     [self _cancelPendingKeyEventHandler];
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress)
-        [self _startSuppressingSelectionAssistantForReason:WebKit::HoverPlatterEnabled];
-#endif
-
     _cachedSelectedTextRange = nil;
 }
 
@@ -3167,36 +3146,12 @@
     return _latestTapID;
 }
 
-- (CGPoint)_locationForGesture:(UIGestureRecognizer *)gestureRecognizer
-{
-    auto location = [gestureRecognizer locationInView:self];
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.enabled)
-        return [_hoverPlatter adjustedPointForPoint:location];
-#endif
-
-    return location;
-}
-
-- (CGPoint)_startPointForGesture:(UILongPressGestureRecognizer *)gestureRecognizer
-{
-    auto location = [gestureRecognizer startPoint];
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.enabled)
-        return [_hoverPlatter adjustedPointForPoint:location];
-#endif
-
-    return location;
-}
-
 - (void)_highlightLongPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
 {
     ASSERT(gestureRecognizer == _highlightLongPressGestureRecognizer);
     [self _resetIsDoubleTapPending];
 
-    auto startPoint = [self _startPointForGesture:gestureRecognizer];
+    auto startPoint = [gestureRecognizer startPoint];
 
     _lastInteractionLocation = startPoint;
 
@@ -3226,7 +3181,7 @@
 
 - (void)_doubleTapRecognizedForDoubleClick:(UITapGestureRecognizer *)gestureRecognizer
 {
-    _page->handleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint([self _locationForGesture:gestureRecognizer]), WebKit::webEventModifierFlags(gestureRecognizer.modifierFlags), _layerTreeTransactionIdAtLastInteractionStart);
+    _page->handleDoubleTapForDoubleClickAtPoint(WebCore::IntPoint([gestureRecognizer locationInView:self]), WebKit::webEventModifierFlags(gestureRecognizer.modifierFlags), _layerTreeTransactionIdAtLastInteractionStart);
 }
 
 - (void)_twoFingerSingleTapGestureRecognized:(UITapGestureRecognizer *)gestureRecognizer
@@ -3233,7 +3188,7 @@
 {
     _isTapHighlightIDValid = YES;
     _isExpectingFastSingleTapCommit = YES;
-    _page->handleTwoFingerTapAtPoint(WebCore::roundedIntPoint([self _locationForGesture:gestureRecognizer]), WebKit::webEventModifierFlags(gestureRecognizer.modifierFlags | UIKeyModifierCommand), [self nextTapIdentifier]);
+    _page->handleTwoFingerTapAtPoint(WebCore::roundedIntPoint([gestureRecognizer locationInView:self]), WebKit::webEventModifierFlags(gestureRecognizer.modifierFlags | UIKeyModifierCommand), [self nextTapIdentifier]);
 }
 
 - (void)_longPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
@@ -3242,17 +3197,9 @@
     [self _resetIsDoubleTapPending];
     [self _cancelTouchEventGestureRecognizer];
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress) {
-        [_hoverPlatter didLongPressAtPoint:gestureRecognizer.startPoint];
-        _lastInteractionLocation = gestureRecognizer.startPoint;
-        return;
-    }
-#endif
-
     _page->didRecognizeLongPress();
 
-    _lastInteractionLocation = [self _startPointForGesture:gestureRecognizer];
+    _lastInteractionLocation = [gestureRecognizer startPoint];
 
     if ([gestureRecognizer state] == UIGestureRecognizerStateBegan) {
         SEL action = "" _actionForLongPress];
@@ -3278,7 +3225,7 @@
 
 - (void)_singleTapIdentified:(UITapGestureRecognizer *)gestureRecognizer
 {
-    auto position = [self _locationForGesture:gestureRecognizer];
+    auto position = [gestureRecognizer locationInView:self];
 #if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     if (UIButton *analysisButton = [_imageAnalysisInteraction analysisButton]) {
         auto hitTestedView = dynamic_objc_cast<UIButton>([self hitTest:position withEvent:nil]);
@@ -3298,12 +3245,6 @@
     [_inputPeripheral setSingleTapShouldEndEditing:[_inputPeripheral isEditing]];
 
     bool shouldRequestMagnificationInformation = _page->preferences().fasterClicksEnabled();
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForDoubleTap)
-        shouldRequestMagnificationInformation = NO;
-#endif
-
     if (shouldRequestMagnificationInformation)
         RELEASE_LOG(ViewGestures, "Single tap identified. Request details on potential zoom. (%p, pageProxyID=%llu)", self, _page->identifier().toUInt64());
 
@@ -3381,7 +3322,7 @@
 
     ASSERT(_potentialTapInProgress);
 
-    _lastInteractionLocation = [self _locationForGesture:gestureRecognizer];
+    _lastInteractionLocation = [gestureRecognizer locationInView:self];
 
     [self _endPotentialTapAndEnableDoubleTapGesturesIfNecessary];
 
@@ -3394,14 +3335,6 @@
         [_inputPeripheral endEditing];
 
     RELEASE_LOG(ViewGestures, "Single tap recognized - commit potential tap (%p, pageProxyID=%llu)", self, _page->identifier().toUInt64());
-    
-    
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForSingleTap && ![_hoverPlatter isVisible]) {
-        [_hoverPlatter didSingleTapAtPoint:_lastInteractionLocation];
-        return;
-    }
-#endif
 
     WebCore::PointerID pointerId = WebCore::mousePointerID;
     if (auto* singleTapTouchIdentifier = [_singleTapGestureRecognizer lastActiveTouchIdentifier]) {
@@ -3425,16 +3358,8 @@
 
     [self _resetIsDoubleTapPending];
 
-    auto location = [self _locationForGesture:gestureRecognizer];
+    auto location = [gestureRecognizer locationInView:self];
     _lastInteractionLocation = location;
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForDoubleTap) {
-        [_hoverPlatter didDoubleTapAtPoint:location];
-        return;
-    }
-#endif
-
     _smartMagnificationController->handleSmartMagnificationGesture(location);
 }
 
@@ -3445,7 +3370,7 @@
 
 - (void)_nonBlockingDoubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
 {
-    _lastInteractionLocation = [self _locationForGesture:gestureRecognizer];
+    _lastInteractionLocation = [gestureRecognizer locationInView:self];
     _isDoubleTapPending = YES;
 }
 
@@ -3453,7 +3378,7 @@
 {
     [self _resetIsDoubleTapPending];
 
-    auto location = [self _locationForGesture:gestureRecognizer];
+    auto location = [gestureRecognizer locationInView:self];
     _lastInteractionLocation = location;
     _smartMagnificationController->handleResetMagnificationGesture(location);
 }
@@ -5136,10 +5061,6 @@
     _treatAsContentEditableUntilNextEditorStateUpdate = NO;
     [self _invalidateCurrentPositionInformation];
 
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    [_hoverPlatter dismissPlatterWithAnimation:NO];
-#endif
-
 #if ENABLE(IMAGE_ANALYSIS_ENHANCEMENTS)
     [self uninstallImageAnalysisInteraction];
 #endif
@@ -8193,10 +8114,6 @@
 
 - (BOOL)_shouldUseContextMenus
 {
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress)
-        return NO;
-#endif
 #if HAVE(LINK_PREVIEW) && USE(UICONTEXTMENU)
     return linkedOnOrAfterSDKWithBehavior(SDKAlignedBehavior::HasUIContextMenuInteraction);
 #endif
@@ -8585,11 +8502,6 @@
 
 - (void)setUpDragAndDropInteractions
 {
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress)
-        return;
-#endif
-
     _dragInteraction = adoptNS([[UIDragInteraction alloc] initWithDelegate:self]);
     _dropInteraction = adoptNS([[UIDropInteraction alloc] initWithDelegate:self]);
     [_dragInteraction _setLiftDelay:self.dragLiftDelay];
@@ -10048,12 +9960,6 @@
     if (event->type() == WebKit::WebEvent::MouseUp && self.hasHiddenContentEditable && self._hasFocusedElement && !self.window.keyWindow)
         [self.window makeKeyWindow];
 
-    if (WKHoverPlatterDomain.rootSettings.enabled) {
-        [_hoverPlatter didReceiveMouseEvent:*event];
-        _page->handleMouseEvent([_hoverPlatter adjustedEventForEvent:*event]);
-        return;
-    }
-
     _page->handleMouseEvent(*event);
 }
 
@@ -10072,18 +9978,6 @@
     [self _configureMouseGestureRecognizer];
 }
 
-- (void)positionInformationForHoverPlatter:(WKHoverPlatter *)hoverPlatter withRequest:(WebKit::InteractionInformationRequest&)request completionHandler:(void (^)(WebKit::InteractionInformationAtPosition))completionHandler
-{
-    [self doAfterPositionInformationUpdate:completionHandler forRequest:request];
-}
-
-- (void)interactionRegionsForHoverPlatter:(WKHoverPlatter *)platter inRect:(WebCore::FloatRect)rectInContentCoordinates completionHandler:(void (^)(Vector<WebCore::InteractionRegion>))completionHandler
-{
-    _page->interactionRegions(rectInContentCoordinates, [completionHandler = makeBlockPtr(completionHandler)] (Vector<WebCore::InteractionRegion> regions) {
-        completionHandler(regions);
-    });
-}
-
 #endif
 
 #if ENABLE(MEDIA_CONTROLS_CONTEXT_MENUS) && USE(UICONTEXTMENU)

Deleted: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.h	2022-05-19 18:18:01 UTC (rev 294495)
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-
-#import "NativeWebMouseEvent.h"
-
-namespace WebCore {
-class FloatRect;
-struct InteractionRegion;
-}
-
-namespace WebKit {
-struct InteractionInformationAtPosition;
-struct InteractionInformationRequest;
-}
-
-@class UIView;
-@class WKHoverPlatter;
-
-@protocol WKHoverPlatterDelegate
-
-@required
-- (void)positionInformationForHoverPlatter:(WKHoverPlatter *)hoverPlatter withRequest:(WebKit::InteractionInformationRequest&)request completionHandler:(void (^)(WebKit::InteractionInformationAtPosition))completionHandler;
-
-- (void)interactionRegionsForHoverPlatter:(WKHoverPlatter *)hoverPlatter inRect:(WebCore::FloatRect)rectInContentCoordinates completionHandler:(void (^)(Vector<WebCore::InteractionRegion>))completionHandler;
-
-@end
-
-@interface WKHoverPlatter : NSObject
-
-- (instancetype)initWithView:(UIView *)view delegate:(id <WKHoverPlatterDelegate>)delegate;
-
-- (void)didReceiveMouseEvent:(const WebKit::NativeWebMouseEvent&)event;
-- (void)didLongPressAtPoint:(WebCore::FloatPoint)point;
-- (void)didSingleTapAtPoint:(WebCore::FloatPoint)point;
-- (void)didDoubleTapAtPoint:(WebCore::FloatPoint)point;
-
-- (WebCore::FloatPoint)adjustedPointForPoint:(WebCore::FloatPoint)point;
-- (WebKit::NativeWebMouseEvent)adjustedEventForEvent:(const WebKit::NativeWebMouseEvent&)event;
-
-- (void)dismissPlatterWithAnimation:(BOOL)withAnimation;
-
-- (void)invalidate;
-
-- (BOOL)isVisible;
-
-@end
-
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Deleted: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatter.mm	2022-05-19 18:18:01 UTC (rev 294495)
@@ -1,339 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKHoverPlatter.h"
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-
-#import "WKHoverPlatterParameters.h"
-#import <UIKit/UIKit.h>
-#import <WebCore/InteractionRegion.h>
-#import <WebCore/PathUtilities.h>
-#import <WebCore/WebCoreCALayerExtras.h>
-#import <pal/spi/cocoa/QuartzCoreSPI.h>
-#import <wtf/BlockPtr.h>
-
-static RetainPtr<CABasicAnimation> createBaseAnimation()
-{
-    auto parameters = WKHoverPlatterDomain.rootSettings;
-    if (parameters.useSpring) {
-        auto spring = adoptNS([[CASpringAnimation alloc] init]);
-        [spring setMass:parameters.springMass];
-        [spring setStiffness:parameters.springStiffness];
-        [spring setDamping:parameters.springDamping];
-        [spring setFillMode:kCAFillModeBackwards];
-        [spring setDuration:[spring settlingDuration]];
-        return spring;
-    }
-
-    auto ease = adoptNS([[CABasicAnimation alloc] init]);
-    [ease setFillMode:kCAFillModeBackwards];
-    [ease setDuration:parameters.duration];
-    [ease setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
-    return ease;
-}
-
-static void addAnimation(CALayer *layer, NSString *key, id fromValue, id toValue)
-{
-    auto animation = createBaseAnimation();
-    [animation setKeyPath:key];
-    [animation setFromValue:fromValue];
-    [animation setToValue:toValue];
-    [layer setValue:toValue forKey:key];
-    [layer addAnimation:animation.get() forKey:key];
-};
-
-@implementation WKHoverPlatter {
-    __weak UIView *_view;
-    __weak id <WKHoverPlatterDelegate> _delegate;
-    WebCore::FloatPoint _platterCenter;
-
-    BOOL _isSittingDown;
-
-    RetainPtr<CALayer> _platterLayer;
-    RetainPtr<CAPortalLayer> _snapshotLayer;
-
-    RetainPtr<CALayer> _debugIndicatorLayer;
-    RetainPtr<CATextLayer> _linkCountLayer;
-    RetainPtr<CAShapeLayer> _linkHighlightLayer;
-}
-
-- (instancetype)initWithView:(UIView *)view delegate:(id <WKHoverPlatterDelegate>)delegate
-{
-    auto parameters = WKHoverPlatterDomain.rootSettings;
-    if (!parameters.enabled) {
-        [self release];
-        return nil;
-    }
-
-    self = [super init];
-    if (!self)
-        return nil;
-
-    _view = view;
-    _delegate = delegate;
-
-    return self;
-}
-
-- (void)invalidate
-{
-    [self dismissPlatterWithAnimation:NO];
-    _view = nil;
-    _delegate = nil;
-}
-
-- (BOOL)isVisible
-{
-    return !_isSittingDown;
-}
-
-- (void)didReceiveMouseEvent:(const WebKit::NativeWebMouseEvent&)event
-{
-    auto point = event.position();
-
-    if (WKHoverPlatterDomain.rootSettings.platterEnabledForMouse) {
-        _platterCenter = point;
-        [self update];
-        return;
-    }
-
-    auto boundingRect = self.platterBoundingRect;
-    if (!boundingRect.contains(point) && point != WebCore::FloatPoint { -1, -1 })
-        [self dismissPlatterWithAnimation:YES];
-}
-
-- (void)didLongPressAtPoint:(WebCore::FloatPoint)point
-{
-    if (!WKHoverPlatterDomain.rootSettings.platterEnabledForLongPress)
-        return;
-
-    _platterCenter = point;
-    [self update];
-}
-
-- (void)didSingleTapAtPoint:(WebCore::FloatPoint)point
-{
-    if (!WKHoverPlatterDomain.rootSettings.platterEnabledForSingleTap)
-        return;
-
-    _platterCenter = point;
-    [self update];
-}
-
-- (void)didDoubleTapAtPoint:(WebCore::FloatPoint)point
-{
-    if (!WKHoverPlatterDomain.rootSettings.platterEnabledForDoubleTap)
-        return;
-
-    _platterCenter = point;
-    [self update];
-}
-
-- (WebCore::FloatRect)platterBoundingRect
-{
-    auto radius = WKHoverPlatterDomain.rootSettings.platterRadius;
-    return { _platterCenter - WebCore::FloatSize(radius, radius), WebCore::FloatSize(radius * 2, radius * 2) };
-}
-
-- (WebCore::FloatRect)linkSearchRect
-{
-    auto radius = WKHoverPlatterDomain.rootSettings.linkSearchRadius;
-    return { _platterCenter - WebCore::FloatSize(radius, radius), WebCore::FloatSize(radius * 2, radius * 2) };
-}
-
-- (void)update
-{
-    auto parameters = WKHoverPlatterDomain.rootSettings;
-
-    if (parameters.showDebugOverlay)
-        [self updateDebugIndicator];
-
-    auto boundingRect = self.platterBoundingRect;
-    RetainPtr<CALayer> platter = _platterLayer ?: adoptNS([[CALayer alloc] init]);
-    [platter setBounds:CGRectMake(0, 0, boundingRect.width(), boundingRect.height())];
-    [platter setPosition:boundingRect.center()];
-    [platter setShadowColor:UIColor.blackColor.CGColor];
-    [platter setShadowOffset:CGSizeMake(0, 10)];
-    [platter setShadowOpacity:0.25];
-    [platter setShadowRadius:10];
-    [platter web_disableAllActions];
-    [[[_view superview] layer] addSublayer:platter.get()];
-
-    RetainPtr<CAPortalLayer> snapshot = _snapshotLayer ?: adoptNS([[CAPortalLayer alloc] init]);
-    [snapshot setSourceLayer:[_view layer]];
-    [snapshot setMatchesPosition:YES];
-    [snapshot setMatchesTransform:YES];
-    [snapshot setMasksToBounds:YES];
-    [snapshot setCornerRadius:parameters.platterRadius];
-    [snapshot setBackgroundColor:UIColor.blackColor.CGColor];
-    [snapshot setBorderColor:[UIColor colorWithWhite:0 alpha:0.2].CGColor];
-    [snapshot setBorderWidth:1];
-    [snapshot setAnchorPoint:CGPointMake(0.5, 0.5)];
-    [snapshot setSublayerTransform:CATransform3DMakeScale(parameters.platterScale, parameters.platterScale, 1)];
-    [snapshot setMasksToBounds:YES];
-    [snapshot setFrame:CGRectMake(0, 0, boundingRect.width(), boundingRect.height())];
-    [snapshot web_disableAllActions];
-    [platter addSublayer:snapshot.get()];
-
-    if (_isSittingDown) {
-        if (parameters.animateScale) {
-            auto inverseScale = 1.f / parameters.platterScale;
-            addAnimation(platter.get(), @"transform", [NSValue valueWithCATransform3D:CATransform3DMakeScale(inverseScale, inverseScale, 1)], [NSValue valueWithCATransform3D:CATransform3DIdentity]);
-            addAnimation(snapshot.get(), @"sublayerTransform", [NSValue valueWithCATransform3D:CATransform3DIdentity], [NSValue valueWithCATransform3D:[snapshot sublayerTransform]]);
-            addAnimation(platter.get(), @"shadowOpacity", @0, @([platter shadowOpacity]));
-            addAnimation(snapshot.get(), @"borderColor", (id)UIColor.clearColor.CGColor, (id)[snapshot borderColor]);
-        } else
-            addAnimation(platter.get(), @"opacity", @0, @1);
-    }
-
-    _platterLayer = platter;
-    _snapshotLayer = snapshot;
-
-    _isSittingDown = false;
-}
-
-- (void)updateDebugIndicator
-{
-    auto searchBoundingRect = self.linkSearchRect;
-
-    RetainPtr<CALayer> debugIndicator = _debugIndicatorLayer ?: adoptNS([[CALayer alloc] init]);
-    [debugIndicator setBounds:CGRectMake(0, 0, searchBoundingRect.width(), searchBoundingRect.height())];
-    [debugIndicator setPosition:searchBoundingRect.center()];
-    [debugIndicator setBorderColor:[UIColor colorWithRed:1 green:0 blue:0 alpha:1].CGColor];
-    [debugIndicator setBorderWidth:1];
-    [debugIndicator web_disableAllActions];
-    [[_view layer] addSublayer:debugIndicator.get()];
-
-    RetainPtr<CATextLayer> linkCountLayer = _linkCountLayer ?: adoptNS([[CATextLayer alloc] init]);
-    [linkCountLayer setBounds:CGRectMake(0, 0, 50, 16)];
-    [linkCountLayer setPosition:CGPointMake(-10, (searchBoundingRect.height() / 2) - 8)];
-    [linkCountLayer setForegroundColor:UIColor.blackColor.CGColor];
-    [linkCountLayer setShadowColor:UIColor.whiteColor.CGColor];
-    [linkCountLayer setShadowOffset:CGSizeMake(0, 0)];
-    [linkCountLayer setShadowOpacity:1];
-    [linkCountLayer setShadowRadius:2];
-    [linkCountLayer setFontSize:16];
-    [linkCountLayer setContentsScale:4];
-    [linkCountLayer setAlignmentMode:kCAAlignmentCenter];
-    [linkCountLayer web_disableAllActions];
-    [debugIndicator addSublayer:linkCountLayer.get()];
-
-    RetainPtr<CAShapeLayer> linkHighlightLayer = _linkHighlightLayer ?: adoptNS([[CAShapeLayer alloc] init]);
-    [linkHighlightLayer setFillColor:UIColor.clearColor.CGColor];
-    [linkHighlightLayer setStrokeColor:[UIColor.blueColor colorWithAlphaComponent:0.3].CGColor];
-    [linkHighlightLayer web_disableAllActions];
-    [[_view layer] addSublayer:linkHighlightLayer.get()];
-
-    [_delegate interactionRegionsForHoverPlatter:self inRect:searchBoundingRect completionHandler:makeBlockPtr([self, strongSelf = retainPtr(self)] (Vector<WebCore::InteractionRegion> regions) {
-        if (!_linkCountLayer && !_linkHighlightLayer)
-            return;
-
-        [_linkCountLayer setString:[NSString stringWithFormat:@"%zu", regions.size()]];
-
-        WebCore::Path path;
-        for (const auto& region : regions) {
-            for (const auto& rect : region.rectsInContentCoordinates)
-                path.addRect(rect);
-        }
-        [_linkHighlightLayer setPath:path.platformPath()];
-    }).get()];
-
-    _debugIndicatorLayer = debugIndicator;
-    _linkCountLayer = linkCountLayer;
-    _linkHighlightLayer = linkHighlightLayer;
-}
-
-- (void)dismissPlatterWithAnimation:(BOOL)withAnimation
-{
-    if (_isSittingDown)
-        return;
-    _isSittingDown = true;
-
-    if (!withAnimation) {
-        [_debugIndicatorLayer removeFromSuperlayer];
-        [_platterLayer removeFromSuperlayer];
-        [_linkCountLayer removeFromSuperlayer];
-        [_linkHighlightLayer removeFromSuperlayer];
-        [self clearLayers];
-        return;
-    }
-
-    [CATransaction begin];
-    [CATransaction setCompletionBlock:[protectedSelf = retainPtr(self), platterLayer = _platterLayer] {
-        [protectedSelf didFinishDismissalAnimation:platterLayer.get()];
-    }];
-
-    auto parameters = WKHoverPlatterDomain.rootSettings;
-    if (parameters.animateScale) {
-        auto inverseScale = 1.f / parameters.platterScale;
-        addAnimation(_platterLayer.get(), @"transform", [NSValue valueWithCATransform3D:CATransform3DIdentity], [NSValue valueWithCATransform3D:CATransform3DMakeScale(inverseScale, inverseScale, 1)]);
-        addAnimation(_snapshotLayer.get(), @"sublayerTransform", [NSValue valueWithCATransform3D:[_snapshotLayer sublayerTransform]], [NSValue valueWithCATransform3D:CATransform3DIdentity]);
-        addAnimation(_platterLayer.get(), @"shadowOpacity", @([_platterLayer shadowOpacity]), @0);
-        addAnimation(_snapshotLayer.get(), @"borderColor", (id)[_snapshotLayer borderColor], (id)UIColor.clearColor.CGColor);
-    } else
-        addAnimation(_platterLayer.get(), @"opacity", @1, @0);
-
-    [CATransaction commit];
-}
-
-- (void)didFinishDismissalAnimation:(CALayer *)platterLayer
-{
-    [platterLayer removeFromSuperlayer];
-}
-
-- (void)clearLayers
-{
-    _debugIndicatorLayer = nil;
-    _platterLayer = nil;
-    _snapshotLayer = nil;
-    _linkCountLayer = nil;
-    _linkHighlightLayer = nil;
-}
-
-- (WebCore::FloatPoint)adjustedPointForPoint:(WebCore::FloatPoint)point
-{
-    if (_isSittingDown)
-        return point;
-
-    auto delta = point - _platterCenter;
-    delta.scale(1.f / WKHoverPlatterDomain.rootSettings.platterScale);
-    return _platterCenter + delta;
-}
-
-- (WebKit::NativeWebMouseEvent)adjustedEventForEvent:(const WebKit::NativeWebMouseEvent&)event
-{
-    if (_isSittingDown)
-        return event;
-
-    auto inverseScale = 1.f / WKHoverPlatterDomain.rootSettings.platterScale;
-    auto adjustedPoint = roundedIntPoint([self adjustedPointForPoint:event.position()]);
-    return WebKit::NativeWebMouseEvent(event, adjustedPoint, adjustedPoint, event.deltaX() * inverseScale, event.deltaY() * inverseScale, event.deltaZ() * inverseScale);
-}
-
-@end
-
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Deleted: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.h	2022-05-19 18:18:01 UTC (rev 294495)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-
-#import "PrototypeToolsSPI.h"
-
-@interface WKHoverPlatterParameters : PTSettings
-
-@property (nonatomic) BOOL platterEnabledForMouse;
-@property (nonatomic) BOOL platterEnabledForLongPress;
-@property (nonatomic) BOOL platterEnabledForSingleTap;
-@property (nonatomic) BOOL platterEnabledForDoubleTap;
-
-@property (nonatomic, readonly) BOOL enabled;
-
-@property (nonatomic) BOOL showDebugOverlay;
-
-@property (nonatomic) CGFloat platterRadius;
-@property (nonatomic) CGFloat platterScale;
-
-@property (nonatomic) CGFloat linkSearchRadius;
-
-@property (nonatomic) CGFloat springMass;
-@property (nonatomic) CGFloat springStiffness;
-@property (nonatomic) CGFloat springDamping;
-@property (nonatomic) NSTimeInterval duration;
-@property (nonatomic) BOOL useSpring;
-@property (nonatomic) BOOL animateScale;
-
-#if USE(APPLE_INTERNAL_SDK)
-#import <WebKitAdditions/WKHoverPlatterParametersAdditions.h>
-#endif
-
-@end
-
-@interface WKHoverPlatterDomain : PTDomain
-+ (WKHoverPlatterParameters *)rootSettings;
-@end
-
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Deleted: trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm (294494 => 294495)


--- trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/UIProcess/ios/WKHoverPlatterParameters.mm	2022-05-19 18:18:01 UTC (rev 294495)
@@ -1,155 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import "config.h"
-#import "WKHoverPlatterParameters.h"
-
-#if HAVE(UIKIT_WITH_MOUSE_SUPPORT)
-
-#import "PrototypeToolsSPI.h"
-#import <pal/spi/cocoa/QuartzCoreSPI.h>
-#import <wtf/RetainPtr.h>
-
-@interface PTSliderRow (WebKit)
-
-- (id)integerMinValue:(CGFloat)minValue maxValue:(CGFloat)maxValue;
-
-@end
-
-@implementation PTSliderRow (WebKit)
-
-- (id)integerMinValue:(CGFloat)minValue maxValue:(CGFloat)maxValue
-{
-    return [[self minValue:minValue maxValue:maxValue] valueValidator:^id(id proposedValue, id settings) {
-        return @(CGRound([proposedValue floatValue]));
-    }];
-}
-
-@end
-
-@implementation WKHoverPlatterParameters
-
-- (void)setDefaultValues
-{
-    [super setDefaultValues];
-
-    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-    auto boolDefault = ^(NSString *name) {
-        return [defaults boolForKey:name];
-    };
-
-    _platterEnabledForMouse = boolDefault(@"WKHoverPlatterEnabledForMouse");
-    _platterEnabledForLongPress = boolDefault(@"WKHoverPlatterEnabledForLongPress");
-    _platterEnabledForSingleTap = boolDefault(@"WKHoverPlatterEnabledForSingleTap");
-    _platterEnabledForDoubleTap = boolDefault(@"WKHoverPlatterEnabledForDoubleTap");
-
-    _showDebugOverlay = boolDefault(@"WKHoverPlatterShowDebugOverlay");
-
-    _platterRadius = 200;
-    _platterScale = 2;
-
-    _linkSearchRadius = 40;
-
-    _springMass = 2;
-    _springStiffness = 200;
-    _springDamping = 200;
-    _duration = 0.3;
-    _useSpring = YES;
-    _animateScale = YES;
-}
-
-- (BOOL)enabled
-{
-    return _platterEnabledForMouse
-        || _platterEnabledForLongPress
-        || _platterEnabledForSingleTap
-        || _platterEnabledForDoubleTap;
-}
-
-+ (PTModule *)settingsControllerModule
-{
-    PTSection *enablementSection = [PTModule sectionWithRows:@[
-        [PTSwitchRow rowWithTitle:@"Enable Platter For Mouse" valueKeyPath:@"platterEnabledForMouse"],
-        [PTSwitchRow rowWithTitle:@"Enable Platter For Long Press" valueKeyPath:@"platterEnabledForLongPress"],
-        [PTSwitchRow rowWithTitle:@"Enable Platter For Single Tap" valueKeyPath:@"platterEnabledForSingleTap"],
-        [PTSwitchRow rowWithTitle:@"Enable Platter For Double Tap" valueKeyPath:@"platterEnabledForDoubleTap"],
-    ] title:@"Platter"];
-
-    PTSection *debugSection = [PTModule sectionWithRows:@[
-        [PTSwitchRow rowWithTitle:@"Show Debug Overlay" valueKeyPath:@"showDebugOverlay"],
-    ] title:@"Debug"];
-
-    PTSection *animationSection = [PTModule sectionWithRows:@[
-        [PTSwitchRow rowWithTitle:@"Animate Scale" valueKeyPath:@"animateScale"],
-        [PTSwitchRow rowWithTitle:@"Use Spring" valueKeyPath:@"useSpring"],
-        [[[PTSliderRow rowWithTitle:@"Duration" valueKeyPath:@"duration"] minValue:0 maxValue:1] condition:[NSPredicate predicateWithFormat:@"useSpring == FALSE"]],
-        [[PTEditFloatRow rowWithTitle:@"Spring Mass" valueKeyPath:@"springMass"] condition:[NSPredicate predicateWithFormat:@"useSpring == TRUE"]],
-        [[PTEditFloatRow rowWithTitle:@"Spring Stiffness" valueKeyPath:@"springStiffness"] condition:[NSPredicate predicateWithFormat:@"useSpring == TRUE"]],
-        [[PTEditFloatRow rowWithTitle:@"Spring Damping" valueKeyPath:@"springDamping"] condition:[NSPredicate predicateWithFormat:@"useSpring == TRUE"]],
-    ] title:@"Animation"];
-
-    PTSection *platterSection = [PTModule sectionWithRows:@[
-        [[PTSliderRow rowWithTitle:@"Radius" valueKeyPath:@"platterRadius"] integerMinValue:0 maxValue:400],
-        [[PTSliderRow rowWithTitle:@"Scale" valueKeyPath:@"platterScale"] minValue:1 maxValue:4],
-    ] title:@"Platter"];
-
-    PTSection *linkSearchingSection = [PTModule sectionWithRows:@[
-        [[PTSliderRow rowWithTitle:@"Radius" valueKeyPath:@"linkSearchRadius"] integerMinValue:0 maxValue:200],
-    ] title:@"Link Searching"];
-
-    PTSection *restoreDefaultsSection = [PTModule sectionWithRows:@[
-        [PTButtonRow rowWithTitle:@"Restore Defaults" action:[PTRestoreDefaultSettingsRowAction action]]
-    ]];
-
-    return [PTModule moduleWithTitle:nil contents:@[ enablementSection, debugSection, animationSection, platterSection, linkSearchingSection, restoreDefaultsSection ]];
-}
-
-@end
-
-@implementation WKHoverPlatterDomain
-
-+ (WKHoverPlatterParameters *)rootSettings
-{
-    return [super rootSettings];
-}
-
-+ (NSString *)domainGroupName
-{
-    return @"WebKit";
-}
-
-+ (NSString *)domainName
-{
-    return @"Hover Platter";
-}
-
-+ (Class)rootSettingsClass
-{
-    return [WKHoverPlatterParameters class];
-}
-
-@end
-
-#endif // HAVE(UIKIT_WITH_MOUSE_SUPPORT)

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (294494 => 294495)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-19 18:05:02 UTC (rev 294494)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2022-05-19 18:18:01 UTC (rev 294495)
@@ -3825,10 +3825,6 @@
 		2D1E8222216FFF5100A15265 /* WKWebEvent.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WKWebEvent.mm; path = ios/WKWebEvent.mm; sourceTree = "<group>"; };
 		2D25F32825758E9000231A8B /* ImageBufferRemoteIOSurfaceBackend.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ImageBufferRemoteIOSurfaceBackend.h; sourceTree = "<group>"; };
 		2D25F32925758E9100231A8B /* ImageBufferRemoteIOSurfaceBackend.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = ImageBufferRemoteIOSurfaceBackend.cpp; sourceTree = "<group>"; };
-		2D279E0E2694C226004B3EEB /* WKHoverPlatter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKHoverPlatter.h; path = ios/WKHoverPlatter.h; sourceTree = "<group>"; };
-		2D279E0F2694C227004B3EEB /* WKHoverPlatter.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKHoverPlatter.mm; path = ios/WKHoverPlatter.mm; sourceTree = "<group>"; };
-		2D279E102694C2D1004B3EEB /* WKHoverPlatterParameters.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKHoverPlatterParameters.h; path = ios/WKHoverPlatterParameters.h; sourceTree = "<group>"; };
-		2D279E112694C2D1004B3EEB /* WKHoverPlatterParameters.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKHoverPlatterParameters.mm; path = ios/WKHoverPlatterParameters.mm; sourceTree = "<group>"; };
 		2D279E1826955768004B3EEB /* PrototypeToolsSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PrototypeToolsSPI.h; sourceTree = "<group>"; };
 		2D28A4951AF965A100F190C9 /* WKViewLayoutStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKViewLayoutStrategy.h; sourceTree = "<group>"; };
 		2D28A4961AF965A100F190C9 /* WKViewLayoutStrategy.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKViewLayoutStrategy.mm; sourceTree = "<group>"; };
@@ -9248,10 +9244,6 @@
 				0FCB4E4118BBE044000FCFC9 /* WKGeolocationProviderIOSObjCSecurityOrigin.mm */,
 				F4DB54E42319E733009E3155 /* WKHighlightLongPressGestureRecognizer.h */,
 				F4DB54E52319E733009E3155 /* WKHighlightLongPressGestureRecognizer.mm */,
-				2D279E0E2694C226004B3EEB /* WKHoverPlatter.h */,
-				2D279E0F2694C227004B3EEB /* WKHoverPlatter.mm */,
-				2D279E102694C2D1004B3EEB /* WKHoverPlatterParameters.h */,
-				2D279E112694C2D1004B3EEB /* WKHoverPlatterParameters.mm */,
 				F4BA33F025757E89000A3CE8 /* WKImageAnalysisGestureRecognizer.h */,
 				F4BA33F125757E89000A3CE8 /* WKImageAnalysisGestureRecognizer.mm */,
 				933DF82D1B3BC09000AEA9E3 /* WKImagePreviewViewController.h */,
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to