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

Issue 778694 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 1
Type: Bug



Sign in to add a comment

CSS media query any-hover:none should not be true on desktop with mouse

Project Member Reported by yue...@google.com, Oct 26 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.62 Safari/537.36

Steps to reproduce the problem:
1. On a desktop with mouse attached, open https://googlechrome.github.io/samples/media-hover-pointer/index.html
2. Look at the box for 'any-hover:none'

What is the expected behavior?
'any-hover:none' should have strike-through line, indicating that this css media query evaluates to false.

What went wrong?
'any-hover:none' does not have strike-through line, indicating that it evaluates to true.

According to spec (https://www.w3.org/TR/mediaqueries-4/#descdef-media-any-hover):

"'any-hover:none' will only evaluate to true if there are no pointing devices, or if all the pointing devices present lack hover capabilities."

On a normal desktop with mouse, 'any-hover:none' should evaluate to false. However, it evaluates to true in Chrome on Ubuntu.

Did this work before? N/A 

Does this work in other browsers? Yes

Chrome version: 62.0.3202.62  Channel: stable
OS Version: Ubuntu 14.04
Flash Version: 

Chrome on windows or mac does not appear to have this issue.
 
Labels: Hotlist-Google Needs-Triage-M62 Needs-Bisect

Comment 2 by yue...@google.com, Oct 26 2017

Now it looks to me this is change in version 62. Once I upgrade to version 62, it repros on Windows and Mac too. Previously I did not see on Windows and Mac probably because I was using version 61.
Labels: -Type-Bug -Pri-2 -Needs-Bisect hasbisect-per-revision Triaged-ET M-64 Pri-1 Type-Bug-Regression
Owner: alexis.m...@intel.com
Status: Assigned (was: Unconfirmed)
Able to reproduce this issue on reported version 62.0.3202.62, on latest stable 62.0.3202.75 and on latest canary 64.0.3250.0 using Ubuntu 14.04 with steps mentioned in comment#0.

Note: Issue is not reproducible on Mac 10.12.6 and Win 10

Good build: 60.0.3102.0
Bad build: 60.0.3103.0

CHANGELOG URL:
  https://chromium.googlesource.com/chromium/src/+log/5978e88f58a40606f6f2cc6535394feeb1279854..83f1b6d5641a294f5b1fb8d52e37e0a1f9ff08d5

Possible Suspect: https://codereview.chromium.org/2827803002

@alexis.menard: Please confirm the bug and help in re-assigning if it is not related to your change.

I'll have a look early next week.

Comment 5 by nainar@chromium.org, Oct 30 2017

Labels: Update-Quarterly

Comment 6 by nainar@chromium.org, Oct 30 2017

Labels: -Update-Quarterly Update-Weekly
Ok found the issue. I'll make a patch but I can only test on Thursday, I'm attending TPAC.
Couple of comments here :
- Mac code was never changed and always returns HOVER_TYPE_HOVER only (see https://cs.chromium.org/chromium/src/ui/base/touch/touch_device.cc?sq=package:chromium&l=29)
- The spec was changed not so long ago to clarify the any-hover:none behavior. It turns out that when we made the interaction MQ dynamic we looked at the spec before the clarification. Our interpretation was different at the time and different than what we did previously.

Cc: rbyers@chromium.org
This bug is not a regression but rather an alignment with the spec, see https://github.com/w3c/csswg-drafts/pull/842#issuecomment-343764793

It will require updating our Android, Linux and Windows implementation. I have the patch ready but I need to test it. Probably will upload something end of this week or beginning of this week.
Labels: -Type-Bug-Regression Type-Bug
Project Member

Comment 12 by bugdroid1@chromium.org, Dec 4 2017

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

commit f0f725522202d8308417d2a0584df01c3107d53a
Author: Alexis Menard <alexis.menard@intel.com>
Date: Mon Dec 04 19:33:22 2017

Align any-hover:none behavior to current specification.

The spec was updated some time ago clarifying how
any-hover: none should match (see
https://github.com/w3c/csswg-drafts/commit/98f494677a265df504eee67d587329478b8ce6ba).
This patch aligns the behavior with the spec clarification
by making sure that 'any-hover:none' will only evaluate to
true if there are no pointing devices, or if all the pointing
devices present lack hover capabilities.

The previous implementation was reading the specification
literally by returning the union of the capabilities of
the input devices connected on the machine.

Windows, Linux and Android are now updated in this patch.

This technically has a compatibility impact as we're changing
behavior but @rbyers and myself did a rapid search of top websites
 and didn't find anything relevant to the change.

BUG= 778694 

Change-Id: I230a44f29707e660515b4d27a1bc88552aa73032
Reviewed-on: https://chromium-review.googlesource.com/803662
Commit-Queue: Alexis Menard <alexis.menard@intel.com>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Sadrul Chowdhury <sadrul@chromium.org>
Cr-Commit-Position: refs/heads/master@{#521407}
[modify] https://crrev.com/f0f725522202d8308417d2a0584df01c3107d53a/ui/android/java/src/org/chromium/ui/base/TouchDevice.java
[modify] https://crrev.com/f0f725522202d8308417d2a0584df01c3107d53a/ui/base/touch/touch_device_linux.cc
[modify] https://crrev.com/f0f725522202d8308417d2a0584df01c3107d53a/ui/base/touch/touch_device_win.cc

Status: Fixed (was: Assigned)

Sign in to add a comment