Closed
Bug 769190
Opened 13 years ago
Closed 13 years ago
Should change the acceptable value of the argument of getModifierState()
Categories
(Core :: DOM: Events, defect)
Core
DOM: Events
Tracking
()
RESOLVED
FIXED
mozilla16
Tracking | Status | |
---|---|---|
firefox13 | --- | unaffected |
firefox14 | --- | unaffected |
firefox15 | --- | verified |
firefox16 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
References
Details
Attachments
(2 files)
6.92 KB,
patch
|
smaug
:
review+
jst
:
superreview+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
10.56 KB,
patch
|
smaug
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The D3E spec was updated:
http://dev.w3.org/2006/webapi/DOM-Level-3-Events/html/DOM3-Events.html#events-KeyboardEvent-getModifierState
The "Scroll" is renamed to "ScrollLock". And "Win" is renamed to "OS". The new values are also defined in the key value list.
However, if we changed them, that would break the compatibility with IE9, any idea, smaug? Should we support both values? Or should we just drop supporting legacy values? WebKit hasn't supported this API yet. So, I think this isn't used on so many sites.
Assignee | ||
Updated•13 years ago
|
status-firefox13:
--- → unaffected
status-firefox14:
--- → unaffected
status-firefox15:
--- → affected
status-firefox16:
--- → affected
Assignee | ||
Comment 1•13 years ago
|
||
This is the minimal patch fixing the behavior for the latest D3E spec.
Attachment #639264 -
Flags: review?(bugs)
Assignee | ||
Comment 2•13 years ago
|
||
This patch renames the internal constants and methods.
Attachment #639266 -
Flags: review?(bugs)
Assignee | ||
Comment 3•13 years ago
|
||
After we implement KeyboardEvent.getModifierState() and MouseEvent.getModifierState(), the spec for the argument of these methods were changed. "Scroll" was renamed to "ScrollLock" and "Win" was renamed to "OS". We should fix the key names before releasing our first implemented version (Fx15).
tracking-firefox15:
--- → ?
Updated•13 years ago
|
Attachment #639264 -
Flags: review?(bugs) → review+
Updated•13 years ago
|
Attachment #639266 -
Flags: review?(bugs) → review+
Assignee | ||
Updated•13 years ago
|
Attachment #639264 -
Flags: superreview?(jst)
Updated•13 years ago
|
Attachment #639264 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 4•13 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/013bdf414357
https://hg.mozilla.org/integration/mozilla-inbound/rev/c41bf7b9364c
Target Milestone: --- → mozilla16
Assignee | ||
Comment 5•13 years ago
|
||
Comment on attachment 639264 [details] [diff] [review]
part.1 Rename Scroll and Win to ScrollLock and OS for the argument of getModifierState()
[Approval Request Comment]
Bug caused by (feature/regressing bug #): Starting Fx15, Gecko supports DOM Level3 Events KeyboardEvent.getModifierState() and MouseEvent.getModifierState(). They has an argument whose value is a key name of checking modifier state. In the latest draft, two key names are changed: "Scroll" -> "ScrollLock", "Win" -> "OS". We should use the new standard key names instead of the older draft's names.
User impact if declined: If we wouldn't land them on Fx15, Fx15 would provide "wrong" API for web developers. It might cause compatibility problem in the future. However, the methods have not been supported on WebKit yet. Therefore, the possibility isn't high.
Testing completed (on m-c, etc.): This patch includes the test.
Risk to taking this patch (and alternatives if risky): This patch changes the new constant names in nsIDOMWindowUtils. They were implemented for testing the new APIs. If some addons used them when it worked on Nightly or Aurora, the compatibility would be broken if they checked the two keys' state. However, I think that such problem should be fixed in the addons.
String or UUID changes made by this patch: Just changed the constants of nsIDOMWindowUtils. So, the UUID isn't changed.
Attachment #639264 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 6•13 years ago
|
||
Comment on attachment 639266 [details] [diff] [review]
part.2 Rename nsInputEvent::IsWin() and widget::MODIFIER_(SCROLL|WIN) to nsInputEvent::IsOS() and widget::MODIFIER_(SCROLLLOCK|OS)
[Approval Request Comment]
Bug caused by (feature/regressing bug #): See previous comment. This patch only changes the internal constants and method names for the new key names.
User impact if declined: none.
Testing completed (on m-c, etc.): The tests in previous patch covers this too.
Risk to taking this patch (and alternatives if risky): Noting but something to be unexpected might happen though...
String or UUID changes made by this patch: No.
The part.1 patch is minimal patch for fixing this bug. This part.2 patch isn't so important. If we wouldn't land this patch on Aurora, it would cause rejecting some patches which were created for mozilla-central. But it's not important.
Attachment #639266 -
Flags: approval-mozilla-aurora?
Comment 7•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/013bdf414357
https://hg.mozilla.org/mozilla-central/rev/c41bf7b9364c
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Comment 8•13 years ago
|
||
Comment on attachment 639264 [details] [diff] [review]
part.1 Rename Scroll and Win to ScrollLock and OS for the argument of getModifierState()
[Triage Comment]
Let's take these correctness patches if we do land on top of this code. Otherwise, it's not clear we need these from the user perspective.
Attachment #639264 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Updated•13 years ago
|
Attachment #639266 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora-
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Alex Keybl [:akeybl] from comment #8)
> Comment on attachment 639264 [details] [diff] [review]
> part.1 Rename Scroll and Win to ScrollLock and OS for the argument of
> getModifierState()
>
> [Triage Comment]
> Let's take these correctness patches if we do land on top of this code.
Sorry, I don't understand what did "land on top of this code" mean.
> Otherwise, it's not clear we need these from the user perspective.
IE9 is using the older draft's values (i.e., "Scroll" and "Win"). If Fx15 would ship without these patches, some web applications would not work fine on Fx16 or later if they are tested with Fx15 and their developers don't know the changes of the values in D3E draft. If we use the new values (i.e., "ScrollLock" and "OS") from the first release of the API (i.e., Fx15), we can appeal the difference in the new feature list.
Comment 10•13 years ago
|
||
(In reply to Masayuki Nakano (:masayuki) (Mozilla Japan) from comment #9)
> (In reply to Alex Keybl [:akeybl] from comment #8)
> > [Triage Comment]
> > Let's take these correctness patches if we do land on top of this code.
>
> Sorry, I don't understand what did "land on top of this code" mean.
>
> > Otherwise, it's not clear we need these from the user perspective.
>
> IE9 is using the older draft's values (i.e., "Scroll" and "Win"). If Fx15
> would ship without these patches, some web applications would not work fine
> on Fx16 or later if they are tested with Fx15 and their developers don't
> know the changes of the values in D3E draft. If we use the new values (i.e.,
> "ScrollLock" and "OS") from the first release of the API (i.e., Fx15), we
> can appeal the difference in the new feature list.
Hi Masayuki - your original approval request noted that "User impact if declined: none." The justification above does appear to be user impact. Given that, approving.
Updated•13 years ago
|
Attachment #639264 -
Flags: approval-mozilla-aurora- → approval-mozilla-aurora+
Updated•13 years ago
|
Attachment #639266 -
Flags: approval-mozilla-aurora- → approval-mozilla-aurora+
Updated•13 years ago
|
Assignee | ||
Comment 11•13 years ago
|
||
I meant that the first patch has the impact for users but the second patch only cleans the code.
https://hg.mozilla.org/releases/mozilla-aurora/rev/b0b269418ecb
https://hg.mozilla.org/releases/mozilla-aurora/rev/28f2c543ac9f
Assignee | ||
Comment 12•13 years ago
|
||
updated some documents in MDN:
https://developer.mozilla.org/en/Firefox_15_for_developers#section_4
https://developer.mozilla.org/en/DOM/KeyboardEvent#section_7
Comment 14•13 years ago
|
||
content/events/test/test_dom_keyboard_event.html and content/events/test/test_dom_mouse_event.html verify this bug fix and they are passing on all the OSs:
https://tbpl.mozilla.org/php/getParsedLog.php?id=14176088&full=1&branch=mozilla-beta
https://tbpl.mozilla.org/php/getParsedLog.php?id=14174223&full=1&branch=mozilla-beta
https://tbpl.mozilla.org/php/getParsedLog.php?id=14179177&full=1&branch=mozilla-beta
https://tbpl.mozilla.org/php/getParsedLog.php?id=14178606&full=1&branch=mozilla-beta
You need to log in
before you can comment on or make changes to this bug.
Description
•