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 3301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3379 | 3378 |
3380 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event) | 3379 void EventHandler::defaultBackspaceEventHandler(KeyboardEvent* event) |
3381 { | 3380 { |
3382 ASSERT(event->type() == EventTypeNames::keydown); | 3381 ASSERT(event->type() == EventTypeNames::keydown); |
3383 | 3382 |
3384 if (event->ctrlKey() || event->metaKey() || event->altKey()) | 3383 if (event->ctrlKey() || event->metaKey() || event->altKey()) |
3385 return; | 3384 return; |
3386 | 3385 |
3387 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace()) | 3386 if (!m_frame->editor().behavior().shouldNavigateBackOnBackspace()) |
3388 return; | 3387 return; |
3389 | 3388 bool handledEvent = m_frame->loader().client()->navigateBackForward(event->s
hiftKey() ? 1 : -1); |
3390 Page* page = m_frame->page(); | |
3391 if (!page || !page->mainFrame()->isLocalFrame()) | |
3392 return; | |
3393 bool handledEvent = page->deprecatedLocalMainFrame()->loader().client()->nav
igateBackForward(event->shiftKey() ? 1 : -1); | |
3394 if (handledEvent) | 3389 if (handledEvent) |
3395 event->setDefaultHandled(); | 3390 event->setDefaultHandled(); |
3396 } | 3391 } |
3397 | 3392 |
3398 void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent*
event) | 3393 void EventHandler::defaultArrowEventHandler(FocusType focusType, KeyboardEvent*
event) |
3399 { | 3394 { |
3400 ASSERT(event->type() == EventTypeNames::keydown); | 3395 ASSERT(event->type() == EventTypeNames::keydown); |
3401 | 3396 |
3402 if (event->ctrlKey() || event->metaKey() || event->shiftKey()) | 3397 if (event->ctrlKey() || event->metaKey() || event->shiftKey()) |
3403 return; | 3398 return; |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3885 unsigned EventHandler::accessKeyModifiers() | 3880 unsigned EventHandler::accessKeyModifiers() |
3886 { | 3881 { |
3887 #if OS(MACOSX) | 3882 #if OS(MACOSX) |
3888 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; | 3883 return PlatformEvent::CtrlKey | PlatformEvent::AltKey; |
3889 #else | 3884 #else |
3890 return PlatformEvent::AltKey; | 3885 return PlatformEvent::AltKey; |
3891 #endif | 3886 #endif |
3892 } | 3887 } |
3893 | 3888 |
3894 } // namespace blink | 3889 } // namespace blink |
OLD | NEW |