Changeset 106538 in webkit


Ignore:
Timestamp:
Feb 2, 2012 12:09:07 AM (12 years ago)
Author:
commit-queue@webkit.org
Message:

hidden attribute on <input type=file /> suppresses the file selection dialog
https://bugs.webkit.org/show_bug.cgi?id=58208

Patch by Rakesh KN <rakesh.kn@motorola.com> on 2012-02-02
Reviewed by Ryosuke Niwa.

.:

  • ManualTests/input-file-hidden-open-dialog-on-click.html: Added.

Adding manual test as the file dialog opens only in User gesture.

Source/WebCore:

We want to allow opening file dialog on hidden element when click() is called
on the element. The behaviour is similar to Firefox and IE.

Added manual test as the file dialog opens only on user gesture.

  • html/FileInputType.cpp:

(WebCore::FileInputType::handleDOMActivateEvent):
Removed renderer check as input can be hidden.

Location:
trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r106537 r106538  
     12012-02-02  Rakesh KN  <rakesh.kn@motorola.com>
     2
     3        hidden attribute on <input type=file /> suppresses the file selection dialog
     4        https://bugs.webkit.org/show_bug.cgi?id=58208
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        * ManualTests/input-file-hidden-open-dialog-on-click.html: Added.
     9        Adding manual test as the file dialog opens only in User gesture.
     10
    1112012-02-01  Philippe Normand  <pnormand@igalia.com>
    212
  • trunk/Source/WebCore/ChangeLog

    r106537 r106538  
     12012-02-02  Rakesh KN  <rakesh.kn@motorola.com>
     2
     3        hidden attribute on <input type=file /> suppresses the file selection dialog
     4        https://bugs.webkit.org/show_bug.cgi?id=58208
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        We want to allow opening file dialog on hidden element when click() is called
     9        on the element. The behaviour is similar to Firefox and IE.
     10
     11        Added manual test as the file dialog opens only on user gesture.
     12
     13        * html/FileInputType.cpp:
     14        (WebCore::FileInputType::handleDOMActivateEvent):
     15        Removed renderer check as input can be hidden.
     16
    1172012-02-01  Philippe Normand  <pnormand@igalia.com>
    218
  • trunk/Source/WebCore/html/FileInputType.cpp

    r105710 r106538  
    140140void FileInputType::handleDOMActivateEvent(Event* event)
    141141{
    142     if (element()->disabled() || !element()->renderer())
     142    if (element()->disabled())
    143143        return;
    144144
Note: See TracChangeset for help on using the changeset viewer.