Skip to content
Permalink
Browse files
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):

Canonical link: https://commits.webkit.org/73445@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
webkit-commit-queue committed Apr 13, 2011
1 parent e0dff78 commit f8973e5b3b94f0e474ea30d6b2b261ba0718a67e
Showing 2 changed files with 23 additions and 3 deletions.
@@ -1,3 +1,20 @@
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):

2011-04-12 Ryosuke Niwa <rniwa@webkit.org>

Reviewed by Eric Seidel.
@@ -2889,12 +2889,15 @@ void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event)
if (!page)
return;

bool handledEvent = false;

if (event->shiftKey())
page->goForward();
handledEvent = page->goForward();
else
page->goBack();
handledEvent = page->goBack();

event->setDefaultHandled();
if (handledEvent)
event->setDefaultHandled();
}


0 comments on commit f8973e5

Please sign in to comment.