Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 09b67645da34576d95fe24db2401d8582b1b13c5
      
https://github.com/WebKit/WebKit/commit/09b67645da34576d95fe24db2401d8582b1b13c5
  Author: Abrar Rahman Protyasha <[email protected]>
  Date:   2026-09-10 (Thu, 10 Sep 2026)

  Changed paths:
    M Source/WebCore/Modules/model-element/HTMLModelElement.h
    M Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h
    M Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm
    M 
Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in
    M Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm
    M Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm
    A Tools/TestWebKitAPI/Resources/cocoa/orbit-model-page.html
    M Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift

  Log Message:
  -----------
  [AppKit Gestures] Cannot rotate some <model> elements in orbit stage mode by 
press-and-dragging
https://bugs.webkit.org/show_bug.cgi?id=323383
rdar://186432171

Reviewed by Mike Wyrzykowski and Richard Robinson.

There is no stage mode session (MODEL_ELEMENT_STAGE_MODE_INTERACTION) on
macOS. Orbit stage mode interactions are instead driven by the mouse
events HTMLModelElement::defaultEventHandler forwards to model player.

AppKit Gestures-driven model element interactions drive these mouse
events through the synthesis under mouse tracking recognition. This
requires the pan gesture to fail for relevant content, which we decide
using InteractionInformationAtPosition data.

For this patch, we teach _panShouldBeginAtLocation to yield the pan
gesture when `isInteractiveModel` is set. Also, this bit already existed
for this purpose, but was populated only under MODEL_PROCESS. Instead,
we widen the bit to MODEL_ELEMENT_STAGE_MODE and mirror it to read the
same predicate that gates HTMLModelElement::defaultEventHandler().

Test: 
AppKitGesturesTests.Basic/pressDragOverOrbitModelCausesRotation(adjustStyle:)

* Source/WebCore/Modules/model-element/HTMLModelElement.h:
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h:
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in:
* Source/WebKit/UIProcess/mac/AppKitGestures/WKAppKitGestureController.mm:
(-[WKAppKitGestureController _panShouldBeginAtLocation:]):
* Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm:
(WebKit::positionInformationForWebPage):
* Tools/TestWebKitAPI/Resources/cocoa/orbit-model-page.html: Added.
* Tools/TestWebKitAPI/Tests/WebKit/WebPage/AppKit Gesture 
Tests/BasicAppKitGesturesTests.swift:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to