Bug 263887

Summary: REGRESSION(268320@main): WebDriver fullscreen/input type=file tests failing
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: WebKit Misc.Assignee: Abrar Rahman Protyasha <a_protyasha>
Status: RESOLVED FIXED    
Severity: Normal CC: a_protyasha, ntim, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=259028

Description Sam Sneddon [:gsnedders] 2023-10-30 07:33:19 PDT
The following WPT tests regressed in 268320@main:

/fullscreen/api/element-request-fullscreen-cross-origin.sub.html
/infrastructure/testdriver/file_upload.sub.html
/screen-capture/delegate-request.https.sub.html
/screen-capture/getdisplaymedia-after-discard.https.html
/screen-capture/permissions-policy-audio+video.https.sub.html
/screen-capture/permissions-policy-audio.https.sub.html
/screen-capture/permissions-policy-video.https.sub.html
/webdriver/tests/classic/element_clear/clear.py
/webdriver/tests/classic/element_send_keys/events.py
/webdriver/tests/classic/element_send_keys/file_upload.py
/webdriver/tests/classic/execute_script/collections.py
/webdriver/tests/classic/fullscreen_window/fullscreen.py
/webdriver/tests/classic/fullscreen_window/stress.py
/webdriver/tests/classic/fullscreen_window/user_prompts.py
/webdriver/tests/classic/maximize_window/maximize.py
/webdriver/tests/classic/set_window_rect/set.py

A brief glance suggests that we’re relying in the automation protocol on having every script evaluated as a user gesture for a variety of our internal scripts. For example, Source/WebKit/UIProcess/Automation/atoms/EnterFullscreen.js relies on `document.documentElement.webkitRequestFullscreen()` working when called over the automation protocol.
Comment 1 Sam Sneddon [:gsnedders] 2023-10-30 07:39:13 PDT
rdar://117683701
Comment 2 Sam Sneddon [:gsnedders] 2023-10-30 07:43:26 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19716
Comment 3 Abrar Rahman Protyasha 2023-11-01 04:01:30 PDT
Pull request: https://github.com/WebKit/WebKit/pull/19830
Comment 4 EWS 2023-11-03 14:08:44 PDT
Committed 270201@main (6444dd094f23): <https://commits.webkit.org/270201@main>

Reviewed commits have been landed. Closing PR #19716 and removing active labels.
Comment 5 Abrar Rahman Protyasha 2023-12-12 02:42:44 PST
Re-opening for pull request https://github.com/WebKit/WebKit/pull/21668
Comment 6 Abrar Rahman Protyasha 2023-12-12 02:45:55 PST
Will use bug 259028 to track a change in this area. Read the discussion in that bug for more context.