Skip to content

Add hit test support for HTMLModelElement#62310

Merged
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
mwyrzykowski:eng/Add-hit-test-support-for-HTMLModelElement
Apr 15, 2026
Merged

Add hit test support for HTMLModelElement#62310
webkit-commit-queue merged 1 commit intoWebKit:mainfrom
mwyrzykowski:eng/Add-hit-test-support-for-HTMLModelElement

Conversation

@mwyrzykowski
Copy link
Copy Markdown
Contributor

@mwyrzykowski mwyrzykowski commented Apr 8, 2026

b481551

Add hit test support for HTMLModelElement
https://bugs.webkit.org/show_bug.cgi?id=311768
rdar://173910796

Reviewed by Etienne Segonzac.

Add hit test support for HTMLModelElement so browsers can
download the usdz files.

* Source/WebCore/rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteMediaURL const):
(WebCore::HitTestResult::absoluteModelURL const):
* Source/WebCore/rendering/HitTestResult.h:
* Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h:
* Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.mm:
(-[_WKHitTestResult absoluteModelURL]):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h:
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in:
* Source/WebKit/Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
* Source/WebKit/Shared/WebHitTestResultData.h:
* Source/WebKit/Shared/WebHitTestResultData.serialization.in:
* Source/WebKit/UIProcess/API/APIHitTestResult.h:
(API::HitTestResult::absoluteModelURL const):
* Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:isUsingAlternateURLForImage:userInfo:]):
(-[_WKActivatedElementInfo modelURL]):
* Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm:
(WebKit::positionInformationForWebPage):

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

ef0a334

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win ⏳ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 🧪 win-tests ⏳ 🛠 mac-apple
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe ⏳ 🛠 vision-apple
🧪 ios-wk2-wpt ✅ 🧪 api-mac-debug ✅ 🛠 gtk3-libwebrtc
✅ 🧪 api-ios ✅ 🧪 mac-wk1 ✅ 🛠 gtk
✅ 🛠 ios-safer-cpp ✅ 🧪 mac-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🛠 playstation
✅ 🧪 vision-wk2 ❌ 🧪 mac-intel-wk2
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@mwyrzykowski mwyrzykowski self-assigned this Apr 8, 2026
@mwyrzykowski mwyrzykowski requested a review from cdumez as a code owner April 8, 2026 22:52
@mwyrzykowski mwyrzykowski added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Apr 8, 2026
{
#if ENABLE(MODEL_ELEMENT)
if (RefPtr element = dynamicDowncast<HTMLModelElement>(m_innerNonSharedNode.get()))
return element->currentSrc();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like other URLs in this file are passed through applyLinkDecorationFiltering first

@mwyrzykowski mwyrzykowski force-pushed the eng/Add-hit-test-support-for-HTMLModelElement branch from 040e526 to ef0a334 Compare April 15, 2026 15:54
@mwyrzykowski mwyrzykowski added the safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks label Apr 15, 2026
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Apr 15, 2026
@mwyrzykowski mwyrzykowski added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged safe-merge-queue Applied to automatically send a pull-request to merge-queue after passing EWS checks labels Apr 15, 2026
https://bugs.webkit.org/show_bug.cgi?id=311768
rdar://173910796

Reviewed by Etienne Segonzac.

Add hit test support for HTMLModelElement so browsers can
download the usdz files.

* Source/WebCore/rendering/HitTestResult.cpp:
(WebCore::HitTestResult::absoluteMediaURL const):
(WebCore::HitTestResult::absoluteModelURL const):
* Source/WebCore/rendering/HitTestResult.h:
* Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.h:
* Source/WebKit/Shared/API/Cocoa/_WKHitTestResult.mm:
(-[_WKHitTestResult absoluteModelURL]):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.h:
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.mm:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* Source/WebKit/Shared/Cocoa/InteractionInformationAtPosition.serialization.in:
* Source/WebKit/Shared/WebHitTestResultData.cpp:
(WebKit::WebHitTestResultData::WebHitTestResultData):
* Source/WebKit/Shared/WebHitTestResultData.h:
* Source/WebKit/Shared/WebHitTestResultData.serialization.in:
* Source/WebKit/UIProcess/API/APIHitTestResult.h:
(API::HitTestResult::absoluteModelURL const):
* Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
* Source/WebKit/UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithInteractionInformationAtPosition:isUsingAlternateURLForImage:userInfo:]):
(-[_WKActivatedElementInfo modelURL]):
* Source/WebKit/WebProcess/WebPage/Cocoa/PositionInformationForWebPage.mm:
(WebKit::positionInformationForWebPage):

Canonical link: https://commits.webkit.org/311320@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Add-hit-test-support-for-HTMLModelElement branch from ef0a334 to b481551 Compare April 15, 2026 21:16
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 311320@main (b481551): https://commits.webkit.org/311320@main

Reviewed commits have been landed. Closing PR #62310 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit b481551 into WebKit:main Apr 15, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Apr 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants