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

Side by Side Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.cpp

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Sent For Review Created 3 years, 5 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "KeyboardEventManager.h" 5 #include "KeyboardEventManager.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "core/dom/Element.h" 10 #include "core/dom/Element.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 // To be meaningful enough to indicate user intention, a keyboard event needs 193 // To be meaningful enough to indicate user intention, a keyboard event needs
194 // - not to be a modifier event 194 // - not to be a modifier event
195 // - not to be a browser shortcut 195 // - not to be a browser shortcut
196 // https://crbug.com/709765 196 // https://crbug.com/709765
197 bool is_modifier = 197 bool is_modifier =
198 Platform::Current()->IsDomKeyForModifier(initial_key_event.dom_key); 198 Platform::Current()->IsDomKeyForModifier(initial_key_event.dom_key);
199 bool is_browser_shortcut = initial_key_event.is_browser_shortcut; 199 bool is_browser_shortcut = initial_key_event.is_browser_shortcut;
200 200
201 std::unique_ptr<UserGestureIndicator> gesture_indicator; 201 std::unique_ptr<UserGestureIndicator> gesture_indicator;
202 if (!is_modifier && !is_browser_shortcut) { 202 if (!is_modifier &&
203 (!is_browser_shortcut || initial_key_event.text[0] == '\b')) {
vasilii 2017/07/21 12:48:21 Can you clarify this?
kolos1 2017/07/24 15:33:31 Please ignore changes in this file. It is a quick
203 gesture_indicator.reset(new UserGestureIndicator( 204 gesture_indicator.reset(new UserGestureIndicator(
204 UserGestureToken::Create(frame_->GetDocument()))); 205 UserGestureToken::Create(frame_->GetDocument())));
205 } 206 }
206 207
207 // In IE, access keys are special, they are handled after default keydown 208 // In IE, access keys are special, they are handled after default keydown
208 // processing, but cannot be canceled - this is hard to match. On Mac OS X, 209 // processing, but cannot be canceled - this is hard to match. On Mac OS X,
209 // we process them before dispatching keydown, as the default keydown handler 210 // we process them before dispatching keydown, as the default keydown handler
210 // implements Emacs key bindings, which may conflict with access keys. Then we 211 // implements Emacs key bindings, which may conflict with access keys. Then we
211 // dispatch keydown, but suppress its default handling. 212 // dispatch keydown, but suppress its default handling.
212 // On Windows, WebKit explicitly calls handleAccessKey() instead of 213 // On Windows, WebKit explicitly calls handleAccessKey() instead of
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 if (current_modifiers & ::cmdKey) 466 if (current_modifiers & ::cmdKey)
466 modifiers |= WebInputEvent::kMetaKey; 467 modifiers |= WebInputEvent::kMetaKey;
467 #else 468 #else
468 // TODO(crbug.com/538289): Implement on other platforms. 469 // TODO(crbug.com/538289): Implement on other platforms.
469 return static_cast<WebInputEvent::Modifiers>(0); 470 return static_cast<WebInputEvent::Modifiers>(0);
470 #endif 471 #endif
471 return static_cast<WebInputEvent::Modifiers>(modifiers); 472 return static_cast<WebInputEvent::Modifiers>(modifiers);
472 } 473 }
473 474
474 } // namespace blink 475 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698