New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 686129 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

Autofill flyouts in wrong position with OOPIF

Project Member Reported by elawrence@chromium.org, Jan 27 2017

Issue description

Chrome Version: 58.0.2994.0
OS: Windows 10

What steps will reproduce the problem?
(1) Load an extension's page with a subframe that points at a HTTP page
(2) Trigger the Form Not Secure experience

Observe: Login Not Secure appears in the wrong position. Its location is placed relative to root document's viewport, instead of correctly offset against the viewport of subframe.
 
IncorrectPositioning.png
20.1 KB View Download
Comments on the last viewport issue: https://bugs.chromium.org/p/chromium/issues/detail?id=678713#c8 may be helpful.

Comment 2 by est...@chromium.org, Jan 27 2017

Is this FNS-specific or autofill in general?
This appears to apply to "Autofill" in general (although not autocomplete?)
AutoFillInGeneral.png
9.5 KB View Download
NotAutoComplete.png
6.7 KB View Download

Comment 4 by est...@chromium.org, Jan 27 2017

Cc: ma...@chromium.org
Components: UI>Browser>Autofill
Labels: M-58 OS-Windows
Status: Available (was: Untriaged)
Components: Internals>Sandbox>SiteIsolation
Summary: Autofill flyouts in wrong position with OOPIF (was: Form Not Secure warning appears at wrong position when iframe appears in an extension page)
I believe the root cause of this issue is the use of Out-of-Process IFRAMEs. I have them enabled (chrome://flags/#enable-site-per-process) and all of the flyouts on http://pleasantlimo.com/reservation/ are positioned wrongly. That page has a cross-origin subframe which makes up the body of the page.

It /looks/ like a coordinate translation issue where we're positioning the flyouts relative to the coordinate-origin of the outer-viewport but calculating their position relative to the coordinate-origin of the iframe's 0,0.
wrongagain.png
15.4 KB View Download
misplaced.png
30.7 KB View Download

Comment 6 by nasko@chromium.org, Mar 15 2017

Cc: kenrb@chromium.org creis@chromium.org nasko@chromium.org
It is very likely due to Isolate Extensions and it looks like missing coordinate translation to account for the iframe location, since in that mode the iframe will be in a separate process.
It can be confirmed by passing --force-fieldtrials=SiteIsolationExtensions/Control command line to Chrome and observing regular behavior.

Comment 7 by creis@chromium.org, Mar 15 2017

Cc: ekaramad@chromium.org wjmaclean@chromium.org est...@chromium.org lfg@chromium.org
Agreed, given comment 5.  That means it affects web iframes in extensions on M56+.  The bug doesn't repro outside OOPIFs, and it does using the following steps from comment 5:

1) Start Chrome with --site-per-process.
2) Enable "Show in-form warnings for sensitive fields when the top-level page is not HTTPS" on about:flags and relaunch if needed.  (This was not on by default for me.)
3) Visit http://pleasantlimo.com/reservation/
4) Put focus into the username field.

The "Login not secure" box should show up under the text box, but instead it shows up above and to the left of it.

ekaramad@, maybe you can recommend how to do the coordinate transforms here for OOPIFs?  kenrb@, lfg@, and wjmaclean@ would also know, but they're all OOO.

mathp@ or estark@, can you share where the code is for this?  (Maybe you can own it and ekaramad@ can help with suggestions?)  Thanks!

Comment 8 by ma...@chromium.org, Mar 16 2017

Cc: rogerm@chromium.org
I will take a look tomorrow. On a separate note, I guess we also have other bugs with autofill + OOPIF such as  issue 688848 .


Comment 10 by kenrb@chromium.org, Mar 20 2017

Cc: -kenrb@chromium.org
Owner: kenrb@chromium.org
Status: Assigned (was: Available)

Comment 11 by kenrb@chromium.org, Mar 20 2017

Cc: -ekaramad@chromium.org kenrb@chromium.org
Owner: ekaramad@chromium.org
Oops, I hadn't realized that Ehsan already had a CL up for this.

Comment 12 by creis@chromium.org, Mar 21 2017

Status: Started (was: Assigned)
Yep, CL should hopefully land soon: https://codereview.chromium.org/2754033002/  (Thanks, Ehsan!)
Project Member

Comment 13 by bugdroid1@chromium.org, Mar 21 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652

commit 6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652
Author: ekaramad <ekaramad@chromium.org>
Date: Tue Mar 21 22:55:11 2017

Fix the position of AutofillClient for PasswordAutofillManager when the focused form element is inside OOPIF

When a form element is inside an OOPIF, the coordinates which are sent from
renderer are with respect to the WebFrameWidget's coordinates and need to be
transformed to root coordinate on the browser side. Without this change the
position of the autofill pop-up is incorrect.

This CL transforms the element bound to root view's coordinate before showing
the autofill pop-up.

BUG= 686129 

Review-Url: https://codereview.chromium.org/2754033002
Cr-Commit-Position: refs/heads/master@{#458593}

[modify] https://crrev.com/6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652/chrome/browser/chrome_site_per_process_browsertest.cc
[modify] https://crrev.com/6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652/components/password_manager/content/browser/content_password_manager_driver.cc
[modify] https://crrev.com/6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652/components/password_manager/content/browser/content_password_manager_driver.h

Comment 14 by creis@chromium.org, Mar 24 2017

Ehsan, if this is looking good on Canary, can you mark it fixed and request a merge to M58?  Thanks!
Labels: Merge-Request-58
Status: Fixed (was: Started)
Sure. I verified the fix on 59.0.3050.0 (Official Build) canary (64-bit) (video attached).

FYI, the test added with the fix in comment #13 is flaky and I am working towards fixing it (for now moving it to site_per_process_interactive_browsertests). Other than that we are good for the merge so I am adding the label with this comment.
verification.mov
7.5 MB Download
Project Member

Comment 16 by sheriffbot@chromium.org, Mar 24 2017

Labels: -Merge-Request-58 Hotlist-Merge-Approved Merge-Approved-58
Your change meets the bar and is auto-approved for M58. Please go ahead and merge the CL to branch 3029 manually. Please contact milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 17 by bugdroid1@chromium.org, Mar 24 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9febb1f84922d7307712a044550c9ad0640b64d3

commit 9febb1f84922d7307712a044550c9ad0640b64d3
Author: ekaramad <ekaramad@chromium.org>
Date: Fri Mar 24 20:26:02 2017

Rename AutofillClientPositionWhenInsideOOPIF and move it to interactive tests

The test is currently flaking on different platforms. The failure is due
to incorrect boudns reported either through focused node change event,
or AutofillClient. The failure is hard to reporoduce locally and the
logs do not provde proper visibility as to what the root cause could be.

This CL will:
  1- Move the test from browser_tests to interactive_ui_tests.
  2- Renames the test move appropriately to address vabr@'s comment in the
  original CL https://codereview.chromium.org/2754033002 (we are testing
  a popup position and the term "AutofillClient" is incorrect).
  3- Adds a log when the test fails to show the focused node bouds as
  well as those reported by autofill client and give us a hint on which
  one might be incorrect.

BUG= 704943 , 686129 

Review-Url: https://codereview.chromium.org/2773823003
Cr-Commit-Position: refs/heads/master@{#459535}

[modify] https://crrev.com/9febb1f84922d7307712a044550c9ad0640b64d3/chrome/browser/chrome_site_per_process_browsertest.cc
[modify] https://crrev.com/9febb1f84922d7307712a044550c9ad0640b64d3/chrome/browser/site_per_process_interactive_browsertest.cc

Project Member

Comment 18 by bugdroid1@chromium.org, Mar 24 2017

Labels: -merge-approved-58 merge-merged-3029
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d4ea62753e0609689d9c8de1443ca985f2366e25

commit d4ea62753e0609689d9c8de1443ca985f2366e25
Author: EhsanK <ekaramad@chromium.org>
Date: Fri Mar 24 21:06:27 2017

Fix the position of AutofillClient for PasswordAutofillManager when the focused form element is inside OOPIF

When a form element is inside an OOPIF, the coordinates which are sent from
renderer are with respect to the WebFrameWidget's coordinates and need to be
transformed to root coordinate on the browser side. Without this change the
position of the autofill pop-up is incorrect.

This CL transforms the element bound to root view's coordinate before showing
the autofill pop-up.

BUG= 686129 

Review-Url: https://codereview.chromium.org/2754033002
Cr-Commit-Position: refs/heads/master@{#458593}
(cherry picked from commit 6f15a2dc3a3b9bd111352a58c40cf1a1ea0e9652)

Review-Url: https://codereview.chromium.org/2770363002 .
Cr-Commit-Position: refs/branch-heads/3029@{#414}
Cr-Branched-From: 939b32ee5ba05c396eef3fd992822fcca9a2e262-refs/heads/master@{#454471}

[modify] https://crrev.com/d4ea62753e0609689d9c8de1443ca985f2366e25/chrome/browser/chrome_site_per_process_browsertest.cc
[modify] https://crrev.com/d4ea62753e0609689d9c8de1443ca985f2366e25/components/password_manager/content/browser/content_password_manager_driver.cc
[modify] https://crrev.com/d4ea62753e0609689d9c8de1443ca985f2366e25/components/password_manager/content/browser/content_password_manager_driver.h

Cc: hdodda@chromium.org
Labels: Needs-Feedback
Tested on windows 7 & 10 using chrome M58 #58.0.3029.41 and followed steps mentioned in comment #5 and didnt observe any login insecure message on click of username .

Tested the same using build M59 #59.0.3054.0 and on focus of username , login insecure message was displayed right below the text field.

Attached screencast for reference.

@ekaramad-- Could you please check attached screencast and provide us any steps/test url  to verify the issue .

Thanks!
686129.mp4
1.6 MB View Download
The steps in comment #7 worked for me. Specifically, step 2) to enable showing warnings.
I have attached an screenshot on Windows 10, Chrome Canary version 59.0.3055.0 (Official Build) canary (64-bit).
I am not on beta channel right now but I can try and verify on beta if no one else can.

window_position.JPG
114 KB View Download
Labels: TE-Verified-M58 TE-Verified-58.0.3029.41
Verified the issue on windows 10 using chrome M58 #58.0.3029.41 using the below steps :

1. Launched chrome and enabled flags "--site-per-process" and "Show in-form warnings for sensitive fields when the top-level page is not HTTPS" from chrome://flags.
2. Navigated to "http://pleasantlimo.com/reservation/" and typed username in the username field and observed the login not secure message right below the text filed.

Attached screencast for reference.

Adding TE-Verified labels.

Thanks!
686129 (1).mp4
471 KB View Download

Sign in to add a comment