| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Igalia S.L | 3 * Copyright (C) 2010 Igalia S.L |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 25 */ | 25 */ |
| 26 | 26 |
| 27 #include "config.h" | 27 #include "config.h" |
| 28 #include "core/page/ContextMenuController.h" | 28 #include "core/page/ContextMenuController.h" |
| 29 | 29 |
| 30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
| 31 #include "core/dom/Event.h" | 31 #include "core/dom/Event.h" |
| 32 #include "core/dom/EventNames.h" | |
| 33 #include "core/dom/MouseEvent.h" | 32 #include "core/dom/MouseEvent.h" |
| 34 #include "core/dom/Node.h" | 33 #include "core/dom/Node.h" |
| 35 #include "core/editing/FrameSelection.h" | |
| 36 #include "core/page/ContextMenuClient.h" | 34 #include "core/page/ContextMenuClient.h" |
| 37 #include "core/page/ContextMenuProvider.h" | 35 #include "core/page/ContextMenuProvider.h" |
| 38 #include "core/page/EventHandler.h" | 36 #include "core/page/EventHandler.h" |
| 39 #include "core/page/Frame.h" | 37 #include "core/page/Frame.h" |
| 40 #include "core/page/Page.h" | |
| 41 #include "core/platform/ContextMenu.h" | 38 #include "core/platform/ContextMenu.h" |
| 42 #include "core/platform/ContextMenuItem.h" | 39 #include "core/platform/ContextMenuItem.h" |
| 43 #include "core/rendering/HitTestResult.h" | 40 #include "core/rendering/HitTestResult.h" |
| 44 | 41 |
| 45 namespace WebCore { | 42 namespace WebCore { |
| 46 | 43 |
| 47 ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* clie
nt) | 44 ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* clie
nt) |
| 48 : m_page(page) | 45 : m_page(page) |
| 49 , m_client(client) | 46 , m_client(client) |
| 50 { | 47 { |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 ASSERT(item->type() == ActionType || item->type() == CheckableActionType); | 121 ASSERT(item->type() == ActionType || item->type() == CheckableActionType); |
| 125 | 122 |
| 126 if (item->action() < ContextMenuItemBaseCustomTag || item->action() > Contex
tMenuItemLastCustomTag) | 123 if (item->action() < ContextMenuItemBaseCustomTag || item->action() > Contex
tMenuItemLastCustomTag) |
| 127 return; | 124 return; |
| 128 | 125 |
| 129 ASSERT(m_menuProvider); | 126 ASSERT(m_menuProvider); |
| 130 m_menuProvider->contextMenuItemSelected(item); | 127 m_menuProvider->contextMenuItemSelected(item); |
| 131 } | 128 } |
| 132 | 129 |
| 133 } // namespace WebCore | 130 } // namespace WebCore |
| OLD | NEW |