Chromium Code Reviews| Index: components/autofill/content/renderer/page_click_tracker.cc |
| diff --git a/components/autofill/content/renderer/page_click_tracker.cc b/components/autofill/content/renderer/page_click_tracker.cc |
| index 56fbb5345065030cd9750dee58128d52958f27e3..b4a2fe3a926bfd11e0da3d1be727f54e6696cd91 100644 |
| --- a/components/autofill/content/renderer/page_click_tracker.cc |
| +++ b/components/autofill/content/renderer/page_click_tracker.cc |
| @@ -18,6 +18,7 @@ |
| #include "third_party/WebKit/public/web/WebInputEvent.h" |
| #include "third_party/WebKit/public/web/WebLocalFrame.h" |
| #include "third_party/WebKit/public/web/WebTextAreaElement.h" |
| +#include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
| #include "third_party/WebKit/public/web/WebView.h" |
| using blink::WebElement; |
| @@ -29,6 +30,7 @@ using blink::WebNode; |
| using blink::WebPoint; |
| using blink::WebSize; |
| using blink::WebTextAreaElement; |
| +using blink::WebUserGestureIndicator; |
| namespace { |
| @@ -77,9 +79,15 @@ PageClickTracker::~PageClickTracker() { |
| void PageClickTracker::OnMouseDown(const WebNode& mouse_down_node) { |
| focused_node_was_last_clicked_ = !mouse_down_node.isNull() && |
| mouse_down_node.focused(); |
| + |
| + if (IsKeyboardAccessoryEnabled()) |
| + DoFocusChangeComplete(); |
| } |
| void PageClickTracker::FocusedNodeChanged(const WebNode& node) { |
| + if (!WebUserGestureIndicator::isProcessingUserGesture()) |
| + return; |
|
Evan Stade
2015/09/08 18:13:01
I don't think it's right to early return before yo
please use gerrit instead
2015/09/08 21:18:08
Moved the early return before changing was_focused
|
| + |
| was_focused_before_now_ = false; |
| if (IsKeyboardAccessoryEnabled()) { |