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

In hidpi mode in input fields selection doesn't clear after click

Reported by lo...@yandex-team.ru, Dec 1 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2906.0 Safari/537.36

Example URL:
https://jsfiddle.net/hkotxp0y/

Steps to reproduce the problem:
1. Set 125% dpi in Windows.
2. Add flag --isolate-extensions
3. Open https://jsfiddle.net/hkotxp0y/
4. Enter arbitrary text in input.
5. Click on text.

What is the expected behavior?
Selection clears after click.

What went wrong?
Selection doesn't clear.

Does it occur on multiple sites: Yes

Is it a problem with a plugin? No 

Did this work before? Yes 

Does this work in other browsers? Yes

Chrome version: 56.0.2906.0  Channel: canary
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version: 

Before https://codereview.chromium.org/2461693002 it was broken without flag --isolate-extensions
 
selection_bug.mp4
1.9 MB View Download
Labels: -Pri-2 M-56 Needs-Bisect Pri-1
Cc: tkonch...@chromium.org dpa...@chromium.org
Labels: -Type-Bug -Needs-Bisect Type-Bug-Regression
Owner: dbeam@chromium.org
Status: Assigned (was: Unconfirmed)
Able to reproduce the issue on win10 chrome version 56.0.2924.10 and 56.0.2938.0 - Selection doesn't clear after click

This is working fine on mac and Linux

This is working fine in firefox browser

This is a regression in M55 and below is the bisect info

Good Build: 55.0.2861.0 
Bad Build : 55.0.2862.0
You are probably looking for a change made after 418940 (known good), but no later than 418941 (first known bad).
CHANGELOG URL:
The script might not always return single CL as suspectas some perf builds might get missing due to failure.
  https://chromium.googlesource.com/chromium/src/+log/30d21915acf01e3cb5746b1a3cb2e8786c2bd841..a03615942fb43dd1d90af02ef3b45b95da2f7f2a

Please reassign if this is not related to your change
 
Cc: -tkonch...@chromium.org
Labels: Needs-Bisect
Owner: tkonch...@chromium.org
The bisect seems bogus. Could you try to run the bisect again?
Cc: ekaramad@chromium.org yosin@chromium.org
Components: -Blink Blink>Editing>Selection
+yosin +ekaramad, because I bet this is somewhere in their lands.
The good build in comment #2 is much after I landed all OOPIF changes for Aura and blink. I don't think it is my changes. It would help a lot if someone could run a detailed bisect.

Also I did not notice any extensions being loaded on that page. Is it possible to repro this on a single page with one <input>? If so it cannot be OOPIF related.
Cc: tkonch...@chromium.org ligim...@chromium.org
Labels: -Needs-Bisect ReleaseBlock-Stable
Owner: kenrb@chromium.org
Able to reproduce the issue on win10 chrome version 56.0.2924.14 and canary 57.0.2942.0 with 125% dpi - Selection doesn't clear after click

Manual Bisect:
==============
Good Build: 55.0.2861.0 
Bad Build: 55.0.2862.0

You are probably looking for a change made after 418939 (known good), but no later than 418940 (first known bad).
CHANGELOG URL:
The script might not always return single CL as suspectas some perf builds might get missing due to failure.
  https://chromium.googlesource.com/chromium/src/+log/5cea1b0cf4328831e583fa66f9fa30c8d075d677..30d21915acf01e3cb5746b1a3cb2e8786c2bd841

Please reassign if this is not related to your change.


 Issue 670950  has been merged into this issue.
Labels: OS-Linux
Issue is reproducible on Linux also with --force-device-scale-factor=1.5

Not reproducible on mac 10.11.6 which is highDPI by default(devicepixelRatio=2)
Labels: -M-56 M-55 prestable-55.0.2883.75
Cc: pbomm...@chromium.org nasko@chromium.org lfg@chromium.org
 Repro steps listed in original bug description requires to add  "flag --isolate-extensions". And We're disabling isolate-extensions by default in M55 ( bug 671463 ). So I don't think this will be an M55 stable blocker. lfg@ and nasko@, what do you think?
This issue is reproducible without flag --isolate-extensions as well but only reproducible with scaling level set to 125%

Not reproducible with scaling level set to 100%

Comment 12 by lfg@chromium.org, Dec 7 2016

Re #11: can you reproduce using the flag --force-fieldtrials=SiteIsolationExtensions/Control ?
[Bulk edit]

URGENT - PTAL ASAP.

This issue is marked as a stable release blocker for this week M55 Stable release cut, pls make sure to land the fix and get it merged to release branch ASAP.

Know that this issue shouldn't block the release?  Remove the ReleaseBlock-Stable label.


Thanks!
I see similar behavior with "--force-fieldtrials=SiteIsolationExtensions/Control" as well on latest Chrome Stable i.e., 55.0.2883.75.
Components: Blink>Input
+Blink>Input, since it seems scaling factor 125% makes hit test to return wrong result.

Comment 16 by lfg@chromium.org, Dec 8 2016

I was not able to reproduce this on either Windows or Linux using --force-device-scale-factor and disabling OOPIFs. I'll see if I can find a high-dpi windows computer tomorrow for testing, as I'm OOO and trying only via remote desktop.

#14, can you post a video?

Labels: -ReleaseBlock-Stable
Remove ReleaseBlock-Stable, since hidpi monitor is not yet widely used.
Cc: creis@chromium.org
Components: Internals>Sandbox>SiteIsolation
Cc: alex...@chromium.org
Labels: -M-55 M-56
alexmos@ did some testing of this on M55 and M57 as well, and it looks like this bug does not affect non-isolate-extensions mode.  (pbommana@, please correct us and post a video if that's wrong.)

This means the bug should no longer affect M55, since we've put 100% of users in the control group for --isolate-extensions, and we've merged https://codereview.chromium.org/2554083002 to M55 to ensure it's off by default ( issue 671463 ).  I think that's a stronger reason from removing ReleaseBlock-Stable for M55.

We'll need to get this fixed and merged to M56, though, because --isolate-extensions will be enabled in that mode.

Comment 20 by lfg@chromium.org, Dec 8 2016

Labels: ReleaseBlock-Stable
Re #17: Uma stats shows 11% of users on Windows using dpi > 100%, this should be a release blocker.

There seem to be two different bugs here, so here's a summary of the testing that lfg@ and I did on this:

Bug #1: Clicking on an <input> with selected text does not clear the selection and does not position the caret where the click occurred.

This only occurs with --isolate-extensions, and appears to only affect Windows.  We've reproed this on M55 stable, M56 dev, and M57 canary on Windows.  We couldn't repro on Linux M55 or M56 dev.  Note that in that mode, the <input> itself is *not* in an OOPIF on the jsfiddle repro page; the bug likely occurs because we enable the RenderWidgetHostInputEventRouter when OOPIFs are possible.  Also, interestingly, the cursor changes shape correctly when hovering over/out of the <input>, so it appears that the coordinates for that are correct.  We will need to fix this in M57 and merge back to M56.

 Bug #2 : When an <input> is in an OOPIF, and --force-device-scale-factor is used, mouse coordinates are incorrect, and clicking on the <input> does nothing.  Cursor doesn't change when hovering over the <input>.

We're reproed this with the jsfiddle repro page on M55 Win with --site-per-process --force-device-scale-factor=2, but interestingly this appears to already be fixed on M56 and M57.  I'm not sure what fixed this, but wjmaclean@ did some work on device scale factor that could have fixed it, and that would've happened before the branch cut.  So we likely don't need to do anything else for this bug, other than verify that it works on M56 beta when that comes out.
Comment 20: To elaborate, this is an M56 stable release blocker, not M55.
Labels: Proj-IsolateExtensions-BlockingLaunch
Still able to reproduce this issue on Win-10 using latest dev #56.0.2924.18 and latest canary #57.0.2949.0.

Gentle Ping...!!
kenrb@ - Could you please have a look into this issue.

Thanks...!!
Project Member

Comment 25 by bugdroid1@chromium.org, Dec 13 2016

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

commit e3a974bb76247be74aaed25df318cdffce664ff5
Author: kenrb <kenrb@chromium.org>
Date: Tue Dec 13 03:06:20 2016

Prevent coordinate transformation when targeting the root RWHV

In some cases, an input event being targeted to the root RWHV was going
through coordinate transformation, while in other cases it was not.
This is normally fine because it is the identity transform anyway, but
it can result in rounding error when there is a non-integer device
scale factor. This was noted to cause a bug related to selections not
being cleared because of coordinates from a transformed (rounded)
event being compared against coordinates from a non-tranformed
(unrounded) input event.

This CL prevents transformation in all cases when the root is being
targeted and the event is already in the coordinate space of the root.

BUG= 670253 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

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

[modify] https://crrev.com/e3a974bb76247be74aaed25df318cdffce664ff5/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/e3a974bb76247be74aaed25df318cdffce664ff5/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/e3a974bb76247be74aaed25df318cdffce664ff5/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/e3a974bb76247be74aaed25df318cdffce664ff5/content/browser/site_per_process_browsertest.cc

Comment 26 by creis@chromium.org, Dec 13 2016

Status: Fixed (was: Assigned)
Should be fixed now, though it missed the 57.0.2950.0 canary by 1 revision.  Once we verify the fix tomorrow, we should request a merge to M56.
Labels: Merge-TBD
[Auto-generated comment by a script] We noticed that this issue is targeted for M-56; it appears the fix may have landed after branch point, meaning a merge might be required. Please confirm if a merge is required here - if so add Merge-Request-56 label, otherwise remove Merge-TBD label. Thanks.

Comment 28 by kenrb@chromium.org, Dec 14 2016

Labels: -Merge-TBD Merge-Request-56

Comment 29 by dimu@chromium.org, Dec 14 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 30 by bugdroid1@chromium.org, Dec 15 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab78460362a28fe9464d431214bf42b854488873

commit ab78460362a28fe9464d431214bf42b854488873
Author: Ken Buchanan <kenrb@chromium.org>
Date: Thu Dec 15 20:51:17 2016

Prevent coordinate transformation when targeting the root RWHV

In some cases, an input event being targeted to the root RWHV was going
through coordinate transformation, while in other cases it was not.
This is normally fine because it is the identity transform anyway, but
it can result in rounding error when there is a non-integer device
scale factor. This was noted to cause a bug related to selections not
being cleared because of coordinates from a transformed (rounded)
event being compared against coordinates from a non-tranformed
(unrounded) input event.

This CL prevents transformation in all cases when the root is being
targeted and the event is already in the coordinate space of the root.

BUG= 670253 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2567093003
Cr-Commit-Position: refs/heads/master@{#438012}
(cherry picked from commit e3a974bb76247be74aaed25df318cdffce664ff5)

Review-Url: https://codereview.chromium.org/2578253002 .
Cr-Commit-Position: refs/branch-heads/2924@{#516}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/ab78460362a28fe9464d431214bf42b854488873/content/browser/frame_host/render_widget_host_view_child_frame.cc
[modify] https://crrev.com/ab78460362a28fe9464d431214bf42b854488873/content/browser/renderer_host/render_widget_host_view_aura.cc
[modify] https://crrev.com/ab78460362a28fe9464d431214bf42b854488873/content/browser/renderer_host/render_widget_host_view_mac.mm
[modify] https://crrev.com/ab78460362a28fe9464d431214bf42b854488873/content/browser/site_per_process_browsertest.cc

Project Member

Comment 31 by sheriffbot@chromium.org, Dec 16 2016

Labels: Merge-Review-56 Hotlist-Merge-Review
This bug requires manual review: No test file found in commits.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

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

Comment 32 by sheriffbot@chromium.org, Dec 16 2016

This bug requires manual review: No test file found in commits.
Please contact the milestone owner if you have questions.
Owners: amineer@(clank), cmasso@(bling), gkihumba@(cros), bustamante@(desktop)

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

Comment 33 by dimu@google.com, Dec 16 2016

Labels: -Merge-Review-56 -Hotlist-Merge-Review
[Automated comment] removing mislabelled Merge-Review-56, Hotlist-Merge-Review
Cc: hdodda@chromium.org
Labels: TE-Verified-M56 TE-Verified-56.0.2924.51
Verified the issue on Windows 10, Ubuntu 14.04 using chrome M56 #56.0.2924.51 and issue is fixed.

Text selection clears on click.

Attached screencast for reference.

Adding TE-Verified Labels.

Thanks!
670253.mp4
1011 KB View Download

Sign in to add a comment