Closed
Bug 1299046
Opened 8 years ago
Closed 8 years ago
Lots of warnings triggered with mouse events on pseudo-elements
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla51
Tracking | Status | |
---|---|---|
firefox51 | --- | fixed |
People
(Reporter: emilio, Assigned: emilio)
References
Details
Attachments
(1 file)
So when doing a simple test with pseudo-elements, I trigger tons of assertions when hovering over this. ``` <!doctype html> <style> div::before { background: red; content: "(test)"; } div { background: blue; } div:hover::before { background: green; } </style> <div></div> ``` The assertion triggered is in EventStateManager::PreHandleEvent, that one that says that nodes and content should be related: http://searchfox.org/mozilla-central/source/dom/events/EventStateManager.cpp#513 The culprit is the call that the pres shell uses to get the content from the generated content frame, that is, mCurrentEventFrame->GetContentForEvent(..), which explicitly discards generated content frames. I can certainly relax the assertion so it doesn't hit on generated content, I guess, but I also think we might want to not skip generated content, since this might be one of the underlying causes of bugs like bug 1122965 or bug 1177528.
Assignee | ||
Updated•8 years ago
|
Assignee | ||
Updated•8 years ago
|
Summary: Lots of assertions triggered with mouse events on pseudo-elements → Lots of warnings triggered with mouse events on pseudo-elements
Assignee | ||
Comment 1•8 years ago
|
||
After digging a bit more, I understand why the target is the non-generated content, I'll post a patch with the warning condition fixed.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=6a862594cbec
Comment 4•8 years ago
|
||
mozreview-review |
Comment on attachment 8786202 [details] Bug 1299046: Take into account generated content in EventStateManager::PreHandleEvent. https://reviewboard.mozilla.org/r/75176/#review73160 ::: dom/events/EventStateManager.cpp:533 (Diff revision 1) > aTargetFrame->GetContent() == aTargetContent || > - aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent, > + aTargetFrame->GetContent()->GetFlattenedTreeParent() == aTargetContent || > + aTargetFrame->IsGeneratedContentFrame(), > "aTargetFrame should be related with aTargetContent"); > +#if DEBUG > + if (aTargetFrame && aTargetFrame->IsGeneratedContentFrame()) { Make sure to push this to tryserver (debug builds) before landing.
Attachment #8786202 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → ecoal95
Assignee | ||
Comment 5•8 years ago
|
||
Try is green modulo unrelated intermittent failures.
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/autoland/rev/b0cad82d939e Take into account generated content in EventStateManager::PreHandleEvent. r=smaug
Comment 7•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/b0cad82d939e
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox51:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in
before you can comment on or make changes to this bug.
Description
•