Closed
Bug 984253
Opened 11 years ago
Closed 11 years ago
Rename nsJSEventListener to mozilla::JSEventListener
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(4 files)
|
3.78 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
|
28.29 KB,
patch
|
smaug
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
|
28.06 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
|
22.73 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•11 years ago
|
||
Hmm,
http://mxr.mozilla.org/mozilla-central/source/dom/events/nsJSEventListener.h#19
> 19 // nsJSEventListener interface
> 20 // misnamed - JS no longer has exclusive rights over this interface!
We shouldn't change the interface name in this bug, however, we may give better name to nsEventHandler and nsJSEventListener. What are the best names for them? Any ideas?
Flags: needinfo?(bugs)
| Assignee | ||
Comment 2•11 years ago
|
||
Comment 3•11 years ago
|
||
We should rename nsJSEventListener to JSEventHandler, or some such, since it is used for event handlers. And nsIJSEventListener should be merged with that.
Flags: needinfo?(bugs)
| Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3)
> And nsIJSEventListener should be merged with that.
Do you mean that nsJSEventListener should be just refcountable class and we should get rid of nsIJSEventListener?
| Assignee | ||
Comment 5•11 years ago
|
||
Ah, nsIJSEventListener is a derived interface of nsIDOMEventListener but here QIs nsIJSEventListener...
http://mxr.mozilla.org/mozilla-central/source/dom/events/EventListenerService.cpp#104
Comment 6•11 years ago
|
||
Well, we could move IID to nsJSEventListener (which would be renamed to JSEventHandler)
| Assignee | ||
Comment 7•11 years ago
|
||
Attachment #8399340 -
Flags: review?(bugs)
| Assignee | ||
Comment 8•11 years ago
|
||
Attachment #8399343 -
Flags: review?(bugs)
| Assignee | ||
Comment 9•11 years ago
|
||
I'm not sure if TypedEventHandler is good name for nsEventHandler. I believe that mozilla::EventHandler is too generic and not good name for this class.
This patch changes:
> nsEventHandler -> mozilla::TypedEventHandler
> nsEventHandler::EventHandler() -> mozilla::TypedEventHandler::NormalEventHandler()
> nsJSEventListener::GetHandler() -> nsJSEventListener::GetTypedEventHandler()
> nsJSEventListener::mHandler -> nsJSEventListener::mTypedHandler
> EventListenerManager::GetEventHandlerInternal() -> EventListenerManager::GetTypedEventHandler()
Attachment #8399347 -
Flags: review?(bugs)
| Assignee | ||
Comment 10•11 years ago
|
||
Updated•11 years ago
|
Attachment #8399340 -
Flags: review?(bugs) → review+
Comment 11•11 years ago
|
||
Comment on attachment 8399343 [details] [diff] [review]
part.2 Merge nsIJSEventListener and nsJSEventListener
+void Assign(nsISupports* aHandler, HandlerType aType) {
{ should be in the next line
(I guess you just moved this code)
+ * (Note this interface is now used to store script objects for all
+ * script languages, so is no longer JS specific)
Remove this stuff
Attachment #8399343 -
Flags: review?(bugs) → review+
Updated•11 years ago
|
Attachment #8399347 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 8399349 [details] [diff] [review]
part.4 Rename nsJSEventListener to mozilla::JSEventHandler
Oops... I forgot to request the review for this...
Attachment #8399349 -
Flags: review?(bugs)
| Assignee | ||
Comment 13•11 years ago
|
||
Comment on attachment 8399343 [details] [diff] [review]
part.2 Merge nsIJSEventListener and nsJSEventListener
jst, could you review this as a super-reviewer?
This patch merges nsIJSEventListener and nsJSEventListener. I.e., the concrete class, nsJSEventListener becomes an interface like nsDOMEventTargetHelper.
Attachment #8399343 -
Flags: superreview?(jst)
Updated•11 years ago
|
Attachment #8399343 -
Flags: superreview?(jst) → superreview+
Updated•11 years ago
|
Attachment #8399349 -
Flags: review?(bugs) → review+
| Assignee | ||
Comment 14•11 years ago
|
||
Comment 15•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/3f4b299b81fc
https://hg.mozilla.org/mozilla-central/rev/7992ce6151cf
https://hg.mozilla.org/mozilla-central/rev/a37a8007adc7
https://hg.mozilla.org/mozilla-central/rev/4d4fce5e6a3f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in
before you can comment on or make changes to this bug.
Description
•