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

Unified Diff: components/autofill/content/renderer/password_autofill_agent.cc

Issue 1977633003: Remove RenderFrameImpl::GetFocusedElement. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes the right click + blur + copy case. Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/autofill/content/renderer/page_click_tracker.cc ('k') | content/public/renderer/render_frame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/renderer/password_autofill_agent.cc
diff --git a/components/autofill/content/renderer/password_autofill_agent.cc b/components/autofill/content/renderer/password_autofill_agent.cc
index 8b18ee962940f9bb53417d6d17151097d113732a..fcbc6094fd5f004c9c89bbf908cef7cde68c2965 100644
--- a/components/autofill/content/renderer/password_autofill_agent.cc
+++ b/components/autofill/content/renderer/password_autofill_agent.cc
@@ -1429,7 +1429,8 @@ void PasswordAutofillAgent::OnAutofillUsernameAndPasswordDataReceived(
void PasswordAutofillAgent::OnFindFocusedPasswordForm() {
std::unique_ptr<PasswordForm> password_form;
- blink::WebElement element = render_frame()->GetFocusedElement();
+ blink::WebElement element =
+ render_frame()->GetWebFrame()->document().focusedElement();
if (!element.isNull() && element.hasHTMLTagName("input")) {
blink::WebInputElement input = element.to<blink::WebInputElement>();
if (input.isPasswordField() && !input.form().isNull()) {
« no previous file with comments | « components/autofill/content/renderer/page_click_tracker.cc ('k') | content/public/renderer/render_frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698