Changeset 19207 in webkit


Ignore:
Timestamp:
Jan 28, 2007 7:22:10 PM (17 years ago)
Author:
aroben
Message:

Reviewed by Adele.

Fix http://bugs.webkit.org/show_bug.cgi?id=12453
REGRESSION(r19197): Tabbing into web page requires two key presses

All layout tests pass.

  • page/FocusController.cpp: (WebCore::FocusController::advanceFocus): If there's no focused frame, actually go ahead and find a focusable node instead of just focusing the main frame and quitting. This behavior was a holdover from a previous desired tabbing behavior with respect to frames.
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r19206 r19207  
     12007-01-28  Adam Roben  <aroben@apple.com>
     2
     3        Reviewed by Adele.
     4
     5        Fix http://bugs.webkit.org/show_bug.cgi?id=12453
     6        REGRESSION(r19197): Tabbing into web page requires two key presses
     7
     8        All layout tests pass.
     9
     10        * page/FocusController.cpp:
     11        (WebCore::FocusController::advanceFocus): If there's no focused frame,
     12        actually go ahead and find a focusable node instead of just focusing
     13        the main frame and quitting. This behavior was a holdover from a
     14        previous desired tabbing behavior with respect to frames.
     15
    1162007-01-28  David Kilzer  <ddkilzer@webkit.org>
    217
  • trunk/WebCore/page/FocusController.cpp

    r19197 r19207  
    114114    ASSERT(event);
    115115   
    116     if (!focusedFrame()) {
    117         setFocusedFrame(m_page->mainFrame());
    118         if (Document* document = focusedFrame()->document())
    119             document->setFocusedNode(0);
    120 
    121         return true;
    122     }
    123 
    124     Frame* focusedFrame = this->focusedFrame();
    125     Document* document = focusedFrame->document();
     116    Frame* frame = focusedOrMainFrame();
     117    ASSERT(frame);
     118    Document* document = frame->document();
    126119    if (!document)
    127120        return false;
     
    134127           
    135128    // If there's no focusable node to advance to, move up the frame tree until we find one.
    136     Frame* frame = focusedFrame;
    137129    while (!node && frame) {
    138130        Frame* parentFrame = frame->tree()->parent();
Note: See TracChangeset for help on using the changeset viewer.