REGRESSION(r99369): File input button doesn't highlight when pressed
https://bugs.webkit.org/show_bug.cgi?id=79385
Reviewed by Kent Tamura.
Source/WebCore:
Fixes an issue where the file input button doesn't highlight on mouse press.
Currently we always override the active state of the button with whether
a dragged file is being hovered over the file input control (i.e. can the control
receive a dropped file; HTMLInputElement::canReceiveDroppedFiles()).
Instead, we should only override the active state of the button when the state
changes for whether we can receive dropped files (e.g. during a drag) so that
we honor the active state of the button when it is pressed.
Test: fast/forms/file/file-input-pressed-state.html
* rendering/RenderFileUploadControl.cpp:
(WebCore::RenderFileUploadControl::RenderFileUploadControl):
(WebCore::RenderFileUploadControl::updateFromElement):
* rendering/RenderFileUploadControl.h:
(RenderFileUploadControl):
LayoutTests:
Add test to ensure that the file input button visually changes when pressed.
* fast/forms/file/file-input-pressed-state-expected.txt: Added.
* fast/forms/file/file-input-pressed-state.html: Added.
* platform/mac/fast/forms/file/file-input-pressed-state-expected.png: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@110598
268f45cc-cd09-0410-ab3c-
d52691b4dbfc