Changeset 75994 in webkit


Ignore:
Timestamp:
Jan 17, 2011 7:49:08 PM (13 years ago)
Author:
mjs@apple.com
Message:

2011-01-17 Maciej Stachowiak <mjs@apple.com>

Reviewed by Dan Bernstein.

Some WebKit2 layout tests crash due to focus being on a frame in the page cache
https://bugs.webkit.org/show_bug.cgi?id=52607

No new tests. Existing tests crash in WebKit2 without this fix.


I suspect there are other consequences besides the WebKit2 crash, but I
was unable to identify any for certain.

  • history/CachedFrame.cpp: (WebCore::CachedFrame::CachedFrame): If a frame still has focus when its page goes in the page cache, reset focus to the main frame.
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r75988 r75994  
     12011-01-17  Maciej Stachowiak  <mjs@apple.com>
     2
     3        Reviewed by Dan Bernstein.
     4
     5        Some WebKit2 layout tests crash due to focus being on a frame in the page cache
     6        https://bugs.webkit.org/show_bug.cgi?id=52607
     7
     8        No new tests. Existing tests crash in WebKit2 without this fix.
     9       
     10        I suspect there are other consequences besides the WebKit2 crash, but I
     11        was unable to identify any for certain.
     12
     13        * history/CachedFrame.cpp:
     14        (WebCore::CachedFrame::CachedFrame): If a frame still has focus when its page
     15        goes in the page cache, reset focus to the main frame.
     16
    1172011-01-17  Adam Roben  <aroben@apple.com>
    218
  • trunk/Source/WebCore/history/CachedFrame.cpp

    r74571 r75994  
    3131#include "ExceptionCode.h"
    3232#include "EventNames.h"
     33#include "FocusController.h"
    3334#include "Frame.h"
    3435#include "FrameLoaderClient.h"
     
    132133    ASSERT(m_view);
    133134
     135    if (frame->page()->focusController()->focusedFrame() == frame)
     136        frame->page()->focusController()->setFocusedFrame(frame->page()->mainFrame());
     137
    134138    // Active DOM objects must be suspended before we cached the frame script data
    135139    m_document->suspendActiveDOMObjects(ActiveDOMObject::DocumentWillBecomeInactive);
Note: See TracChangeset for help on using the changeset viewer.