Closed Bug 981261 Opened 6 years ago Closed 6 years ago

Rename nsEventListener* to mozilla::EventListener*

Categories

(Core :: DOM: Events, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(6 files)

19.15 KB, patch
smaug
: review+
Details | Diff | Splinter Review
39.36 KB, patch
smaug
: review+
Details | Diff | Splinter Review
5.12 KB, patch
smaug
: review+
Details | Diff | Splinter Review
32.58 KB, patch
smaug
: review+
Details | Diff | Splinter Review
191.11 KB, patch
smaug
: review+
Details | Diff | Splinter Review
13.24 KB, patch
smaug
: review+
Details | Diff | Splinter Review
nsListenerStruct is used only in nsEventListenerManager and inline method only for it.

So, for making clearer the fact, let's move it into nsEventListenerManager since the header file is exported and referred by a lot of developers who are not familiar with nsEventLinsterManager.

Then, the name can be simple. I think it's actual instance of event listener. Therefore, I name it just "Listener". See also part.6. Part.6 patch renames the variables of Listener, nsIJSListener, nsIDOMEventListener and EventListenerHolder for easy to read.
Attachment #8390295 - Flags: review?(bugs)
nsListenerType defines the type of nsEventListenerManager::Listener (nsListenerStruct). I.e., it's clearer if it's defined in nsEventListenerManager::Listener. I don't change the each value name because I have no better idea. "Listener" is redundant to me, though.
Attachment #8390296 - Flags: review?(bugs)
One of our rules of this series of bugs is, class representing DOM class should be mozilla::dom::<name in standard spec> and the others should be mozilla::foo.

So, mozilla::dom::EventListenerFlags should be moved to mozilla:: for the consistency with other classes.
Attachment #8390298 - Flags: review?(bugs)
Attachment #8390293 - Flags: review?(bugs) → review+
Comment on attachment 8390295 [details] [diff] [review]
part.2 Rename nsListenerStruct to nsEventListenerManager::Listener


>+    nsIJSEventListener* GetJSListener() const {
{ to the next line
Attachment #8390295 - Flags: review?(bugs) → review+
Attachment #8390296 - Flags: review?(bugs) → review+
Attachment #8390298 - Flags: review?(bugs) → review+
Attachment #8390300 - Flags: review?(bugs) → review+
Comment on attachment 8390299 [details] [diff] [review]
part.5 Rename nsEventListenerManager to mozilla::EventListenerManager

Don't know why HTMLSelectElement.cpp needs BasicEvents.h, but I assume it is ok.
Same with #include "js/Tracer.h" in nsXULElement.h.
Attachment #8390299 - Flags: review?(bugs) → review+
You need to log in before you can comment on or make changes to this bug.