Closed
Bug 832159
Opened 11 years ago
Closed 11 years ago
Move internal part of InputData (nsEvent conversion) out from the header
Categories
(Core :: Widget, defect)
Tracking
()
RESOLVED
FIXED
mozilla21
People
(Reporter: romaxa, Assigned: romaxa)
Details
Attachments
(1 file, 1 obsolete file)
9.81 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
I'm trying to reuse as much as possible from existing gecko code for embedding API. and one thing required in order to make generic C++ embedding interface is ability to convert platform toolkit events into gecko events (InputData events) basically I want to be able to use InputData outside of internal build and outside of XPCOM context (embed parent context), but in order to do that I need to move some functionality like MultiTouchInput(const nsTouchEvent& aTouchEvent) MultiTouchInput(const nsMouseEvent& aMouseEvent) into internal InputData.cpp file, so I can include header. for InputEvent intialization outside of Internal context... I tried to initialize nsEvent's nsTouchEvents directly but as soon I create nsDOMTouchEvent outside of XPCOM context assert on garbage collector...
Assignee | ||
Comment 1•11 years ago
|
||
Also I need default constructors in order to be able to IPC these events through IPDL.
Comment 2•11 years ago
|
||
( Not garbage collector, but cycle collector, I guess. nsEvent has strong refs to event targets, which are cycle collectable objects, so it should not be uses off-main-thread. )
Assignee | ||
Comment 3•11 years ago
|
||
yep, that is why I guess it make sense to expose from embedding API InputData API, so touch event could be initialized like here: https://github.com/tmeshkova/mozilla-central/blob/embedlite/embedding/embedlite/tests/qt/qtwidget/qgraphicsmozview.cpp#L465 pushed across IPDL into child gecko main thread https://github.com/tmeshkova/mozilla-central/blob/embedlite/embedding/embedlite/PEmbedLiteView.ipdl#L48 and then converted into nsEvent... https://github.com/tmeshkova/mozilla-central/blob/embedlite/embedding/embedlite/utils/TabChildHelper.cpp#L615
Comment 4•11 years ago
|
||
What is the reason for adding ctors that take no parameters?
Assignee | ||
Comment 5•11 years ago
|
||
See Comment #1 IPDL generated code has initialization with default ctor... see for example this commit where default ctor's were added to nsEvent http://hg.mozilla.org/mozilla-central/rev/fb5ad0e555fd
Comment 6•11 years ago
|
||
Comment on attachment 703758 [details] [diff] [review] Allow to use InputData.h outside of Internal build Review of attachment 703758 [details] [diff] [review]: ----------------------------------------------------------------- Ok, I see. This code is actually smaug's baby though, so we should see what he says. Also, is this patch formatted correctly? The review tool doesn't seem to be parsing InputData.cpp as a different file.
Attachment #703758 -
Flags: feedback?(bugzilla)
Attachment #703758 -
Flags: feedback?(bugs)
Attachment #703758 -
Flags: feedback+
Assignee | ||
Comment 7•11 years ago
|
||
Formatted patch, change 2 space indent
Attachment #703758 -
Attachment is obsolete: true
Attachment #703758 -
Flags: feedback?(bugs)
Attachment #704359 -
Flags: review?(bugs)
Comment 8•11 years ago
|
||
Comment on attachment 704359 [details] [diff] [review] Allow to use InputData.h outside of Internal build, and push throug IPDL Don't have comments of a method in two places. I'd prefer keeping them in .h I'm talking about the comment just before MultiTouchInput::MultiTouchInput(const nsMouseEvent& aMouseEvent)
Attachment #704359 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 9•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=da28d6bafd71 use this patch https://hg.mozilla.org/try/raw-rev/ff910ca4ee9c for checking
Keywords: checkin-needed
Comment 10•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/ffa079b50b20
Keywords: checkin-needed
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ffa079b50b20
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in
before you can comment on or make changes to this bug.
Description
•