Changeset 55205 in webkit


Ignore:
Timestamp:
Feb 24, 2010 3:17:52 PM (14 years ago)
Author:
jamesr@google.com
Message:

2010-02-24 James Robinson <jamesr@chromium.org>

Reviewed by Dmitry Titov.

Do not fire focus events while a modal dialog is up.
https://bugs.webkit.org/show_bug.cgi?id=33962

Modifies the FocusController to check the frame's page's defersLoading() flag before firing blur/focus events.
This flag is set while a modal dialog (like a window.alert or window.confirm) is up. Firing the events causes
assertion failures, since when the dialog is dismissed the PageGroupLoadDeferrer assumes that no script has run.

Manual tests only as DumpRenderTree does not support modal dialogs

  • manual-tests/modal-dialog-blur-selfclose.html: Added.
  • manual-tests/modal-dialog-blur.html: Added.
  • page/FocusController.cpp: (WebCore::dispatchEventsOnWindowAndFocusedNode):
Location:
trunk/WebCore
Files:
2 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55203 r55205  
     12010-02-24  James Robinson  <jamesr@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Do not fire focus events while a modal dialog is up.
     6        https://bugs.webkit.org/show_bug.cgi?id=33962
     7
     8        Modifies the FocusController to check the frame's page's defersLoading() flag before firing blur/focus events.
     9        This flag is set while a modal dialog (like a window.alert or window.confirm) is up.  Firing the events causes
     10        assertion failures, since when the dialog is dismissed the PageGroupLoadDeferrer assumes that no script has run.
     11
     12        Manual tests only as DumpRenderTree does not support modal dialogs
     13
     14        * manual-tests/modal-dialog-blur-selfclose.html: Added.
     15        * manual-tests/modal-dialog-blur.html: Added.
     16        * page/FocusController.cpp:
     17        (WebCore::dispatchEventsOnWindowAndFocusedNode):
     18
    1192010-02-24  Dan Bernstein  <mitz@apple.com>
    220
  • trunk/WebCore/page/FocusController.cpp

    r54082 r55205  
    6262    // If we have a focused node we should dispatch focus on it after we focus the window.
    6363    // https://bugs.webkit.org/show_bug.cgi?id=27105
     64 
     65    // Do not fire events while modal dialogs are up.  See https://bugs.webkit.org/show_bug.cgi?id=33962
     66    if (document->page()->defersLoading())
     67        return;
    6468    if (!focused && document->focusedNode())
    6569        document->focusedNode()->dispatchBlurEvent();
Note: See TracChangeset for help on using the changeset viewer.