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

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

Issue 2864833002: Tapping handle shouldn't select misspelled word (Closed)
Patch Set: fixed bokan's nits Created 3 years, 6 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 #include "platform/wtf/AutoReset.h" 127 #include "platform/wtf/AutoReset.h"
128 #include "platform/wtf/CurrentTime.h" 128 #include "platform/wtf/CurrentTime.h"
129 #include "platform/wtf/PtrUtil.h" 129 #include "platform/wtf/PtrUtil.h"
130 #include "platform/wtf/RefPtr.h" 130 #include "platform/wtf/RefPtr.h"
131 #include "public/platform/Platform.h" 131 #include "public/platform/Platform.h"
132 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h" 132 #include "public/platform/WebCompositeAndReadbackAsyncCallback.h"
133 #include "public/platform/WebCompositorSupport.h" 133 #include "public/platform/WebCompositorSupport.h"
134 #include "public/platform/WebFloatPoint.h" 134 #include "public/platform/WebFloatPoint.h"
135 #include "public/platform/WebGestureCurve.h" 135 #include "public/platform/WebGestureCurve.h"
136 #include "public/platform/WebImage.h" 136 #include "public/platform/WebImage.h"
137 #include "public/platform/WebInputEvent.h"
137 #include "public/platform/WebLayerTreeView.h" 138 #include "public/platform/WebLayerTreeView.h"
138 #include "public/platform/WebTextInputInfo.h" 139 #include "public/platform/WebTextInputInfo.h"
139 #include "public/platform/WebURLRequest.h" 140 #include "public/platform/WebURLRequest.h"
140 #include "public/platform/WebVector.h" 141 #include "public/platform/WebVector.h"
141 #include "public/web/WebAXObject.h" 142 #include "public/web/WebAXObject.h"
142 #include "public/web/WebActiveWheelFlingParameters.h" 143 #include "public/web/WebActiveWheelFlingParameters.h"
143 #include "public/web/WebAutofillClient.h" 144 #include "public/web/WebAutofillClient.h"
144 #include "public/web/WebConsoleMessage.h" 145 #include "public/web/WebConsoleMessage.h"
145 #include "public/web/WebElement.h" 146 #include "public/web/WebElement.h"
146 #include "public/web/WebFrame.h" 147 #include "public/web/WebFrame.h"
147 #include "public/web/WebFrameClient.h" 148 #include "public/web/WebFrameClient.h"
148 #include "public/web/WebFrameWidget.h" 149 #include "public/web/WebFrameWidget.h"
149 #include "public/web/WebHitTestResult.h" 150 #include "public/web/WebHitTestResult.h"
150 #include "public/web/WebInputElement.h" 151 #include "public/web/WebInputElement.h"
151 #include "public/web/WebMeaningfulLayout.h" 152 #include "public/web/WebMeaningfulLayout.h"
152 #include "public/web/WebMediaPlayerAction.h" 153 #include "public/web/WebMediaPlayerAction.h"
154 #include "public/web/WebMenuSourceType.h"
153 #include "public/web/WebNode.h" 155 #include "public/web/WebNode.h"
154 #include "public/web/WebPlugin.h" 156 #include "public/web/WebPlugin.h"
155 #include "public/web/WebPluginAction.h" 157 #include "public/web/WebPluginAction.h"
156 #include "public/web/WebRange.h" 158 #include "public/web/WebRange.h"
157 #include "public/web/WebScopedUserGesture.h" 159 #include "public/web/WebScopedUserGesture.h"
158 #include "public/web/WebSelection.h" 160 #include "public/web/WebSelection.h"
159 #include "public/web/WebViewClient.h" 161 #include "public/web/WebViewClient.h"
160 #include "public/web/WebWindowFeatures.h" 162 #include "public/web/WebWindowFeatures.h"
161 #include "web/AnimationWorkletProxyClientImpl.h" 163 #include "web/AnimationWorkletProxyClientImpl.h"
162 #include "web/CompositorMutatorImpl.h" 164 #include "web/CompositorMutatorImpl.h"
(...skipping 3336 matching lines...) Expand 10 before | Expand all | Expand 10 after
3499 ContextMenu* menu = page_->GetContextMenuController().GetContextMenu(); 3501 ContextMenu* menu = page_->GetContextMenuController().GetContextMenu();
3500 if (!menu) 3502 if (!menu)
3501 return; 3503 return;
3502 const ContextMenuItem* item = menu->ItemWithAction( 3504 const ContextMenuItem* item = menu->ItemWithAction(
3503 static_cast<ContextMenuAction>(kContextMenuItemBaseCustomTag + action)); 3505 static_cast<ContextMenuAction>(kContextMenuItemBaseCustomTag + action));
3504 if (item) 3506 if (item)
3505 page_->GetContextMenuController().ContextMenuItemSelected(item); 3507 page_->GetContextMenuController().ContextMenuItemSelected(item);
3506 page_->GetContextMenuController().ClearContextMenu(); 3508 page_->GetContextMenuController().ClearContextMenu();
3507 } 3509 }
3508 3510
3509 void WebViewImpl::ShowContextMenu() { 3511 void WebViewImpl::ShowContextMenu(WebMenuSourceType source_type) {
3510 if (!GetPage()) 3512 if (!GetPage())
3511 return; 3513 return;
3512 3514
3513 GetPage()->GetContextMenuController().ClearContextMenu(); 3515 GetPage()->GetContextMenuController().ClearContextMenu();
3514 { 3516 {
3515 ContextMenuAllowedScope scope; 3517 ContextMenuAllowedScope scope;
3516 if (LocalFrame* focused_frame = 3518 if (LocalFrame* focused_frame = ToLocalFrame(
3517 ToLocalFrame(GetPage()->GetFocusController().FocusedOrMainFrame())) 3519 GetPage()->GetFocusController().FocusedOrMainFrame())) {
3518 focused_frame->GetEventHandler().SendContextMenuEventForKey(nullptr); 3520 focused_frame->GetEventHandler().SendContextMenuEventForKey(nullptr,
3521 source_type);
3522 }
3519 } 3523 }
3520 } 3524 }
3521 3525
3522 void WebViewImpl::DidCloseContextMenu() { 3526 void WebViewImpl::DidCloseContextMenu() {
3523 LocalFrame* frame = page_->GetFocusController().FocusedFrame(); 3527 LocalFrame* frame = page_->GetFocusController().FocusedFrame();
3524 if (frame) 3528 if (frame)
3525 frame->Selection().SetCaretBlinkingSuspended(false); 3529 frame->Selection().SetCaretBlinkingSuspended(false);
3526 } 3530 }
3527 3531
3528 void WebViewImpl::HidePopups() { 3532 void WebViewImpl::HidePopups() {
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
4162 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4166 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4163 return nullptr; 4167 return nullptr;
4164 return focused_frame; 4168 return focused_frame;
4165 } 4169 }
4166 4170
4167 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4171 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4168 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4172 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4169 } 4173 }
4170 4174
4171 } // namespace blink 4175 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698