Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: c03edb3d4b827c83518705ca8970c1fad89f987c
https://github.com/WebKit/WebKit/commit/c03edb3d4b827c83518705ca8970c1fad89f987c
Author: Wenson Hsieh <[email protected]>
Date: 2026-01-03 (Sat, 03 Jan 2026)
Changed paths:
M Source/WebCore/page/Navigator.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/page/QuirksData.h
Log Message:
-----------
[iPadOS] live.com: native selection falls out of sync with custom selection
range when editing word document
https://bugs.webkit.org/show_bug.cgi?id=304894
rdar://162794175
Reviewed by Abrar Rahman Protyasha.
Add a UA string quirk on live.com, to masquerade as ChromeOS in the case where:
- `navigator.userAgent` is being called.
- The navigator is in a subframe with last path component,
`wordeditorframe.aspx`.
- The immediate calling script has last path component, `wordeditords.js`.
This causes Microsoft Word to opt into a set of behaviors where touch
interactions cause the web
app's custom selection and text interaction UI to appear, rather than the
native selection. This in
turn allows text formatting tools (highlighter, B/I/U etc.) to work properly
instead of targeting
the native selection range (which is out of sync).
* Source/WebCore/page/Navigator.cpp:
(WebCore::Navigator::userAgent const):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::needsChromeOSNavigatorUserAgentQuirk const):
(WebCore::handleLiveQuirks):
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
Canonical link: https://commits.webkit.org/305079@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications