Bug 234299 - Add a basic heuristic for collecting and extracting text from controls in ModalContainerObserver
Summary: Add a basic heuristic for collecting and extracting text from controls in Mod...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-12-14 08:34 PST by Wenson Hsieh
Modified: 2021-12-19 12:26 PST (History)
6 users (show)

See Also:


Attachments
Patch (12.30 KB, patch)
2021-12-17 10:58 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Rebase on trunk (12.52 KB, patch)
2021-12-18 11:32 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
For EWS (12.77 KB, patch)
2021-12-19 11:30 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-12-14 08:34:31 PST
.
Comment 1 Wenson Hsieh 2021-12-17 10:58:05 PST Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2021-12-18 11:32:11 PST
Created attachment 447524 [details]
Rebase on trunk
Comment 3 Dean Jackson 2021-12-19 08:46:57 PST
Comment on attachment 447524 [details]
Rebase on trunk

View in context: https://bugs.webkit.org/attachment.cgi?id=447524&action=review

> Source/WebCore/page/ModalContainerObserver.cpp:182
> +    if (element.hasEventListeners(eventNames().clickEvent) || element.hasEventListeners(eventNames().mousedownEvent) || element.hasEventListeners(eventNames().mouseupEvent))

What about touch and pointer events?

> Source/WebCore/page/ModalContainerObserver.cpp:209
> +            if (outer->hasTagName(HTMLNames::divTag) || outer->hasTagName(HTMLNames::spanTag) || outer->hasTagName(HTMLNames::pTag))

What about <section>?
Comment 4 Wenson Hsieh 2021-12-19 11:19:39 PST
Comment on attachment 447524 [details]
Rebase on trunk

View in context: https://bugs.webkit.org/attachment.cgi?id=447524&action=review

Thanks for taking a look!

>> Source/WebCore/page/ModalContainerObserver.cpp:182
>> +    if (element.hasEventListeners(eventNames().clickEvent) || element.hasEventListeners(eventNames().mousedownEvent) || element.hasEventListeners(eventNames().mouseupEvent))
> 
> What about touch and pointer events?

Makes sense — will add touchstart/end and pointerup/down here as well.

>> Source/WebCore/page/ModalContainerObserver.cpp:209
>> +            if (outer->hasTagName(HTMLNames::divTag) || outer->hasTagName(HTMLNames::spanTag) || outer->hasTagName(HTMLNames::pTag))
> 
> What about <section>?

That's a good point! Section elements probably fall under this same umbrella of "more likely to contain a semantically meaningful controls, rather than being one itself". Will add section to the list here.
Comment 5 Wenson Hsieh 2021-12-19 11:30:17 PST
Created attachment 447551 [details]
For EWS
Comment 6 EWS 2021-12-19 12:25:38 PST
Committed r287245 (245403@main): <https://commits.webkit.org/245403@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 447551 [details].
Comment 7 Radar WebKit Bug Importer 2021-12-19 12:26:16 PST
<rdar://problem/86697551>