Closed
Bug 718274
Opened 13 years ago
Closed 13 years ago
Add a ::DispatchUntrustedEvent and ::DispatchEvent to nsContentUtils
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla13
People
(Reporter: mounir, Assigned: mjschranz)
References
Details
(Whiteboard: [mentor=volkmar][lang=c++])
Attachments
(1 file)
7.41 KB,
patch
|
mounir
:
review+
mounir
:
checkin+
|
Details | Diff | Splinter Review |
nsContentUtils allows us to dispatch a trusted event with ::DispatchTrustedEvent() but doesn't help to dispatch an untrusted event. We want to create a ::DispatchUntrustedEvent() and a ::DispatchEvent() functions. Both Untrusted and Trusted function would call the ::DispatchEvent() one with a different aTrusted parameter.
We can make ::DispatchEvent() method private to nsContentUtils or not.
Doing this will require adding a aTrusted boolean parameter to GetEventAndTarget which is private to nsContentUtils.cpp AFAICT.
Reporter | ||
Comment 1•13 years ago
|
||
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #0)
> Doing this will require adding a aTrusted boolean parameter to
> GetEventAndTarget which is private to nsContentUtils.cpp AFAICT.
To be exact:
content/base/src/nsContentUtils.cpp
Assignee | ||
Comment 2•13 years ago
|
||
Looking to do something more challenging now for my third set of tickets and this one is definitely interesting so I'm going to pick this up if no one objects.
Status: NEW → ASSIGNED
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → schranz.m
Assignee | ||
Comment 3•13 years ago
|
||
As far as I can tell this covers the bug's requirements. Set it for feedback because I'm assuming some tests for DispatchUntrustedEvent are needed.
Attachment #591358 -
Flags: feedback?(mounir)
Reporter | ||
Comment 4•13 years ago
|
||
Comment on attachment 591358 [details] [diff] [review]
Implementation with no tests
Review of attachment 591358 [details] [diff] [review]:
-----------------------------------------------------------------
Seems good. Do you have try access?
Attachment #591358 -
Flags: feedback?(mounir) → review+
Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Matthew Schranz [:mjschranz] from comment #3)
> Created attachment 591358 [details] [diff] [review]
> Implementation with no tests
>
> As far as I can tell this covers the bug's requirements. Set it for feedback
> because I'm assuming some tests for DispatchUntrustedEvent are needed.
No tests are required here: callers will have to write tests to make sure the behavior they are looking for is ok.
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Mounir Lamouri (:volkmar) (:mounir) from comment #4)
> Comment on attachment 591358 [details] [diff] [review]
> Implementation with no tests
>
> Review of attachment 591358 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Seems good. Do you have try access?
That I do not. Been meaning to start the process for that.
Assignee | ||
Comment 7•13 years ago
|
||
Man have I disregarded this for much longer than I should have. Either way I was granted level 1 try server access today so I'll get this patch up on there in a bit.
Assignee | ||
Comment 8•13 years ago
|
||
Obviously not finished yet, but here is a link to my build on the try server.
https://tbpl.mozilla.org/?tree=Try&rev=bfd739d2f726
Assignee | ||
Updated•13 years ago
|
Keywords: checkin-needed
Reporter | ||
Comment 9•13 years ago
|
||
Comment on attachment 591358 [details] [diff] [review]
Implementation with no tests
Pushed to inbound. Thank you for the patch :)
Attachment #591358 -
Flags: checkin+
Reporter | ||
Updated•13 years ago
|
Keywords: checkin-needed
Comment 10•13 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•