Closed
Bug 481688
Opened 15 years ago
Closed 15 years ago
[FIX]Stop firing DOMLinkAdded/Removed events to content listeners
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
Attachments
(1 file)
15.50 KB,
patch
|
smaug
:
review+
smaug
:
superreview+
|
Details | Diff | Splinter Review |
We have these DOMLinkAdded/Removed events that we fire on <link> elements... Unfortunately, we fire them in ways content can see, while stomping on the DOM namespace and all. Not much we can do about the latter now, I think, but we should fix the former.
Comment 1•15 years ago
|
||
So we want to fire the events to chrome event handler, but using <link> as the target.
Assignee | ||
Comment 2•15 years ago
|
||
Assignee: nobody → bzbarsky
Attachment #365707 -
Flags: superreview?(Olli.Pettay)
Attachment #365707 -
Flags: review?(Olli.Pettay)
Comment 3•15 years ago
|
||
Comment on attachment 365707 [details] [diff] [review] Indeed, like so > nsEventStatus status = nsEventStatus_eIgnore; > rv = aDoc->GetWindow()->GetChromeEventHandler()->DispatchDOMEvent(nsnull, > event, > nsnull, > &status); Some null checks needed here, especially now that this may get called async. https://bugzilla.mozilla.org/show_bug.cgi?id=462856#c27 >+ nsCOMPtr<nsINode> node(do_QueryInterface(elt)); >+ NS_ENSURE_TRUE(node, NS_ERROR_UNEXPECTED); Nit, NS_ENSURE_STATE(node); r+sr=me, with null checks. I guess those are needed on branch too, so perhaps a separate bug which blocks this one and this could land after that one.
Attachment #365707 -
Flags: superreview?(Olli.Pettay)
Attachment #365707 -
Flags: superreview+
Attachment #365707 -
Flags: review?(Olli.Pettay)
Attachment #365707 -
Flags: review+
Comment 4•15 years ago
|
||
Comment on attachment 365707 [details] [diff] [review] Indeed, like so >+ NS_ASSERTION(aDoc, "GetEventAndTarget lied?"); > NS_ENSURE_ARG_POINTER(aDoc->GetWindow()); > NS_ENSURE_ARG_POINTER(aDoc->GetWindow()->GetChromeEventHandler()); ... > rv = aDoc->GetWindow()->GetChromeEventHandler()->DispatchDOMEvent(nsnull, > event, > nsnull, > &status); Bah, null checks are there.
Assignee | ||
Updated•15 years ago
|
Status: NEW → ASSIGNED
Summary: Stop firing DOMLinkAdded/Removed events to content listeners → [FIX]Stop firing DOMLinkAdded/Removed events to content listeners
Assignee | ||
Comment 5•15 years ago
|
||
Pushed http://hg.mozilla.org/mozilla-central/rev/5edc7cd0164d
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•