Sort out DOM key name definition by groups in D3E draft

RESOLVED FIXED in mozilla32

Status

()

Core
DOM: Events
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: masayuki, Assigned: masayuki)

Tracking

Trunk
mozilla32
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(13 attachments, 5 obsolete attachments)

13.76 KB, patch
smaug
: review+
Details | Diff | Splinter Review
5.83 KB, patch
smaug
: review+
Details | Diff | Splinter Review
8.04 KB, patch
smaug
: review+
Details | Diff | Splinter Review
7.50 KB, patch
smaug
: review+
Details | Diff | Splinter Review
8.40 KB, patch
smaug
: review+
Details | Diff | Splinter Review
4.51 KB, patch
smaug
: review+
Details | Diff | Splinter Review
4.80 KB, patch
smaug
: review+
Details | Diff | Splinter Review
3.51 KB, patch
smaug
: review+
Details | Diff | Splinter Review
8.53 KB, patch
smaug
: review+
Details | Diff | Splinter Review
5.67 KB, patch
smaug
: review+
Details | Diff | Splinter Review
15.59 KB, patch
smaug
: review+
Details | Diff | Splinter Review
12.94 KB, patch
smaug
: review+
Details | Diff | Splinter Review
5.16 KB, patch
smaug
: review+
Details | Diff | Splinter Review
Comment hidden (empty)
Created attachment 8428777 [details] [diff] [review]
part.1 Sort out key names in Modifier Keys section
Created attachment 8428778 [details] [diff] [review]
part.2 Sort out key names in Whitespace Keys section
Created attachment 8428780 [details] [diff] [review]
part.3 Sort out key names in Navigation Keys section
Created attachment 8428781 [details] [diff] [review]
part.4 Sort out key names in Editing Keys section
Created attachment 8428782 [details] [diff] [review]
part.5 Sort out key names in UI Keys section
Created attachment 8428783 [details] [diff] [review]
part.6 Sort out key names in Device Keys section
Created attachment 8428785 [details] [diff] [review]
part.7 Sort out key names in IME and Composition Keys section
Created attachment 8428786 [details] [diff] [review]
part.8 Sort out key names in General-Purpose Function Keys section
Created attachment 8428787 [details] [diff] [review]
part.9 Sort out key names in Multimedia Keys section
Created attachment 8428788 [details] [diff] [review]
part.10 Sort out key names in Application Keys section
Created attachment 8428789 [details] [diff] [review]
part.11 Sort out key names in Browser Keys section
Created attachment 8428790 [details] [diff] [review]
part.12 Sort out key names in Media Controller Keys section
Created attachment 8428791 [details] [diff] [review]
part.13 Sort out deprecated key names
Comment on attachment 8428777 [details] [diff] [review]
part.1 Sort out key names in Modifier Keys section

The key value definition wasn't grouped when we implement this.

However, now, key values are grouped in each section.
https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3Events-key.html

For easier to maintain the key values, we should sort out KeyNameList.h and NativeKeyToDOMKeyName.h with same order as the spec.

Additionally, now, we have string values of all keys in static variable. For reducing the footprint, let's comment out the keys which are not used on any platforms. They have "// Not used" comment in their end of lines. I'll remove this redundant comment at landing. I added it only for easier to review.

And also this patch remove the macro for OS/2. It's never used since we dropped OS/2 support.
Attachment #8428777 - Flags: review?(bugs)
Attachment #8428778 - Flags: review?(bugs)
Attachment #8428780 - Flags: review?(bugs)
Attachment #8428781 - Flags: review?(bugs)
Created attachment 8428969 [details] [diff] [review]
part.5 Sort out key names in UI Keys section
Attachment #8428782 - Attachment is obsolete: true
Attachment #8428969 - Flags: review?(bugs)
Created attachment 8428971 [details] [diff] [review]
part.6 Sort out key names in Device Keys section
Attachment #8428783 - Attachment is obsolete: true
Attachment #8428971 - Flags: review?(bugs)
Attachment #8428785 - Flags: review?(bugs)
Attachment #8428786 - Flags: review?(bugs)
Attachment #8428787 - Flags: review?(bugs)
Attachment #8428788 - Flags: review?(bugs)
Attachment #8428789 - Flags: review?(bugs)
Created attachment 8428984 [details] [diff] [review]
part.12 Sort out key names in Media Controller Keys section
Attachment #8428790 - Attachment is obsolete: true
Attachment #8428984 - Flags: review?(bugs)
Comment on attachment 8428791 [details] [diff] [review]
part.13 Sort out deprecated key names

Removing unused key values which are dropped from the spec.
Attachment #8428791 - Flags: review?(bugs)
Created attachment 8429817 [details] [diff] [review]
part.7 Sort out key names in IME and Composition Keys section

Updating for today's telecon :-)
Attachment #8428785 - Attachment is obsolete: true
Attachment #8428785 - Flags: review?(bugs)
Attachment #8429817 - Flags: review?(bugs)
Created attachment 8429818 [details] [diff] [review]
part.8 Sort out key names in General-Purpose Function Keys section
Attachment #8428786 - Attachment is obsolete: true
Attachment #8428786 - Flags: review?(bugs)
Attachment #8429818 - Flags: review?(bugs)
Comment on attachment 8428777 [details] [diff] [review]
part.1 Sort out key names in Modifier Keys section


>+/******************************************************************************
>+ * Modifier Keys
>+ *****************************************************************************/
>+DEFINE_KEYNAME_WITH_SAME_NAME(Alt)

The spec has Accel before Alt, but Accel is ofc rather special
Attachment #8428777 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428778 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428780 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428781 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428787 - Flags: review?(bugs) → review+
Comment on attachment 8428788 [details] [diff] [review]
part.10 Sort out key names in Application Keys section

The Apps change doesn't seem to belong to this patch, but fine.
Attachment #8428788 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428789 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428969 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8428971 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8429818 - Flags: review?(bugs) → review+
Comment on attachment 8428984 [details] [diff] [review]
part.12 Sort out key names in Media Controller Keys section

># HG changeset patch
># User Masayuki Nakano <masayuki@d-toybox.com>
># Parent 60ca539096c06ff0b954613bdd79bf10910abd67
>Bug 939006 part.12 Sort out key names in Media Controller Keys section r=
>
>diff --git a/dom/events/KeyNameList.h b/dom/events/KeyNameList.h
>--- a/dom/events/KeyNameList.h
>+++ b/dom/events/KeyNameList.h
>@@ -264,21 +264,91 @@ DEFINE_KEYNAME_WITH_SAME_NAME(LaunchAppl
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserBack)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserFavorites)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserForward)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserHome)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserRefresh)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserSearch)
> DEFINE_KEYNAME_WITH_SAME_NAME(BrowserStop)
> 
>-DEFINE_KEYNAME_WITH_SAME_NAME(Apps)
>-DEFINE_KEYNAME_WITH_SAME_NAME(List)
>+/******************************************************************************
>+ * Media Controller Keys
>+ *****************************************************************************/
>+// DEFINE_KEYNAME_WITH_SAME_NAME(AudioBalanceLeft) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(AudioBalanceRight) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(AudioBassBoostDown)
>+DEFINE_KEYNAME_WITH_SAME_NAME(AudioBassBoostUp)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(AudioFaderFront) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(AudioFaderRear) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(AudioSurroundModeNext) // Not used

There should be some AVRInput and AVRPower here

>+DEFINE_KEYNAME_WITH_SAME_NAME(ChannelDown)
>+DEFINE_KEYNAME_WITH_SAME_NAME(ChannelUp)
>+DEFINE_KEYNAME_WITH_SAME_NAME(Red) // Rename to ColorF0Red
>+DEFINE_KEYNAME_WITH_SAME_NAME(Green) // Rename to ColorF1Green
>+DEFINE_KEYNAME_WITH_SAME_NAME(Yellow) // Rename to ColorF2Yellow
>+DEFINE_KEYNAME_WITH_SAME_NAME(Blue) // Rename to ColorF3Blue
>+// DEFINE_KEYNAME_WITH_SAME_NAME(Grey) // Rename to ColorF4Grey // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(Brown) // Rename to ColorF5Brown // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ClosedCaptionToggle)
>+DEFINE_KEYNAME_WITH_SAME_NAME(Dimmer)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(DisplaySwap) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(Exit)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ClearFavorite0) // Rename to FavoriteClear0 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ClearFavorite1) // Rename to FavoriteClear1 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ClearFavorite2) // Rename to FavoriteClear2 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ClearFavorite3) // Rename to FavoriteClear3 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RecallFavorite0) // Rename to FavoriteRecall0 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RecallFavorite1) // Rename to FavoriteRecall1 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RecallFavorite2) // Rename to FavoriteRecall2 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RecallFavorite3) // Rename to FavoriteRecall3 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(StoreFavorite0) // Rename to FavoriteStore0 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(StoreFavorite1) // Rename to FavoriteStore1 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(StoreFavorite2) // Rename to FavoriteStore2 // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(StoreFavorite3) // Rename to FavoriteStore3 // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(Guide)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(NextDay) // Rename to GuideNextDay // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PrevDay) // Rename to GuidePreviousDay // Not used
> DEFINE_KEYNAME_WITH_SAME_NAME(Info)
>-DEFINE_KEYNAME_WITH_SAME_NAME(Exit)
>-DEFINE_KEYNAME_WITH_SAME_NAME(Zoom)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(InstantReplay) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(Link) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(List) // Rename to ListProgram // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(Live) // Rename to LiveContent
>+// DEFINE_KEYNAME_WITH_SAME_NAME(Lock) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(Apps) // Rename to MediaApps
>+DEFINE_KEYNAME_WITH_SAME_NAME(FastFwd) // Rename to MediaFastForward
>+DEFINE_KEYNAME_WITH_SAME_NAME(MediaLast)
>+DEFINE_KEYNAME_WITH_SAME_NAME(MediaPause)
>+DEFINE_KEYNAME_WITH_SAME_NAME(MediaPlay)
>+DEFINE_KEYNAME_WITH_SAME_NAME(MediaRecord)
>+DEFINE_KEYNAME_WITH_SAME_NAME(MediaRewind)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(MediaSkip)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(NextFavoriteChannel) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(NextUserProfile) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(OnDemand) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PinPDown) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PinPMove) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(PinPToggle)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PinPUp) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PlaySpeedDown) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PlaySpeedReset) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(PlaySpeedUp) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(RandomToggle)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RcLowBattery)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RecordSpeedNext) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(RfBypass) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ScanChannelsToggle) // Not used
>+// DEFINE_KEYNAME_WITH_SAME_NAME(ScreenModeNext) // Not used
>+DEFINE_KEYNAME_WITH_SAME_NAME(Settings)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(SplitScreenToggle) // Not used
STBInput and STBPower are missing here



>+DEFINE_KEYNAME_WITH_SAME_NAME(Subtitle)
>+// DEFINE_KEYNAME_WITH_SAME_NAME(Teletext) // Not used
There should be TV, TVInput and TVPower here
Attachment #8428984 - Flags: review?(bugs) → review+

Updated

4 years ago
Attachment #8429817 - Flags: review?(bugs) → review+
Comment on attachment 8428791 [details] [diff] [review]
part.13 Sort out deprecated key names

>+/******************************************************************************
>+ * Deplicated
Deprecated
Attachment #8428791 - Flags: review?(bugs) → review+
Thank you!

(In reply to Olli Pettay [:smaug] from comment #21)
> >+/******************************************************************************
> >+ * Modifier Keys
> >+ *****************************************************************************/
> >+DEFINE_KEYNAME_WITH_SAME_NAME(Alt)
> 
> The spec has Accel before Alt, but Accel is ofc rather special

What's the "ofc"?

(In reply to Olli Pettay [:smaug] from comment #23)
> Comment on attachment 8428984 [details] [diff] [review]
> part.12 Sort out key names in Media Controller Keys section

Thank you point them. They are added today ;-)
Flags: needinfo?(bugs)
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #25)
> What's the "ofc"?
"of course" :)
Flags: needinfo?(bugs)
I see. I'll land them when m-i becomes open.
(In reply to Olli Pettay [:smaug] from comment #24)
> Comment on attachment 8428791 [details] [diff] [review]
> part.13 Sort out deprecated key names
> 
> >+/******************************************************************************
> >+ * Deplicated
> Deprecated

Oops, there are two mistakes... I fixed only one point. I'll fix the other point when I'll change around here.
You need to log in before you can comment on or make changes to this bug.