Multiple File Input Icon Set Regardless of File List
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 20:18:05 +0000 (20:18 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Apr 2019 20:18:05 +0000 (20:18 +0000)
commit64b183a73f55c32c3f280b7bd519d467a97c3300
tree0b58ded3c7adea280035cf61273839a0b2a7f280
parent8cc5e2b1f9cf0576af54b6d2464144d3211c2d43
Multiple File Input Icon Set Regardless of File List
https://bugs.webkit.org/show_bug.cgi?id=195537

Source/WebCore:

Patch by Guy Lewin <guy@lewin.co.il> on 2019-04-23
Reviewed by Alexey Proskuryakov.

File input elements display icon with an empty file list after
resetting the file list in 'change' event handler - on iOS

Test: fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html

* html/FileInputType.cpp:
(WebCore::FileInputType::filesChosen):

Source/WebKit:

Patch by Guy Lewin <guy@lewin.co.il> on 2019-04-23
Reviewed by Alexey Proskuryakov.

Add WKOpenPanelResultListenerChooseMediaFiles() to choose files with
icon and display string on iOS file open panels

* UIProcess/API/C/WKOpenPanelResultListener.cpp:
(WKOpenPanelResultListenerChooseMediaFiles):
* UIProcess/API/C/WKOpenPanelResultListener.h:

Tools:

Patch by Guy Lewin <guy@lewin.co.il> on 2019-04-23
Reviewed by Alexey Proskuryakov.

Add setOpenPanelFilesMediaIcon to TestRunner in order to test icon and
display string in iOS file inputs

* DumpRenderTree/TestRunner.cpp:
(SetOpenPanelFilesMediaIconCallback):
(TestRunner::staticFunctions):
(TestRunner::setOpenPanelFilesMediaIcon):
* DumpRenderTree/TestRunner.h:
(TestRunner::openPanelFilesMediaIcon const):
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:runOpenPanelForFileButtonWithResultListener:allowMultipleFiles:]):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setOpenPanelFilesMediaIcon):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::runOpenPanel):
(WTR::TestController::resetStateToConsistentValues):
* WebKitTestRunner/TestController.h:
(WTR::TestController::openPanelFileURLsMediaIcon const):
(WTR::TestController::setOpenPanelFileURLsMediaIcon):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

Add a layout test to verify file input icon resets on change event (iOS)
Change expectations according to
file-reset-in-change-using-open-panel.html

Patch by Guy Lewin <guy@lewin.co.il> on 2019-04-23
Reviewed by Alexey Proskuryakov.

* fast/forms/file/file-reset-in-change-using-open-panel-with-icon-expected.html: Added.
* fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html: Added.
* platform/win/TestExpectations:
* platform/wincairo/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244557 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/forms/file/file-reset-in-change-using-open-panel-with-icon-expected.html [new file with mode: 0644]
LayoutTests/fast/forms/file/file-reset-in-change-using-open-panel-with-icon.html [new file with mode: 0644]
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/html/FileInputType.cpp
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/API/C/WKOpenPanelResultListener.cpp
Source/WebKit/UIProcess/API/C/WKOpenPanelResultListener.h
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/mac/UIDelegate.mm
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp