Closed
Bug 1254755
Opened 9 years ago
Closed 9 years ago
Clean up WidgetKeyboardEvent
Categories
(Core :: Widget, defect)
Core
Widget
Tracking
()
RESOLVED
FIXED
mozilla49
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(6 files)
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
(deleted),
text/x-review-board-request
|
smaug
:
review+
|
Details |
WidgetKeyboardEvent has a lot of members. And some of them don't have "m" prefix, the order of them wastes memory due to bad memory alignment.
Now, we should clean up it.
Assignee | ||
Updated•9 years ago
|
Assignee: masayuki → nobody
Mentor: masayuki
Status: ASSIGNED → NEW
Whiteboard: [good first bug][for Gecko Inside #7 in Mozilla Japan]
hi masayuki I want to work on this one...can you guide me ?
Flags: needinfo?(masayuki)
Assignee | ||
Comment 2•9 years ago
|
||
(In reply to agore1 from comment #1)
> hi masayuki I want to work on this one...can you guide me ?
Ah, sorry, nobody should work on this now because patches for some urgent bugs will be broken by the changes for this bug. Do you want to work on this later? Or do you look for another one?
Flags: needinfo?(masayuki)
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) (offline: 4/29-5/8) from comment #2)
> (In reply to agore1 from comment #1)
> > hi masayuki I want to work on this one...can you guide me ?
>
> Ah, sorry, nobody should work on this now because patches for some urgent
> bugs will be broken by the changes for this bug. Do you want to work on this
> later? Or do you look for another one?
I am looking more bugs to work on.
Assignee | ||
Comment 4•9 years ago
|
||
Sorry for that (removing [good first bug] until urgent bugs are fixed).
Mentor: masayuki
Whiteboard: [good first bug][for Gecko Inside #7 in Mozilla Japan]
Assignee | ||
Comment 5•9 years ago
|
||
Now, it is the change to fix this bug. I'll fix this bug quickly.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•9 years ago
|
||
Assignee | ||
Comment 7•9 years ago
|
||
Assignee | ||
Comment 8•9 years ago
|
||
And also WidgetKeyboardEvent::mKeyCode should be compared with NS_VK_* rather than nsIDOMKeyEvent::DOM_VK_*.
Review commit: https://reviewboard.mozilla.org/r/52720/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52720/
Attachment #8752698 -
Flags: review?(bugs)
Attachment #8752699 -
Flags: review?(bugs)
Attachment #8752700 -
Flags: review?(bugs)
Attachment #8752701 -
Flags: review?(bugs)
Attachment #8752702 -
Flags: review?(bugs)
Attachment #8752703 -
Flags: review?(bugs)
Assignee | ||
Comment 9•9 years ago
|
||
And mCharCode shouldn't be compared with NS_VK_*, nsIDOMKeyEvent::DOM_VK_*. Additionally, when it's compared with a character constant, cast isn't necessary.
Review commit: https://reviewboard.mozilla.org/r/52722/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52722/
Assignee | ||
Comment 10•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/52724/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52724/
Assignee | ||
Comment 11•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/52726/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52726/
Assignee | ||
Comment 12•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/52728/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52728/
Assignee | ||
Comment 13•9 years ago
|
||
For reducing the instance size of WidgetKeyboardEvent, this patch also explicitly defines the type of KeyNameIndex and CodeNameIndex.
Review commit: https://reviewboard.mozilla.org/r/52730/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/52730/
Comment 14•9 years ago
|
||
Comment on attachment 8752698 [details]
MozReview Request: Bug 1254755 part.1 Rename WidgetKeyboardEvent::keyCode to WidgetKeyboardEvent::mKeyCode r?smaug
https://reviewboard.mozilla.org/r/52720/#review49680
::: editor/libeditor/nsHTMLEditor.cpp:632
(Diff revision 1)
> - case nsIDOMKeyEvent::DOM_VK_META:
> - case nsIDOMKeyEvent::DOM_VK_WIN:
> - case nsIDOMKeyEvent::DOM_VK_SHIFT:
> - case nsIDOMKeyEvent::DOM_VK_CONTROL:
> - case nsIDOMKeyEvent::DOM_VK_ALT:
> - case nsIDOMKeyEvent::DOM_VK_BACK_SPACE:
> + case NS_VK_META:
> + case NS_VK_WIN:
> + case NS_VK_SHIFT:
> + case NS_VK_CONTROL:
> + case NS_VK_ALT:
> + case NS_VK_BACK:
Not about this bug, but it is tiny bit odd that we have DOM_VK_BACK_SPACE, but NS_VK_BACK. And there is also KEY_NAME_INDEX_Backspace. Why the NS_ variant misses "space"
Attachment #8752698 -
Flags: review?(bugs) → review+
Comment 15•9 years ago
|
||
Comment on attachment 8752699 [details]
MozReview Request: Bug 1254755 part.2 Rename WidgetKeyboardEvent::charCode to WidgetKeyboardEvent::mCharCode r?smaug
https://reviewboard.mozilla.org/r/52722/#review49682
Attachment #8752699 -
Flags: review?(bugs) → review+
Updated•9 years ago
|
Attachment #8752700 -
Flags: review?(bugs) → review+
Comment 16•9 years ago
|
||
Comment on attachment 8752700 [details]
MozReview Request: Bug 1254755 part.3 Rename WidgetKeyboardEvent::alternativeCharCodes to WidgetKeyboardEvent::mAlternativeCharCodes r?smaug
https://reviewboard.mozilla.org/r/52724/#review49684
Updated•9 years ago
|
Attachment #8752701 -
Flags: review?(bugs) → review+
Comment 17•9 years ago
|
||
Comment on attachment 8752701 [details]
MozReview Request: Bug 1254755 part.4 Rename WidgetKeyboardEvent::location to WidgetKeyboardEvent::mLocation r?smaug
https://reviewboard.mozilla.org/r/52726/#review49686
Updated•9 years ago
|
Attachment #8752702 -
Flags: review?(bugs) → review+
Comment 18•9 years ago
|
||
Comment on attachment 8752702 [details]
MozReview Request: Bug 1254755 part.5 Rename WidgetKeyboardEvent::isChar to WidgetKeyboardEvent::mIsChar r?smaug
https://reviewboard.mozilla.org/r/52728/#review49688
Updated•9 years ago
|
Attachment #8752703 -
Flags: review?(bugs) → review+
Comment 19•9 years ago
|
||
Comment on attachment 8752703 [details]
MozReview Request: Bug 1254755 part.6 Reorder the members of WidgetKeyboardEvent for reducing its instance size r?smaug
https://reviewboard.mozilla.org/r/52730/#review49690
Comment 20•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5ebc59c69d1b
https://hg.mozilla.org/integration/mozilla-inbound/rev/328c0d5ad23a
https://hg.mozilla.org/integration/mozilla-inbound/rev/b3c7c85f2f8a
https://hg.mozilla.org/integration/mozilla-inbound/rev/5a0ad8a0a57c
https://hg.mozilla.org/integration/mozilla-inbound/rev/c54083f23a0b
https://hg.mozilla.org/integration/mozilla-inbound/rev/841672e8aaf1
Comment 21•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5ebc59c69d1b
https://hg.mozilla.org/mozilla-central/rev/328c0d5ad23a
https://hg.mozilla.org/mozilla-central/rev/b3c7c85f2f8a
https://hg.mozilla.org/mozilla-central/rev/5a0ad8a0a57c
https://hg.mozilla.org/mozilla-central/rev/c54083f23a0b
https://hg.mozilla.org/mozilla-central/rev/841672e8aaf1
Status: ASSIGNED → RESOLVED
Closed: 9 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
•