Changeset 83688 in webkit


Ignore:
Timestamp:
Apr 12, 2011, 7:27:44 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

2011-04-12 Anantanarayanan G Iyengar <ananta@chromium.org>

Reviewed by Alexey Proskuryakov.

The default backspace event handler should mark the event as handled if navigation succeeds.
https://bugs.webkit.org/show_bug.cgi?id=58379

We should mark the event as handled only if we were able to successfully navigate backwards or forwards.
These navigations can fail if there is now back/forward history. This can occur in cases like ChromeFrame
where history is managed by an external browser like IE.

No new tests added as this scenario can occur when the history view is split across two browsers (WebKit and IE)
It is non trivial to simulate this environment.

  • page/EventHandler.cpp: (WebCore::EventHandler::defaultBackspaceEventHandler):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r83684 r83688  
     12011-04-12  Anantanarayanan G Iyengar  <ananta@chromium.org>
     2
     3        Reviewed by Alexey Proskuryakov.
     4
     5        The default backspace event handler should mark the event as handled if navigation succeeds.
     6        https://bugs.webkit.org/show_bug.cgi?id=58379
     7
     8        We should mark the event as handled only if we were able to successfully navigate backwards or forwards.
     9        These navigations can fail if there is now back/forward history. This can occur in cases like ChromeFrame
     10        where history is managed by an external browser like IE.
     11
     12        No new tests added as this scenario can occur when the history view is split across two browsers (WebKit and IE)
     13        It is non trivial to simulate this environment.
     14
     15        * page/EventHandler.cpp:
     16        (WebCore::EventHandler::defaultBackspaceEventHandler):
     17
    1182011-04-12  Ryosuke Niwa  <rniwa@webkit.org>
    219
  • trunk/Source/WebCore/page/EventHandler.cpp

    r83522 r83688  
    28902890        return;
    28912891
     2892    bool handledEvent = false;
     2893
    28922894    if (event->shiftKey())
    2893         page->goForward();
     2895        handledEvent = page->goForward();
    28942896    else
    2895         page->goBack();
    2896 
    2897     event->setDefaultHandled();
     2897        handledEvent = page->goBack();
     2898
     2899    if (handledEvent)
     2900        event->setDefaultHandled();
    28982901}
    28992902
Note: See TracChangeset for help on using the changeset viewer.