Closed
Bug 851073
Opened 11 years ago
Closed 11 years ago
Move MouseEvent to Web IDL
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
References
Details
Attachments
(1 file)
21.10 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Assignee | ||
Comment 1•11 years ago
|
||
Attachment #725018 -
Flags: review?(bugs)
Assignee | ||
Comment 2•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=6aa2c30c788f
Comment 3•11 years ago
|
||
Comment on attachment 725018 [details] [diff] [review] Patch (v1) >- CallQueryInterface(relatedTarget, aRelatedTarget); >+ if (relatedTarget) { >+ relatedTarget = do_QueryInterface(relatedTarget->GetTargetForDOMEvent()); >+ } I believe this got fixed, so that you get mozilla::dom::EventTarget from GetTargetForDOMEvent() >+ void InitMouseEvent(const nsAString & aType, bool aCanBubble, bool aCancelable, >+ nsIDOMWindow* aView, int32_t aDetail, int32_t aScreenX, >+ int32_t aScreenY, int32_t aClientX, int32_t aClientY, >+ bool aCtrlKey, bool aAltKey, bool aShiftKey, >+ bool aMetaKey, uint16_t aButton, nsIDOMEventTarget *aRelatedTarget, Hmm, shouldn't that be mozilla::dom::EventTarget* aRelatedTarget >+ void InitNSMouseEvent(const nsAString & aType, bool aCanBubble, bool aCancelable, >+ nsIDOMWindow *aView, int32_t aDetail, int32_t aScreenX, >+ int32_t aScreenY, int32_t aClientX, int32_t aClientY, >+ bool aCtrlKey, bool aAltKey, bool aShiftKey, >+ bool aMetaKey, uint16_t aButton, nsIDOMEventTarget *aRelatedTarget, >+ float aPressure, uint16_t aInputSource, >+ mozilla::ErrorResult& aRv) Same here >+++ b/dom/bindings/Bindings.conf >@@ -284,16 +284,17 @@ DOMInterfaces = { > { > 'workers': True, > }], > > 'EventTarget': [ > { > 'hasXPConnectImpls': True, > 'concrete': False, >+ 'headerFile': 'EventTarget.h' This shouldn't be needed. >+// Event Constructor Syntax: >+[Constructor(DOMString typeArg, optional MouseEventInit mouseEventInitDict)] >+partial interface MouseEvent >+{ >+}; Not sure we need this partial interface... but it is that way in DOM 4 events draft >+ >+// Suggested initMouseEvent replacement initializer: >+dictionary MouseEventInit { >+ // Attributes from Event: >+ boolean bubbles = false; >+ boolean cancelable = false; >+ >+ // Attributes from UIEvent: >+ WindowProxy? view = null; add a space before 'view'
Attachment #725018 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 4•11 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #3) > Comment on attachment 725018 [details] [diff] [review] > Patch (v1) > > > >- CallQueryInterface(relatedTarget, aRelatedTarget); > >+ if (relatedTarget) { > >+ relatedTarget = do_QueryInterface(relatedTarget->GetTargetForDOMEvent()); > >+ } > I believe this got fixed, so that you get mozilla::dom::EventTarget from > GetTargetForDOMEvent() OK, nice. > >+ void InitMouseEvent(const nsAString & aType, bool aCanBubble, bool aCancelable, > >+ nsIDOMWindow* aView, int32_t aDetail, int32_t aScreenX, > >+ int32_t aScreenY, int32_t aClientX, int32_t aClientY, > >+ bool aCtrlKey, bool aAltKey, bool aShiftKey, > >+ bool aMetaKey, uint16_t aButton, nsIDOMEventTarget *aRelatedTarget, > Hmm, shouldn't that be mozilla::dom::EventTarget* aRelatedTarget Hmm, yeah I guess so. > >+++ b/dom/bindings/Bindings.conf > >@@ -284,16 +284,17 @@ DOMInterfaces = { > > { > > 'workers': True, > > }], > > > > 'EventTarget': [ > > { > > 'hasXPConnectImpls': True, > > 'concrete': False, > >+ 'headerFile': 'EventTarget.h' > This shouldn't be needed. It is, since the default would be mozilla/dom/EventTarget.h, and that's not where this header is exported.
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to :Ehsan Akhgari (needinfo? me!) from comment #4) > > >+++ b/dom/bindings/Bindings.conf > > >@@ -284,16 +284,17 @@ DOMInterfaces = { > > > { > > > 'workers': True, > > > }], > > > > > > 'EventTarget': [ > > > { > > > 'hasXPConnectImpls': True, > > > 'concrete': False, > > >+ 'headerFile': 'EventTarget.h' > > This shouldn't be needed. > > It is, since the default would be mozilla/dom/EventTarget.h, and that's not > where this header is exported. Oh I see that has changed since I wrote this patch. :-)
Assignee | ||
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b66cea2dc7d2
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b66cea2dc7d2
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•