New issue
Advanced search Search tips

Issue 667799 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Dec 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 1
Type: Bug



Sign in to add a comment

Don't log console warning for calling preventDefault on passive listeners if touch-action used

Project Member Reported by dtapu...@chromium.org, Nov 22 2016

Issue description

If preventDefault is used during a touch-action state then we
shouldn't log a console warning. Doing the preventDefault is fallback
for other browsers that don't support touch-action.
 

Comment 1 by rbyers@chromium.org, Nov 22 2016

Labels: -Pri-3 ReleaseBlock-Stable Pri-1
Here's a real-world case of this warning being harmful (zero value due to existing use of touch-action, risks causing warning blindness): https://github.com/alvarotrigo/fullPage.js/issues/2362

I imagine that sort of case will be common, so I think it's important we get this fixed in M56.

Similarly, we might also need to worry about the "preventDefault called on an uncancelable touch event" warning.  Maybe we should similarly suppress it when touch-action is in effect?
Status: Started (was: Assigned)
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 25 2016

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

commit 6ea5974532e7cfea654c59181f1819e6805bb368
Author: dtapuska <dtapuska@chromium.org>
Date: Fri Nov 25 18:00:27 2016

Don't log a console warning when touch-action is used.

To avoid log fatigue for the developer only log the "you are prevent
defaulting a passive event listener" if no touch-action is used. If
touch-action is being used then it is clear that the developer is doing
this to interop with other browsers that don't support touch-action.

BUG= 667799 

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

[add] https://crrev.com/6ea5974532e7cfea654c59181f1819e6805bb368/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault-expected.txt
[add] https://crrev.com/6ea5974532e7cfea654c59181f1819e6805bb368/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html
[modify] https://crrev.com/6ea5974532e7cfea654c59181f1819e6805bb368/third_party/WebKit/Source/core/events/Event.cpp
[modify] https://crrev.com/6ea5974532e7cfea654c59181f1819e6805bb368/third_party/WebKit/Source/core/events/TouchEvent.cpp

Can someone please verify the fix?

If all looks good please request a merge to M56 Branch ( 2924) ASAP.
there is still one change to come.
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 29 2016

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

commit be1e266d539e2caeff5e7b174dba20e88d60f319
Author: dtapuska <dtapuska@chromium.org>
Date: Tue Nov 29 15:48:34 2016

Fix missing warning for canceling touchmove when in default not passive mode.

It appears that the the log error was dropped when the default mode enum
was added in change https://codereview.chromium.org/2475443004. Add a test
to ensure that it doesn't get dropped again.

BUG= 667799 

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

[modify] https://crrev.com/be1e266d539e2caeff5e7b174dba20e88d60f319/third_party/WebKit/LayoutTests/fast/events/touch/touch-event-cancelable-expected.txt
[modify] https://crrev.com/be1e266d539e2caeff5e7b174dba20e88d60f319/third_party/WebKit/LayoutTests/fast/events/touch/touch-event-cancelable.html
[modify] https://crrev.com/be1e266d539e2caeff5e7b174dba20e88d60f319/third_party/WebKit/Source/core/events/TouchEvent.cpp

Labels: OS-All
Looks like OS-All, correct if wrong.
Labels: Merge-Request-56

Comment 10 by dimu@chromium.org, Nov 30 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 11 by bugdroid1@chromium.org, Nov 30 2016

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

commit b7c3c8eb86af25ebba9d0254458a443a65a7c623
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Nov 30 22:10:20 2016

Don't log a console warning when touch-action is used.

To avoid log fatigue for the developer only log the "you are prevent
defaulting a passive event listener" if no touch-action is used. If
touch-action is being used then it is clear that the developer is doing
this to interop with other browsers that don't support touch-action.

BUG= 667799 

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

Review URL: https://codereview.chromium.org/2539183003 .

Cr-Commit-Position: refs/branch-heads/2924@{#214}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[add] https://crrev.com/b7c3c8eb86af25ebba9d0254458a443a65a7c623/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault-expected.txt
[add] https://crrev.com/b7c3c8eb86af25ebba9d0254458a443a65a7c623/third_party/WebKit/LayoutTests/fast/events/touch/touch-action-preventDefault.html
[modify] https://crrev.com/b7c3c8eb86af25ebba9d0254458a443a65a7c623/third_party/WebKit/Source/core/events/Event.cpp
[modify] https://crrev.com/b7c3c8eb86af25ebba9d0254458a443a65a7c623/third_party/WebKit/Source/core/events/TouchEvent.cpp

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 30 2016

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

commit 028ca146a4af5f6bcb765b34e14a47bbb1911da8
Author: Dave Tapuska <dtapuska@chromium.org>
Date: Wed Nov 30 22:18:00 2016

Fix missing warning for canceling touchmove when in default not passive mode.

It appears that the the log error was dropped when the default mode enum
was added in change https://codereview.chromium.org/2475443004. Add a test
to ensure that it doesn't get dropped again.

BUG= 667799 

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

Review URL: https://codereview.chromium.org/2541003004 .

Cr-Commit-Position: refs/branch-heads/2924@{#215}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/028ca146a4af5f6bcb765b34e14a47bbb1911da8/third_party/WebKit/LayoutTests/fast/events/touch/touch-event-cancelable-expected.txt
[modify] https://crrev.com/028ca146a4af5f6bcb765b34e14a47bbb1911da8/third_party/WebKit/LayoutTests/fast/events/touch/touch-event-cancelable.html
[modify] https://crrev.com/028ca146a4af5f6bcb765b34e14a47bbb1911da8/third_party/WebKit/Source/core/events/TouchEvent.cpp

Status: Fixed (was: Started)

Sign in to add a comment