Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
On 2014/02/12 23:22, Boris Zbarsky wrote: In general, the names for things that are standardized should just match the standard name, in the mozilla::dom namespace. In some (rare) cases the standard name starts with DOM; in those situations we should have our name start with DOM as well. I'd like to want some suggestions about our classes which do NOT represent DOM classes. * nsASyncDOMEvent(derived from nsRunnable) * nsContentEventHandler * nsDOMDataTransfer (?) (derived from nsIDOMDataTransfer) * nsDOMEventTargetHelper (derived from mozilla::dom::EventTarget) * nsEventDispatcher * nsEventListenerManager * nsEventListenerService (derived from nsIEventListenerService) * nsEventStateManager * nsEventStates * nsIMEStateManager * nsJSEventListener (derived from nsIJSEventListener) * nsPaintRequest (derived from nsIDOMPaintRequest) * mozilla::TextComposition Approaches: 1. All of them which don't start with nsDOM are in mozilla. The others in mozilla::dom. However, this approach needs dom:: at some places in nsEventStateManager.h, nsEventListenerManager.h and nsEventDispatcher.h. 2. Some of them which may be used in other modules and not specific classes of represent DOM classes e.g., nsContentEventHandler, nsIMEStateManager and TextComposition are in mozilla (for avoiding dom:: in header files in other modules) and not specific classes about DOM implementation. 3. Or, all of them should be in mozilla::dom. Any ideas? # I like #1 because it's clear rule and non-nsDOM* classes use classes which are defined in other modules (i.e., not in mozilla::dom namespace). -- Masayuki Nakano masay...@d-toybox.com Manager, Internationalization, Mozilla Japan. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
On 2/26/14 11:06 PM, Masayuki Nakano wrote: I'd like to want some suggestions about our classes which do NOT represent DOM classes. I don't have terribly strong opinions on these, in general... 1. All of them which don't start with nsDOM are in mozilla. This seems fine as a general rule of thumb. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
Hi, On 2014/02/12 23:22, Boris Zbarsky wrote: On 2/12/14 4:46 AM, Masayuki Nakano wrote: I'm not sure which is the best name for the classes. E.g., DOMWheelEvent vs. PointerEvent. I believe in this case PointerEvent is correct, because http://www.w3.org/TR/pointerevents/#pointerevent-interface but DOMWheelEvent should probably be just WheelEvent because https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-WheelEvent In general, the names for things that are standardized should just match the standard name, in the mozilla::dom namespace. In some (rare) cases the standard name starts with DOM; in those situations we should have our name start with DOM as well. Thank you for your reply. It sounds reasonable to me. However, there is a problem. nsDOMEvent will be just Event. And also the header file name will be Event.h. This sounds too general. How do you think about this problem? -- Masayuki Nakano masay...@d-toybox.com Manager, Internationalization, Mozilla Japan. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
Masayuki Nakano wrote: nsDOMEvent will be just Event. Well, only if you're using the mozilla::dom namespace. And also the header file name will be Event.h. Won't it be mozilla/dom/Event.h ? -- Warning: May contain traces of nuts. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
On 2014/02/21 20:21, Neil wrote: And also the header file name will be Event.h. Won't it be mozilla/dom/Event.h ? Oh, good point. http://mxr.mozilla.org/mozilla-central/source/dom/events/moz.build#38 38 EXPORTS.mozilla.dom += [ 39 'EventTarget.h', 40 'PointerEvent.h', 41 'Touch.h', 42 ] Now, they are exported as mozilla/dom/*.h. -- Masayuki Nakano masay...@d-toybox.com Manager, Internationalization, Mozilla Japan. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
On 2/21/14 6:07 AM, Masayuki Nakano wrote: nsDOMEvent will be just Event. Just like Element is just Element as long as you're in DOM code, yes. This is a good thing, imo. Of course in code not in the mozilla::dom namespace, you get mozilla::dom::Event or dom::Event, which seems fine to me. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
[Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
Hello. A lot of classes under dom/events which were moved from content/events/* are defined in global namespace. However, now, a lot of classes in other modules are defined in mozilla or its descendant namespace. Therefore, *.h files in dom/events need to write type of arguments with full path. It causes a lot of wrap for defining each method due to 80 column per line limitation of our coding rules. So, I'd like to suggest that let's move the classes under dom/events to mozilla or mozilla::dom namespace. Currently, following classes are not in global namespace: * mozilla::dom::DOMWheelEvent * mozilla::dom::EventTarget * mozilla::dom::PointerEvent * mozilla::dom::SpeechRecognitionError * mozilla::dom::Touch * mozilla::InternalMutationEvent * mozilla::TextComposition I'm not sure which is the best name for the classes. E.g., DOMWheelEvent vs. PointerEvent. If we use mozilla::dom namespace for DOM event classes, DOM prefix may be redundant. However, DOM prefix is clearer if its users use using namespace mozilla::dom;. Any ideas? -- Masayuki Nakano masay...@d-toybox.com Manager, Internationalization, Mozilla Japan. ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform
Re: [Proposal] Move global namespace classes under dom/events to mozilla or mozilla::dom
On 2/12/14 4:46 AM, Masayuki Nakano wrote: I'm not sure which is the best name for the classes. E.g., DOMWheelEvent vs. PointerEvent. I believe in this case PointerEvent is correct, because http://www.w3.org/TR/pointerevents/#pointerevent-interface but DOMWheelEvent should probably be just WheelEvent because https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-WheelEvent In general, the names for things that are standardized should just match the standard name, in the mozilla::dom namespace. In some (rare) cases the standard name starts with DOM; in those situations we should have our name start with DOM as well. -Boris ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform