Changeset 95226 in webkit


Ignore:
Timestamp:
Sep 15, 2011 2:04:09 PM (13 years ago)
Author:
jonlee@apple.com
Message:

Submitting a form with target=_blank works only once
https://bugs.webkit.org/show_bug.cgi?id=28633
<rdar://problem/7357787>

Reviewed by Andy Estes.

Source/WebCore:

Test: fast/forms/submit-to-blank-multiple-times.html

The call to reset the multiple form submission bool is pushed down from the mouseDown handler to
handleMousePressEvent(), to include WK2 coverage, similar to keyEvent.

  • page/EventHandler.cpp:

(WebCore::EventHandler::handleMousePressEvent):
(WebCore::EventHandler::keyEvent): clarified old FIXME comment. Both key events and mouse events
may submit a form multiple times, but the call to reset the handler should probably be in another
abstraction layer.

  • page/mac/EventHandlerMac.mm:

(WebCore::EventHandler::mouseDown):

Source/WebKit/chromium:

  • src/WebViewImpl.cpp:

(WebKit::WebViewImpl::mouseDown): Remove call to resetMultipleFormSubmissionProtection() since
it will be made in platform-independent function EventHandler::handleMousePressEvent().

LayoutTests:

New test that simulates mouse clicking submit button twice (which didn't work), as well as using the keyboard twice (which did work).

  • fast/forms/resources/submit-to-blank-multiple-times-form-action.html: Added.
  • fast/forms/submit-to-blank-multiple-times-expected.txt: Added.
  • fast/forms/submit-to-blank-multiple-times.html: Added.
Location:
trunk
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r95224 r95226  
     12011-09-15  Jon Lee  <jonlee@apple.com>
     2
     3        Submitting a form with target=_blank works only once
     4        https://bugs.webkit.org/show_bug.cgi?id=28633
     5        <rdar://problem/7357787>
     6
     7        Reviewed by Andy Estes.
     8
     9        New test that simulates mouse clicking submit button twice (which didn't work), as well as using the keyboard twice (which did work).
     10
     11        * fast/forms/resources/submit-to-blank-multiple-times-form-action.html: Added.
     12        * fast/forms/submit-to-blank-multiple-times-expected.txt: Added.
     13        * fast/forms/submit-to-blank-multiple-times.html: Added.
     14
    1152011-09-15  David Levin  <levin@chromium.org>
    216
  • trunk/Source/WebCore/ChangeLog

    r95223 r95226  
     12011-09-15  Jon Lee  <jonlee@apple.com>
     2
     3        Submitting a form with target=_blank works only once
     4        https://bugs.webkit.org/show_bug.cgi?id=28633
     5        <rdar://problem/7357787>
     6
     7        Reviewed by Andy Estes.
     8
     9        Test: fast/forms/submit-to-blank-multiple-times.html
     10
     11        The call to reset the multiple form submission bool is pushed down from the mouseDown handler to
     12        handleMousePressEvent(), to include WK2 coverage, similar to keyEvent.
     13
     14        * page/EventHandler.cpp:
     15        (WebCore::EventHandler::handleMousePressEvent):
     16        (WebCore::EventHandler::keyEvent): clarified old FIXME comment. Both key events and mouse events
     17        may submit a form multiple times, but the call to reset the handler should probably be in another
     18        abstraction layer.
     19        * page/mac/EventHandlerMac.mm:
     20        (WebCore::EventHandler::mouseDown):
     21
    1222011-09-15  Peter Rybin  <peter.rybin@gmail.com>
    223
  • trunk/Source/WebCore/page/EventHandler.cpp

    r94797 r95226  
    13421342    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
    13431343
     1344    // FIXME (bug 68185): this call should be made at another abstraction layer
     1345    m_frame->loader()->resetMultipleFormSubmissionProtection();
     1346   
    13441347    cancelFakeMouseMoveEvent();
    13451348    m_mousePressed = true;
     
    25192522        view->resetDeferredRepaintDelay();
    25202523
    2521     // FIXME: what is this doing here, in keyboard event handler?
     2524    // FIXME (bug 68185): this call should be made at another abstraction layer
    25222525    m_frame->loader()->resetMultipleFormSubmissionProtection();
    25232526
  • trunk/Source/WebCore/page/mac/EventHandlerMac.mm

    r92068 r95226  
    479479    BEGIN_BLOCK_OBJC_EXCEPTIONS;
    480480   
    481     m_frame->loader()->resetMultipleFormSubmissionProtection();
    482 
    483481    m_mouseDownView = nil;
    484482   
  • trunk/Source/WebKit/chromium/ChangeLog

    r95216 r95226  
     12011-09-15  Jon Lee  <jonlee@apple.com>
     2
     3        Submitting a form with target=_blank works only once
     4        https://bugs.webkit.org/show_bug.cgi?id=28633
     5        <rdar://problem/7357787>
     6
     7        Reviewed by Andy Estes.
     8
     9        * src/WebViewImpl.cpp:
     10        (WebKit::WebViewImpl::mouseDown): Remove call to resetMultipleFormSubmissionProtection() since
     11        it will be made in platform-independent function EventHandler::handleMousePressEvent().
     12
    1132011-09-15  Eric Seidel  <eric@webkit.org>
    214
  • trunk/Source/WebKit/chromium/src/WebViewImpl.cpp

    r95152 r95226  
    476476    }
    477477
    478     mainFrameImpl()->frame()->loader()->resetMultipleFormSubmissionProtection();
    479 
    480478    mainFrameImpl()->frame()->eventHandler()->handleMousePressEvent(
    481479        PlatformMouseEventBuilder(mainFrameImpl()->frameView(), event));
Note: See TracChangeset for help on using the changeset viewer.