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

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

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

Powered by Google App Engine
This is Rietveld 408576698