Closed
Bug 856962
Opened 11 years ago
Closed 11 years ago
Webidl bindings for Touch
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: dzbarsky, Assigned: Ms2ger)
Details
Attachments
(2 files, 2 obsolete files)
54.83 KB,
patch
|
Ms2ger
:
review+
|
Details | Diff | Splinter Review |
20.15 KB,
patch
|
mounir
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Comment 1•11 years ago
|
||
Attachment #732216 -
Flags: review?(Ms2ger)
Assignee | ||
Comment 2•11 years ago
|
||
Comment on attachment 732216 [details] [diff] [review] Move Touch to its own file Review of attachment 732216 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/base/nsDOMWindowUtils.cpp @@ +849,5 @@ > } > event.touches.SetCapacity(aCount); > for (uint32_t i = 0; i < aCount; ++i) { > nsIntPoint pt = ToWidgetPoint(aXs[i], aYs[i], offset, presContext); > + nsCOMPtr<nsIDOMTouch> t(new dom::Touch(aIdentifiers[i], Add a using namespace mozilla::dom and remove the dom:: ::: widget/xpwidgets/InputData.cpp @@ +41,5 @@ > break; > } > > for (size_t i = 0; i < aTouchEvent.touches.Length(); i++) { > + dom::Touch* domTouch = (dom::Touch*)(aTouchEvent.touches[i].get()); static_cast, while you're here
Attachment #732216 -
Flags: review?(Ms2ger) → review+
Reporter | ||
Comment 3•11 years ago
|
||
Attachment #732682 -
Flags: review?(Ms2ger)
Assignee | ||
Comment 4•11 years ago
|
||
Comment on attachment 732682 [details] [diff] [review] WebIDL Touch Review of attachment 732682 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/events/src/Touch.cpp @@ +47,4 @@ > if (content && content->ChromeOnlyAccess() && > !nsContentUtils::CanAccessNativeAnon()) { > content = content->FindFirstNonChromeOnlyAccessContent(); > + target = do_QueryInterface(content); You should be able to 'return content.forget();' here. @@ +48,5 @@ > !nsContentUtils::CanAccessNativeAnon()) { > content = content->FindFirstNonChromeOnlyAccessContent(); > + target = do_QueryInterface(content); > + } else { > + target = do_QueryInterface(mTarget); You should try to make mTarget a dom::EventTarget, then this could return a raw pointer. ::: content/events/src/Touch.h @@ +16,5 @@ > namespace mozilla { > namespace dom { > > +class Touch MOZ_FINAL : public nsWrapperCache, > + public nsIDOMTouch Per <https://vargajan.wordpress.com/2013/04/02/moving-stuff-to-new-dom-bindings/>, this will leak. ::: dom/webidl/Touch.webidl @@ +11,5 @@ > + */ > + > +interface Touch { > + readonly attribute long identifier; > + readonly attribute EventTarget target; Are you sure this won't return null? Some assertions would be good.
Attachment #732682 -
Flags: review?(Ms2ger)
Reporter | ||
Comment 5•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f134e2c4bb2a
Whiteboard: [leave open]
Comment 6•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f134e2c4bb2a
Assignee | ||
Comment 7•11 years ago
|
||
David, is the second patch blocked on something here?
Reporter | ||
Comment 8•11 years ago
|
||
It is failing tests and I haven't had a chance to debug it yet.
Assignee | ||
Comment 9•11 years ago
|
||
This seems to be happier: https://tbpl.mozilla.org/?tree=Try&rev=9268caea9dcf
Attachment #732682 -
Attachment is obsolete: true
Attachment #737263 -
Flags: review?(mounir)
Comment 10•11 years ago
|
||
Comment on attachment 737263 [details] [diff] [review] WebIDL Touch v2 Review of attachment 737263 [details] [diff] [review]: ----------------------------------------------------------------- What about the PrefEnabled() part? It seems that this patch makes the feature no longer living behind a pref. Is that on purpose?
Attachment #737263 -
Flags: review?(mounir)
Reporter | ||
Comment 11•11 years ago
|
||
Ms2ger, do you want to finish this or should I pick it up again?
Flags: needinfo?(Ms2ger)
Assignee | ||
Comment 12•11 years ago
|
||
Yeah, I guess I will, if that's fine with you.
Assignee: dzbarsky → Ms2ger
Attachment #737263 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #739446 -
Flags: review?(mounir)
Flags: needinfo?(Ms2ger)
Comment 13•11 years ago
|
||
Comment on attachment 739446 [details] [diff] [review] WebIDL Touch v2.1 Review of attachment 739446 [details] [diff] [review]: ----------------------------------------------------------------- ::: content/events/src/Touch.cpp @@ +107,3 @@ > return NS_OK; > } > nit: could you remove those blank spaces.
Attachment #739446 -
Flags: review?(mounir) → review+
Assignee | ||
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/047132a1517f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Whiteboard: [leave open]
Target Milestone: --- → mozilla23
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•