[webkit-changes] [WebKit/WebKit] a01c92: [iPad] docs.google.com: Clicking on “NO THANKS” or...
Wenson Hsieh
noreply at github.com
Wed Dec 4 13:40:09 PST 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a01c92ffd71c327f774bd1edb452a10558e8d71b
https://github.com/WebKit/WebKit/commit/a01c92ffd71c327f774bd1edb452a10558e8d71b
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2024-12-04 (Wed, 04 Dec 2024)
Changed paths:
M Source/WebCore/page/ChromeClient.h
M Source/WebCore/page/EventHandler.cpp
M Source/WebCore/page/Quirks.cpp
M Source/WebCore/page/Quirks.h
M Source/WebCore/page/QuirksData.h
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp
M Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h
M Source/WebKit/WebProcess/WebPage/WebPage.h
M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm
Log Message:
-----------
[iPad] docs.google.com: Clicking on “NO THANKS” or “GET THE APP” using trackpad does nothing
https://bugs.webkit.org/show_bug.cgi?id=284056
rdar://139903194
Reviewed by Abrar Rahman Protyasha.
The App Store promo UI on docs.google.com currently only responds to touch events, and does nothing
when clicked using a trackpad on iPad. Fix this by extending the existing quirk for cbssports.com,
`shouldSynthesizeTouchEventsAfterNonSyntheticClick`, such that we dispatch touch events when
clicking with a trackpad over these buttons.
* Source/WebCore/page/ChromeClient.h:
(WebCore::ChromeClient::didDispatchClickEvent):
(WebCore::ChromeClient::didSwallowClickEvent): Deleted.
Rename this client method to `didDispatchClickEvent`, now that it's dispatched even when the event
is not swallowed by the event handler (e.g. through `stopPropagation()` or `preventDefault()`).
* Source/WebCore/page/EventHandler.cpp:
(WebCore::EventHandler::swallowAnyClickEvent):
Adjust this so that it calls into `didDispatchClickEvent` on the chrome client regardless of whether
`dispatchMouseEvent` returns `true` or `false`. This is necessary in order for the quirk to work on
Google Docs.
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::isTouchBarUpdateSuppressedForHiddenContentEditable const):
(WebCore::Quirks::shouldSuppressAutocorrectionAndAutocapitalizationInHiddenEditableAreas const):
Refactor to call the new `isFoo()` helper methods.
(WebCore::Quirks::isCBSSports const):
Add a new helper method to check if the current top domain is cbssports.com, and cache the result.
(WebCore::Quirks::isGoogleDocs const):
Add a new helper method to check if the top host is docs.google.com, and cache the result.
(WebCore::Quirks::needsDeferKeyDownAndKeyPressTimersUntilNextEditingCommand const):
(WebCore::Quirks::shouldSynthesizeTouchEventsAfterNonSyntheticClick const):
Implement the new quirk here — look for a parent of the click target that contains the class name
`docs-ml-promotion-action-container`.
* Source/WebCore/page/Quirks.h:
* Source/WebCore/page/QuirksData.h:
Add new cached state for `isGoogleDocs` and `isCBSSports`, and remove the now-unnecessary flags for
the other individual quirk behaviors.
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didDispatchClickEvent):
(WebKit::WebChromeClient::didSwallowClickEvent): Deleted.
* Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h:
* Source/WebKit/WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::didDispatchClickEvent):
(WebKit::WebPage::didSwallowClickEvent): Deleted.
* Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didDispatchClickEvent):
(WebKit::WebPage::didSwallowClickEvent): Deleted.
Canonical link: https://commits.webkit.org/287359@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list