haikuwebkit/WebKitLibraries/WebKitPrivateFrameworkStubs
Tim Horton 5ce1ea419a Add WKHoverPlatter and some knobs to tweak its appearance
https://bugs.webkit.org/show_bug.cgi?id=227735
<rdar://problem/79198262>

Reviewed by Sam Weinig.

Source/WebCore/PAL:

* pal/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit:

* Configurations/WebKit.xcconfig:
* Platform/spi/ios/PrototypeToolsSPI.h: Added.
* SourcesCocoa.txt:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView rootContentView]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setUpInteraction]):
(-[WKContentView cleanUpInteraction]):
Install and uninstall the platter alongside the gestures that drive it.

(-[WKContentView mouseGestureRecognizerChanged:]):
(-[WKContentView hoverGestureRecognizerChanged:]):
When the gesture recognizers fire, also update the hover point.

(-[WKContentView positionInformationForHoverPlatter:withRequest:completionHandler:]):
* UIProcess/ios/WKHoverPlatter.h: Added.
* UIProcess/ios/WKHoverPlatter.mm: Added.
(createBaseAnimation):
(addAnimation):
(setAdditionalPlatterLayerProperties):
(addAdditionalIncomingAnimations):
(addAdditionalDismissalAnimations):
(-[WKHoverPlatter initWithView:delegate:]):
(-[WKHoverPlatter invalidate]):
(-[WKHoverPlatter hoverPoint]):
(-[WKHoverPlatter setHoverPoint:]):
(-[WKHoverPlatter requestPositionInformationForCurrentHoverPoint]):
(-[WKHoverPlatter didReceivePositionInformation:]):
(-[WKHoverPlatter dismissPlatterWithAnimation:]):
(-[WKHoverPlatter didFinishAnimationForShadow:]):
(-[WKHoverPlatter clearLayers]):
Animate the platter in and out, and optionally between states, as the hover point moves.
Use the TextIndicator's geometry information, but not its snapshot; we use a
CAPortalLayer for the platter instead. A future patch will avoid taking the snapshot
entirely, since we call setHoverPoint (and thus generate a TextIndicator) a *lot*
when moving the mouse around, and all those snapshots add up.

* UIProcess/ios/WKHoverPlatterParameters.h: Added.
* UIProcess/ios/WKHoverPlatterParameters.mm: Added.
(-[PTSliderRow integerMinValue:maxValue:]):
(-[WKHoverPlatterParameters setDefaultValues]):
(+[WKHoverPlatterParameters settingsControllerModule]):
(+[WKHoverPlatterDomain rootSettings]):
(+[WKHoverPlatterDomain domainGroupName]):
(+[WKHoverPlatterDomain domainName]):
(+[WKHoverPlatterDomain rootSettingsClass]):
Add some knobs, with reasonable defaults, for experimentation.

* WebKit.xcodeproj/project.pbxproj:

WebKitLibraries:

* WebKitPrivateFrameworkStubs/appletvos/14/PrototypeTools.framework/PrototypeTools.tbd: Added.
* WebKitPrivateFrameworkStubs/appletvos/15/PrototypeTools.framework/PrototypeTools.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/14/PrototypeTools.framework/PrototypeTools.tbd: Added.
* WebKitPrivateFrameworkStubs/iOS/15/PrototypeTools.framework/PrototypeTools.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/7/PrototypeTools.framework/PrototypeTools.tbd: Added.
* WebKitPrivateFrameworkStubs/watchos/8/PrototypeTools.framework/PrototypeTools.tbd: Added.


Canonical link: https://commits.webkit.org/239503@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@279711 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2021-07-08 06:46:49 +00:00
..
Mac Add Gamepad tests that exercise the native frameworks 2020-07-23 16:36:15 +00:00
appletvos Add WKHoverPlatter and some knobs to tweak its appearance 2021-07-08 06:46:49 +00:00
iOS Add WKHoverPlatter and some knobs to tweak its appearance 2021-07-08 06:46:49 +00:00
watchos Add WKHoverPlatter and some knobs to tweak its appearance 2021-07-08 06:46:49 +00:00