Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2785853002: Selection Action mode triggered like a context menu (Closed)
Patch Set: fix rebase problems Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 #include "core/frame/PageScaleConstraintsSet.h" 60 #include "core/frame/PageScaleConstraintsSet.h"
61 #include "core/frame/RemoteFrame.h" 61 #include "core/frame/RemoteFrame.h"
62 #include "core/frame/ResizeViewportAnchor.h" 62 #include "core/frame/ResizeViewportAnchor.h"
63 #include "core/frame/RotationViewportAnchor.h" 63 #include "core/frame/RotationViewportAnchor.h"
64 #include "core/frame/Settings.h" 64 #include "core/frame/Settings.h"
65 #include "core/frame/UseCounter.h" 65 #include "core/frame/UseCounter.h"
66 #include "core/frame/VisualViewport.h" 66 #include "core/frame/VisualViewport.h"
67 #include "core/html/HTMLMediaElement.h" 67 #include "core/html/HTMLMediaElement.h"
68 #include "core/html/HTMLPlugInElement.h" 68 #include "core/html/HTMLPlugInElement.h"
69 #include "core/html/HTMLTextAreaElement.h" 69 #include "core/html/HTMLTextAreaElement.h"
70 #include "core/input/ContextMenuAllowedScope.h"
70 #include "core/input/EventHandler.h" 71 #include "core/input/EventHandler.h"
71 #include "core/input/TouchActionUtil.h" 72 #include "core/input/TouchActionUtil.h"
72 #include "core/layout/LayoutPart.h" 73 #include "core/layout/LayoutPart.h"
73 #include "core/layout/TextAutosizer.h" 74 #include "core/layout/TextAutosizer.h"
74 #include "core/layout/api/LayoutViewItem.h" 75 #include "core/layout/api/LayoutViewItem.h"
75 #include "core/layout/compositing/PaintLayerCompositor.h" 76 #include "core/layout/compositing/PaintLayerCompositor.h"
76 #include "core/loader/FrameLoadRequest.h" 77 #include "core/loader/FrameLoadRequest.h"
77 #include "core/loader/FrameLoader.h" 78 #include "core/loader/FrameLoader.h"
78 #include "core/loader/FrameLoaderStateMachine.h" 79 #include "core/loader/FrameLoaderStateMachine.h"
79 #include "core/page/ContextMenuController.h" 80 #include "core/page/ContextMenuController.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 #include "public/web/WebPlugin.h" 156 #include "public/web/WebPlugin.h"
156 #include "public/web/WebPluginAction.h" 157 #include "public/web/WebPluginAction.h"
157 #include "public/web/WebRange.h" 158 #include "public/web/WebRange.h"
158 #include "public/web/WebScopedUserGesture.h" 159 #include "public/web/WebScopedUserGesture.h"
159 #include "public/web/WebSelection.h" 160 #include "public/web/WebSelection.h"
160 #include "public/web/WebViewClient.h" 161 #include "public/web/WebViewClient.h"
161 #include "public/web/WebWindowFeatures.h" 162 #include "public/web/WebWindowFeatures.h"
162 #include "web/AnimationWorkletProxyClientImpl.h" 163 #include "web/AnimationWorkletProxyClientImpl.h"
163 #include "web/CompositorMutatorImpl.h" 164 #include "web/CompositorMutatorImpl.h"
164 #include "web/CompositorWorkerProxyClientImpl.h" 165 #include "web/CompositorWorkerProxyClientImpl.h"
165 #include "web/ContextMenuAllowedScope.h"
166 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h" 166 #include "web/DedicatedWorkerMessagingProxyProviderImpl.h"
167 #include "web/DevToolsEmulator.h" 167 #include "web/DevToolsEmulator.h"
168 #include "web/FullscreenController.h" 168 #include "web/FullscreenController.h"
169 #include "web/LinkHighlightImpl.h" 169 #include "web/LinkHighlightImpl.h"
170 #include "web/PageOverlay.h" 170 #include "web/PageOverlay.h"
171 #include "web/PrerendererClientImpl.h" 171 #include "web/PrerendererClientImpl.h"
172 #include "web/StorageQuotaClientImpl.h" 172 #include "web/StorageQuotaClientImpl.h"
173 #include "web/WebDevToolsAgentImpl.h" 173 #include "web/WebDevToolsAgentImpl.h"
174 #include "web/WebInputMethodControllerImpl.h" 174 #include "web/WebInputMethodControllerImpl.h"
175 #include "web/WebLocalFrameImpl.h" 175 #include "web/WebLocalFrameImpl.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 EnableTapHighlights(highlight_nodes); 834 EnableTapHighlights(highlight_nodes);
835 for (size_t i = 0; i < link_highlights_.size(); ++i) 835 for (size_t i = 0; i < link_highlights_.size(); ++i)
836 link_highlights_[i]->StartHighlightAnimationIfNeeded(); 836 link_highlights_[i]->StartHighlightAnimationIfNeeded();
837 event_result = WebInputEventResult::kHandledSystem; 837 event_result = WebInputEventResult::kHandledSystem;
838 event_cancelled = true; 838 event_cancelled = true;
839 break; 839 break;
840 } 840 }
841 } 841 }
842 } 842 }
843 843
844 event_result = 844 {
845 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureEvent( 845 ContextMenuAllowedScope scope;
846 targeted_event); 846 event_result =
847 MainFrameImpl()->GetFrame()->GetEventHandler().HandleGestureEvent(
848 targeted_event);
849 }
850
847 if (page_popup_ && last_hidden_page_popup_ && 851 if (page_popup_ && last_hidden_page_popup_ &&
848 page_popup_->HasSamePopupClient(last_hidden_page_popup_.Get())) { 852 page_popup_->HasSamePopupClient(last_hidden_page_popup_.Get())) {
849 // The tap triggered a page popup that is the same as the one we just 853 // The tap triggered a page popup that is the same as the one we just
850 // closed. It needs to be closed. 854 // closed. It needs to be closed.
851 CancelPagePopup(); 855 CancelPagePopup();
852 } 856 }
853 last_hidden_page_popup_ = nullptr; 857 last_hidden_page_popup_ = nullptr;
854 break; 858 break;
855 } 859 }
856 case WebInputEvent::kGestureTwoFingerTap: 860 case WebInputEvent::kGestureTwoFingerTap:
(...skipping 3308 matching lines...) Expand 10 before | Expand all | Expand 10 after
4165 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4169 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4166 return nullptr; 4170 return nullptr;
4167 return focused_frame; 4171 return focused_frame;
4168 } 4172 }
4169 4173
4170 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4174 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4171 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4175 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4172 } 4176 }
4173 4177
4174 } // namespace blink 4178 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698