Closed
Bug 1259661
Opened 8 years ago
Closed 8 years ago
Clean up WidgetMouseEvent
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(10 files)
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
58 bytes,
text/x-review-board-request
|
smaug
:
review+
|
Details |
See bug 1259654 comment 0 for the detail.
Assignee | ||
Updated•8 years ago
|
Mentor: masayuki
I would like to work on this bug. Can you please assign this to me. Thank you
Assignee | ||
Comment 2•8 years ago
|
||
Thank you, agore1. I'd like to explain what I'd like you to do in this bug: 1. Rename buttonType to ButtonType and define its type as int16_t. I.e., typedef int16_t ButtonTypeType; enum ButtonType : ButtonTypeType { ... }; ButtonType button; 2. Rename buttonsFlag to ButtonsFlag and define its type as int16_t but buttons shouldn't be the enum because the enum defines bit flags. Therefore, the code should be: typedef int16_t ButtonFlagType; enum ButtonFlag : ButtonFlagType { ... }; ButtonFlagType buttons; 3. Reorder the members for optimizing memory alignment, the order should be: 1. nsCOMPtr<nsISupports> relatedTarget; 2. nsString region; 3. float pressure; 4. ButtonType button; 5. ButtonFlagType buttons; 6. bool hitCluster; Don't forget to reorder the initialing list of constructor too. 4. Rename relatedTarget to mRelatedTarget. 5. Rename region to mRegion. 6. Rename pressure to mPressure. 7. Rename button to mButton. 8. Rename buttons to mButtons. 9. Rename hitCluster to mHistCluster. When you modify the code, please make sure that each line is same or less than 80 characters. Even if it's already overflown from this rule, please correct it (this is a change to clean up a lot of ugly lines). And you should separate the changes to 9 patches as above. Each commit message should starts with "Bug 1259661 part n " and explain what you do in the changeset. # This is pretty big change, so, if you'd like to work on smaller bug, let me know.
Assignee: nobody → agore1
Assignee | ||
Comment 3•8 years ago
|
||
And the commit message should have " r?masayuki" at the last of the message. Then, please use |hg push -r firstchangeset:lastchangeset review| to request review. Then, I'll post the patches to tryserver for testing your patches don't cause bustage on any platforms.
https://pastebin.mozilla.org/8868532 getting error during build.
Flags: needinfo?(masayuki)
(In reply to agore1 from comment #4) > https://pastebin.mozilla.org/8868532 > > getting error during build. after implementing 1st part
Assignee | ||
Comment 6•8 years ago
|
||
Of course, I need to know your change ;-) Could you attach the output of |hg diff|?
Flags: needinfo?(masayuki)
Assignee | ||
Updated•8 years ago
|
Whiteboard: [good first bug][for Gecko Inside #7 in Mozilla Japan] → [good first bug]
Assignee | ||
Comment 7•8 years ago
|
||
Ah, I guess you don't cast the members in nsGUIEventIPC.h like this: https://dxr.mozilla.org/mozilla-central/source/widget/nsGUIEventIPC.h#68-69,79,86
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #7) > Ah, I guess you don't cast the members in nsGUIEventIPC.h like this: > https://dxr.mozilla.org/mozilla-central/source/widget/nsGUIEventIPC.h#68-69, > 79,86 After trying changes as per your instruction I am getting following errors https://pastebin.mozilla.org/8868602 the diff file is https://pastebin.mozilla.org/8868603 please help
Flags: needinfo?(masayuki)
Assignee | ||
Comment 9•8 years ago
|
||
(In reply to agore1 from comment #8) > (In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) from comment #7) > > Ah, I guess you don't cast the members in nsGUIEventIPC.h like this: > > https://dxr.mozilla.org/mozilla-central/source/widget/nsGUIEventIPC.h#68-69, > > 79,86 > > After trying changes as per your instruction I am getting following errors > > https://pastebin.mozilla.org/8868602 > > > the diff file is > > > https://pastebin.mozilla.org/8868603 Hmm, I cannot see any text in those URLs. Why don't you attach those text files with using above form?
Flags: needinfo?(masayuki)
Comment 10•8 years ago
|
||
Hi I can solve from 4 to 9 but I am getting hard time to solve 1 to 3 and do "./mack build" can you please suggest some other easy bugs..? thank you
No longer blocks: 1259660
Flags: needinfo?(masayuki)
Assignee | ||
Comment 11•8 years ago
|
||
(In reply to agore1 from comment #10) > Hi I can solve from 4 to 9 but I am getting hard time to solve 1 to 3 Hmm, that's odd, is this a first time to use C++ for you? > can you please suggest some other easy bugs..? Um, there are no bugs which I can suggest to you...
Flags: needinfo?(masayuki)
Assignee | ||
Comment 12•8 years ago
|
||
If you'd like to continue this bug, I'll write part.1-3 for you. Then, you can write 4-last. How about this?
Assignee | ||
Comment 13•8 years ago
|
||
> 1. Rename buttonType to ButtonType and define its type as int16_t. I.e.,
>
> typedef int16_t ButtonTypeType;
> enum ButtonType : ButtonTypeType
> {
> ...
> };
> ButtonType button;
>
> 2. Rename buttonsFlag to ButtonsFlag and define its type as int16_t but buttons shouldn't be the enum because the enum defines bit flags. Therefore, the code should be:
>
> typedef int16_t ButtonFlagType;
> enum ButtonFlag : ButtonFlagType
> {
> ...
> };
> ButtonFlagType buttons;
Oh, I'm sorry. I was introduced wrong enums. They are in WidgetMosueEventBase. So, in this bug, needs to rename reasonType, contextType and exitType.
Assignee | ||
Comment 14•8 years ago
|
||
> 3. Reorder the members for optimizing memory alignment, the order should be:
> 1. nsCOMPtr<nsISupports> relatedTarget;
> 2. nsString region;
> 3. float pressure;
> 4. ButtonType button;
> 5. ButtonFlagType buttons;
> 6. bool hitCluster;
>
> Don't forget to reorder the initialing list of constructor too.
>
> 4. Rename relatedTarget to mRelatedTarget.
> 5. Rename region to mRegion.
> 6. Rename pressure to mPressure.
> 7. Rename button to mButton.
> 8. Rename buttons to mButtons.
> 9. Rename hitCluster to mHistCluster.
And also, these are WidgetMouseEventBase, sorry for the mistake.
Assignee | ||
Comment 15•8 years ago
|
||
Okay, this bug has been already confused. I take this.
Assignee: agore1 → masayuki
Mentor: masayuki
Status: NEW → ASSIGNED
Whiteboard: [good first bug]
Assignee | ||
Comment 16•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=44de7da45eef
Assignee | ||
Comment 17•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51849/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51849/
Attachment #8751121 -
Flags: review?(bugs)
Attachment #8751122 -
Flags: review?(bugs)
Attachment #8751123 -
Flags: review?(bugs)
Attachment #8751124 -
Flags: review?(bugs)
Attachment #8751125 -
Flags: review?(bugs)
Attachment #8751126 -
Flags: review?(bugs)
Attachment #8751127 -
Flags: review?(bugs)
Attachment #8751128 -
Flags: review?(bugs)
Attachment #8751129 -
Flags: review?(bugs)
Attachment #8751130 -
Flags: review?(bugs)
Assignee | ||
Comment 18•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51851/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51851/
Assignee | ||
Comment 19•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51853/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51853/
Assignee | ||
Comment 20•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51855/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51855/
Assignee | ||
Comment 21•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51857/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51857/
Assignee | ||
Comment 22•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51859/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51859/
Assignee | ||
Comment 23•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51861/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51861/
Assignee | ||
Comment 24•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51863/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51863/
Assignee | ||
Comment 25•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51865/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51865/
Assignee | ||
Comment 26•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51867/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/51867/
Comment 27•8 years ago
|
||
Comment on attachment 8751121 [details] MozReview Request: Bug 1259661 part.1 Rename WidgetMouseEvent::reasonType to WidgetMouseEvent::Reason r?smaug https://reviewboard.mozilla.org/r/51849/#review48799 ::: widget/MouseEvents.h:184 (Diff revision 1) > private: > friend class mozilla::dom::PBrowserParent; > friend class mozilla::dom::PBrowserChild; > > public: > - enum reasonType > + typedef bool ReasonType; tiny bit surprising to see this kind of typedef but fine. ::: widget/MouseEvents.h:205 (Diff revision 1) > eTopLevel > }; > > protected: > WidgetMouseEvent() > - : acceptActivation(false) > + : reason(eSynthesized) I would probably default to eReal here.
Attachment #8751121 -
Flags: review?(bugs) → review+
Updated•8 years ago
|
Attachment #8751122 -
Flags: review?(bugs) → review+
Comment 28•8 years ago
|
||
Comment on attachment 8751122 [details] MozReview Request: Bug 1259661 part.2 Rename WidgetMouseEvent::context to WidgetMouseEvent::ContextMenuTrigger r?smaug https://reviewboard.mozilla.org/r/51851/#review48805
Comment 29•8 years ago
|
||
Comment on attachment 8751123 [details] MozReview Request: Bug 1259661 part.3 Rename WidgetMouseEvent::exitType to WidgetMouseEvent::ExitFrom r?smaug https://reviewboard.mozilla.org/r/51853/#review48807 ::: widget/cocoa/nsChildView.mm:4591 (Diff revision 1) > NS_OBJC_END_TRY_ABORT_BLOCK; > } > > - (void)sendMouseEnterOrExitEvent:(NSEvent*)aEvent > enter:(BOOL)aEnter > - type:(WidgetMouseEvent::exitType)aType > + exitFrom:(WidgetMouseEvent::ExitFrom)aExitFrom is there some odd indentation here or is MozReview just showing something random
Attachment #8751123 -
Flags: review?(bugs) → review+
Comment 31•8 years ago
|
||
Comment on attachment 8751124 [details] MozReview Request: Bug 1259661 part.4 Rename WidgetMouseEvent::reason to WidgetMouseEvent::mReason r?smaug https://reviewboard.mozilla.org/r/51855/#review48813
Attachment #8751124 -
Flags: review?(bugs) → review+
Comment 32•8 years ago
|
||
Comment on attachment 8751125 [details] MozReview Request: Bug 1259661 part.5 Rename WidgetMouseEvent::context to WidgetMouseEvent::mContextMenuTrigger r?smaug https://reviewboard.mozilla.org/r/51857/#review48817
Attachment #8751125 -
Flags: review?(bugs) → review+
Updated•8 years ago
|
Attachment #8751126 -
Flags: review?(bugs) → review+
Comment 33•8 years ago
|
||
Comment on attachment 8751126 [details] MozReview Request: Bug 1259661 part.6 Rename WidgetMouseEvent::exit to WidgetMouseEvent::mExitFrom r?smaug https://reviewboard.mozilla.org/r/51859/#review48819
Comment 34•8 years ago
|
||
Comment on attachment 8751127 [details] MozReview Request: Bug 1259661 part.7 Get rid of WidgetMouseEvent::acceptActivation because of unused r?smaug https://reviewboard.mozilla.org/r/51861/#review48825
Attachment #8751127 -
Flags: review?(bugs) → review+
Comment 35•8 years ago
|
||
Comment on attachment 8751128 [details] MozReview Request: Bug 1259661 part.8 Rename WidgetMouseEvent::ignoreRootScrollFrame to WidgetMouseEvent::mIgnoreRootScrollFrame r?smaug https://reviewboard.mozilla.org/r/51863/#review48827
Attachment #8751128 -
Flags: review?(bugs) → review+
Comment 36•8 years ago
|
||
Comment on attachment 8751129 [details] MozReview Request: Bug 1259661 part.9 Rename WidgetMouseEvent::clickCount to WidgetMouseEvent::mClickCount r?smaug https://reviewboard.mozilla.org/r/51865/#review48833
Attachment #8751129 -
Flags: review?(bugs) → review+
Comment 37•8 years ago
|
||
Comment on attachment 8751130 [details] MozReview Request: Bug 1259661 part.10 Clean up some nits of WidgetMouseEvent definition r?smaug https://reviewboard.mozilla.org/r/51867/#review48835
Attachment #8751130 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 38•8 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #29) > Comment on attachment 8751123 [details] > MozReview Request: Bug 1259661 part.3 Rename WidgetMouseEvent::exitType to > WidgetMouseEvent::ExitFrom r?smaug > > https://reviewboard.mozilla.org/r/51853/#review48807 > > ::: widget/cocoa/nsChildView.mm:4591 > (Diff revision 1) > > NS_OBJC_END_TRY_ABORT_BLOCK; > > } > > > > - (void)sendMouseEnterOrExitEvent:(NSEvent*)aEvent > > enter:(BOOL)aEnter > > - type:(WidgetMouseEvent::exitType)aType > > + exitFrom:(WidgetMouseEvent::ExitFrom)aExitFrom > > is there some odd indentation here or is MozReview just showing something > random In Objective-C code, we align second or later arguments to first line's ":".
Assignee | ||
Comment 39•8 years ago
|
||
Comment on attachment 8751121 [details] MozReview Request: Bug 1259661 part.1 Rename WidgetMouseEvent::reasonType to WidgetMouseEvent::Reason r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51849/diff/1-2/
Assignee | ||
Comment 40•8 years ago
|
||
Comment on attachment 8751122 [details] MozReview Request: Bug 1259661 part.2 Rename WidgetMouseEvent::context to WidgetMouseEvent::ContextMenuTrigger r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51851/diff/1-2/
Assignee | ||
Comment 41•8 years ago
|
||
Comment on attachment 8751123 [details] MozReview Request: Bug 1259661 part.3 Rename WidgetMouseEvent::exitType to WidgetMouseEvent::ExitFrom r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51853/diff/1-2/
Assignee | ||
Comment 42•8 years ago
|
||
Comment on attachment 8751124 [details] MozReview Request: Bug 1259661 part.4 Rename WidgetMouseEvent::reason to WidgetMouseEvent::mReason r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51855/diff/1-2/
Assignee | ||
Comment 43•8 years ago
|
||
Comment on attachment 8751125 [details] MozReview Request: Bug 1259661 part.5 Rename WidgetMouseEvent::context to WidgetMouseEvent::mContextMenuTrigger r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51857/diff/1-2/
Assignee | ||
Comment 44•8 years ago
|
||
Comment on attachment 8751126 [details] MozReview Request: Bug 1259661 part.6 Rename WidgetMouseEvent::exit to WidgetMouseEvent::mExitFrom r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51859/diff/1-2/
Assignee | ||
Comment 45•8 years ago
|
||
Comment on attachment 8751127 [details] MozReview Request: Bug 1259661 part.7 Get rid of WidgetMouseEvent::acceptActivation because of unused r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51861/diff/1-2/
Assignee | ||
Comment 46•8 years ago
|
||
Comment on attachment 8751128 [details] MozReview Request: Bug 1259661 part.8 Rename WidgetMouseEvent::ignoreRootScrollFrame to WidgetMouseEvent::mIgnoreRootScrollFrame r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51863/diff/1-2/
Assignee | ||
Comment 47•8 years ago
|
||
Comment on attachment 8751129 [details] MozReview Request: Bug 1259661 part.9 Rename WidgetMouseEvent::clickCount to WidgetMouseEvent::mClickCount r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51865/diff/1-2/
Assignee | ||
Comment 48•8 years ago
|
||
Comment on attachment 8751130 [details] MozReview Request: Bug 1259661 part.10 Clean up some nits of WidgetMouseEvent definition r?smaug Review request updated; see interdiff: https://reviewboard.mozilla.org/r/51867/diff/1-2/
Comment 49•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/76a7cdabdd50 https://hg.mozilla.org/integration/mozilla-inbound/rev/80e5afeea2ce https://hg.mozilla.org/integration/mozilla-inbound/rev/31c295b95ce8 https://hg.mozilla.org/integration/mozilla-inbound/rev/80d48f73aa2e https://hg.mozilla.org/integration/mozilla-inbound/rev/6cea19d36ac6 https://hg.mozilla.org/integration/mozilla-inbound/rev/458adc3eac60 https://hg.mozilla.org/integration/mozilla-inbound/rev/426f05e8dfd7 https://hg.mozilla.org/integration/mozilla-inbound/rev/ffe9d3a14fdb https://hg.mozilla.org/integration/mozilla-inbound/rev/45f9098ac7f7 https://hg.mozilla.org/integration/mozilla-inbound/rev/ea5f22cee4e9
Comment 50•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/76a7cdabdd50 https://hg.mozilla.org/mozilla-central/rev/80e5afeea2ce https://hg.mozilla.org/mozilla-central/rev/31c295b95ce8 https://hg.mozilla.org/mozilla-central/rev/80d48f73aa2e https://hg.mozilla.org/mozilla-central/rev/6cea19d36ac6 https://hg.mozilla.org/mozilla-central/rev/458adc3eac60 https://hg.mozilla.org/mozilla-central/rev/426f05e8dfd7 https://hg.mozilla.org/mozilla-central/rev/ffe9d3a14fdb https://hg.mozilla.org/mozilla-central/rev/45f9098ac7f7 https://hg.mozilla.org/mozilla-central/rev/ea5f22cee4e9
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
You need to log in
before you can comment on or make changes to this bug.
Description
•