Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 14ef33d019a71bf5e287d464aea9513456aa80ed
      
https://github.com/WebKit/WebKit/commit/14ef33d019a71bf5e287d464aea9513456aa80ed
  Author: Zak Ridouh <[email protected]>
  Date:   2026-05-20 (Wed, 20 May 2026)

  Changed paths:
    M LayoutTests/TestExpectations
    A 
LayoutTests/http/tests/site-isolation/open-panel-in-cross-origin-iframe-expected.txt
    A 
LayoutTests/http/tests/site-isolation/open-panel-in-cross-origin-iframe.html
    A LayoutTests/http/tests/site-isolation/resources/file-input-iframe.html
    M LayoutTests/platform/ios/TestExpectations
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  [Site Isolation] [iOS] File picker selection is dropped when <input 
type=file> is in a cross-origin iframe
https://bugs.webkit.org/show_bug.cgi?id=314257
rdar://175037150

Reviewed by Aditya Keerthi.

With Site Isolation, an <input type=file> in a cross-origin iframe runs
in a different WebContent process than the main frame. After the user
picks a file, WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon
was sending the reply IPCs with the main frame's PageID and granting the
read sandbox extension to the main frame's process — so the iframe's
WebContent never sees the result. input.files stays empty, and because
its m_activeOpenPanelResultListener never clears, subsequent taps on the
input are short-circuited by WebChromeClient::runOpenPanel.

Route the reply IPCs and the NetworkProcess file-access grant through
the WebOpenPanelResultListenerProxy that runOpenPanel created for the
originating frame, matching how the non-display-string path already
works.

Test: Tools/TestWebKitAPI/Tests/WebKit/WKWebView/SiteIsolation.mm

* LayoutTests/TestExpectations:
* 
LayoutTests/http/tests/site-isolation/open-panel-in-cross-origin-iframe-expected.txt:
 Added.
* LayoutTests/http/tests/site-isolation/open-panel-in-cross-origin-iframe.html: 
Added.
* LayoutTests/http/tests/site-isolation/resources/file-input-iframe.html: Added.
* LayoutTests/platform/ios/TestExpectations:
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to