Changeset 69914 in webkit


Ignore:
Timestamp:
Oct 16, 2010 9:48:06 AM (14 years ago)
Author:
inferno@chromium.org
Message:

2010-10-16 Johnny Ding <jnd@chromium.org>

Reviewed by Adam Barth.

Requires a user gesture when opening file choose dialog.
https://bugs.webkit.org/show_bug.cgi?id=47593

Test: fast/forms/input-file-not-open-without-gesture.html

  • rendering/RenderFileUploadControl.cpp: (WebCore::RenderFileUploadControl::click):

2010-10-16 Johnny Ding <jnd@chromium.org>

Reviewed by Adam Barth.

Requires a user gesture when opening file choose dialog.
https://bugs.webkit.org/show_bug.cgi?id=47593

  • fast/forms/input-file-not-open-without-gesture-expected.txt: Added.
  • fast/forms/input-file-not-open-without-gesture.html: Added.
Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69913 r69914  
     12010-10-16  Johnny Ding  <jnd@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Requires a user gesture when opening file choose dialog.
     6        https://bugs.webkit.org/show_bug.cgi?id=47593
     7
     8        * fast/forms/input-file-not-open-without-gesture-expected.txt: Added.
     9        * fast/forms/input-file-not-open-without-gesture.html: Added.
     10
    1112010-10-16  Alex Milowski  <alex@milowski.com>
    212
  • trunk/WebCore/ChangeLog

    r69913 r69914  
     12010-10-16  Johnny Ding  <jnd@chromium.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Requires a user gesture when opening file choose dialog.
     6        https://bugs.webkit.org/show_bug.cgi?id=47593
     7
     8        Test: fast/forms/input-file-not-open-without-gesture.html
     9
     10        * rendering/RenderFileUploadControl.cpp:
     11        (WebCore::RenderFileUploadControl::click):
     12
    1132010-10-16  Alex Milowski  <alex@milowski.com>
    214
  • trunk/WebCore/rendering/RenderFileUploadControl.cpp

    r68817 r69914  
    125125void RenderFileUploadControl::click()
    126126{
     127    // Requires a user gesture to open the file dialog.
     128    if (!frame() || !frame()->loader()->isProcessingUserGesture())
     129        return;
    127130    if (Chrome* chromePointer = chrome())
    128         chromePointer->runOpenPanel(node()->document()->frame(), m_fileChooser);
     131        chromePointer->runOpenPanel(frame(), m_fileChooser);
    129132}
    130133
Note: See TracChangeset for help on using the changeset viewer.