OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 3 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) | 4 * Copyright (C) 2012 Digia Plc. and/or its subsidiary(-ies) |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 #include "core/frame/LocalFrame.h" | 57 #include "core/frame/LocalFrame.h" |
58 #include "core/frame/Settings.h" | 58 #include "core/frame/Settings.h" |
59 #include "core/html/HTMLDialogElement.h" | 59 #include "core/html/HTMLDialogElement.h" |
60 #include "core/html/HTMLFrameElementBase.h" | 60 #include "core/html/HTMLFrameElementBase.h" |
61 #include "core/html/HTMLFrameSetElement.h" | 61 #include "core/html/HTMLFrameSetElement.h" |
62 #include "core/html/HTMLInputElement.h" | 62 #include "core/html/HTMLInputElement.h" |
63 #include "core/inspector/InspectorController.h" | 63 #include "core/inspector/InspectorController.h" |
64 #include "core/loader/FrameLoader.h" | 64 #include "core/loader/FrameLoader.h" |
65 #include "core/loader/FrameLoaderClient.h" | 65 #include "core/loader/FrameLoaderClient.h" |
66 #include "core/page/AutoscrollController.h" | 66 #include "core/page/AutoscrollController.h" |
67 #include "core/page/BackForwardClient.h" | |
68 #include "core/page/Chrome.h" | 67 #include "core/page/Chrome.h" |
69 #include "core/page/ChromeClient.h" | 68 #include "core/page/ChromeClient.h" |
70 #include "core/page/DragController.h" | 69 #include "core/page/DragController.h" |
71 #include "core/page/DragState.h" | 70 #include "core/page/DragState.h" |
72 #include "core/page/EditorClient.h" | 71 #include "core/page/EditorClient.h" |
73 #include "core/page/FocusController.h" | 72 #include "core/page/FocusController.h" |
74 #include "core/page/FrameTree.h" | 73 #include "core/page/FrameTree.h" |
75 #include "core/page/Page.h" | 74 #include "core/page/Page.h" |
76 #include "core/page/SpatialNavigation.h" | 75 #include "core/page/SpatialNavigation.h" |
77 #include "core/page/TouchAdjustment.h" | 76 #include "core/page/TouchAdjustment.h" |
(...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3373 | 3372 |
3374 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event) | 3373 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event) |
3375 { | 3374 { |
3376 ASSERT(event->type() == EventTypeNames::keydown); | 3375 ASSERT(event->type() == EventTypeNames::keydown); |
3377 | 3376 |
3378 if (event->ctrlKey() || event->metaKey() || event->altKey()) | 3377 if (event->ctrlKey() || event->metaKey() || event->altKey()) |
3379 return; | 3378 return; |
3380 | 3379 |
3381 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace()) | 3380 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace()) |
3382 return; | 3381 return; |
3383 | 3382 bool handledEvent = m_frame->loader().client()->navigateBackForward(event->s
hiftKey() ? 1 : -1); |
3384 Page* page = m_frame->page(); | |
3385 if (!page || !page->mainFrame()->isLocalFrame()) | |
3386 return; | |
3387 bool handledEvent = page->deprecatedLocalMainFrame()->loader().client()->nav
igateBackForward(event->shiftKey() ? 1 : -1); | |
3388 if (handledEvent) | 3383 if (handledEvent) |
3389 event->setDefaultHandled(); | 3384 event->setDefaultHandled(); |
3390 } | 3385 } |
3391 | 3386 |
3392 void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent*
event) | 3387 void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent*
event) |
3393 { | 3388 { |
3394 ASSERT(event->type() == EventTypeNames::keydown); | 3389 ASSERT(event->type() == EventTypeNames::keydown); |
3395 | 3390 |
3396 if (event->ctrlKey() || event->metaKey() || event->shiftKey()) | 3391 if (event->ctrlKey() || event->metaKey() || event->shiftKey()) |
3397 return; | 3392 return; |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3879 unsigned EventHandler::accessKeyModifiers() | 3874 unsigned EventHandler::accessKeyModifiers() |
3880 { | 3875 { |
3881 #if OS(MACOSX) | 3876 #if OS(MACOSX) |
3882 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3877 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3883 #else | 3878 #else |
3884 return PlatformEvent::AltKey; | 3879 return PlatformEvent::AltKey; |
3885 #endif | 3880 #endif |
3886 } | 3881 } |
3887 | 3882 |
3888 } // namespace blink | 3883 } // namespace blink |
OLD | NEW |