New issue
Advanced search Search tips

Issue 612456 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 7
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Refactor mouse event-target fixing for text nodes

Project Member Reported by nzolghadr@chromium.org, May 17 2016

Issue description

We do not send pointer events to the text node and instead send them to the parent node in that case following the touch model. We need to investigate if that is right and either change the behavior or follow up on the spec to make sure it is documented.
 
Components: Blink>Input
Labels: Hotlist-Input-Dev

Comment 2 by mustaq@chromium.org, May 30 2016

I think this bug is WAI: even though the Text interface inherits ultimately from EventTarget, a text node can't have a event listener, right?

That is right. But then why don't we have the same check for the mouse events flow? Is that because the hit testing behavior different there?

Comment 4 by mustaq@chromium.org, May 30 2016

This shouldn't be different for MEs. Did you check the "hidden" checks for isTextNode(), e.g. EventHandler::updateMouseEventTargetNode?

You are right. I certainly missed that one. Is it worth refactoring them and putting them in once place somehow?

Comment 6 by mustaq@chromium.org, May 30 2016

Labels: Hotlist-CodeHealth
Summary: Refactor mouse event-target fixing for text nodes (was: Can pointer events be targeted at a text node?)
Yes, that would be great, the calls for MEs are scattered:
https://code.google.com/p/chromium/codesearch#search/&q=file:third_party/WebKit/Source/core/input/.*%20isTextNode&sq=package:chromium&type=cs

The test mouseevents-on-textnodes.html was really modified 11 years ago, btw! And it's a manual test. We can add a LayoutTest too.

Cc: nzolghadr@chromium.org
Owner: ----
Status: Available (was: Assigned)
Project Member

Comment 8 by sheriffbot@chromium.org, May 28 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
still an issue and a possible avenue for refactoring.
Owner: nzolghadr@chromium.org
Status: Assigned (was: Available)
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 7

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

commit afabfc74e93510efdc0c8a966067299ea6ef8dd9
Author: Navid Zolghadr <nzolghadr@chromium.org>
Date: Mon Jan 07 16:44:01 2019

Move all Node and EventTargets to Element

Mouse/Pointer/Touch event targets should be Element.
Node is too general which makes us check for text node
here and there and find the first element parent for it.

Bug:  612456 
Change-Id: Ie98f31c3b39494f40dd3297ec0e79c042cb30728
Reviewed-on: https://chromium-review.googlesource.com/c/1394903
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Reviewed-by: Hayato Ito <hayato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#620351}
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/exported/web_view_impl.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/frame/web_frame_widget_impl.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/html/forms/slider_thumb_element.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/html/forms/spin_button_element.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/event_handler.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/event_handler.h
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/event_handling_util.h
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/gesture_manager.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/mouse_event_manager.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/mouse_event_manager.h
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/pointer_event_manager.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/pointer_event_manager.h
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/input/touch_event_manager.cc
[modify] https://crrev.com/afabfc74e93510efdc0c8a966067299ea6ef8dd9/third_party/blink/renderer/core/layout/hit_test_result.cc

Status: Fixed (was: Assigned)
Project Member

Comment 13 by bugdroid1@chromium.org, Jan 11

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

commit 314eabc1c456bd2f67ba346cb1c55e0ad3c1465e
Author: Navid Zolghadr <nzolghadr@chromium.org>
Date: Fri Jan 11 17:10:20 2019

Replace another mouse EventTarget with Element

Bug:  612456 
Change-Id: Idefb93e48c6d99ea3927702d17280a2c82850fdb
Reviewed-on: https://chromium-review.googlesource.com/c/1405435
Reviewed-by: Hayato Ito <hayato@chromium.org>
Reviewed-by: Ella Ge <eirage@chromium.org>
Reviewed-by: Mustaq Ahmed <mustaq@chromium.org>
Commit-Queue: Navid Zolghadr <nzolghadr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#622037}
[modify] https://crrev.com/314eabc1c456bd2f67ba346cb1c55e0ad3c1465e/third_party/blink/renderer/core/input/pointer_event_manager.cc

Sign in to add a comment