Closed
Bug 1297342
Opened 8 years ago
Closed 8 years ago
"reserved" attribute should be on <key> elements instead of <command> ones
Categories
(Core :: XUL, defect)
Core
XUL
Tracking
()
RESOLVED
FIXED
mozilla53
Tracking | Status | |
---|---|---|
firefox53 | --- | fixed |
People
(Reporter: Gijs, Assigned: enndeakin)
References
Details
Attachments
(1 file)
16.69 KB,
patch
|
Felipe
:
review+
|
Details | Diff | Splinter Review |
It's not clear to me why the "reserved" attribute was added on command elements instead of <key> ones. AIUI, because the keys are the things we're actually "blocking" content from seeing / getting, it would make more sense to have the attribute directly on those elements than via 1 level of indirection on the <command> they refer to. The current implementation also means that you need that level of indirection, whereas without it you can just use an oncommand attribute on a <key> element without having to create a <command> element. This hurt us in bug 1296863 when we tried to detach the accel-t binding from the <command> element to make some of the code a bit saner.
Masayuki-san, Felipe, do either of you know why this lives on <command> elements instead?
Comment 1•8 years ago
|
||
I don't know, I was involved when we got some bug reports about the implementation.
I think that available either <command> or <key> is better.
Updated•8 years ago
|
Component: XBL → XUL
Updated•8 years ago
|
Flags: needinfo?(felipc)
Comment 2•8 years ago
|
||
I don't recall if there was a solid reasoning or if it was just implementation simplicity. Trying to back-fill a reason, I believe that it's the action that should be reserved (e.g. "it shouldn't be possible to prevent a user from creating a new tab") instead of the key ("it shouldn't be possible to prevent a user from using ctrl + t").
But if changing it will make things better I'm not opposed.
Flags: needinfo?(felipc)
Comment 3•8 years ago
|
||
A <key> is always associated with an action, so I fail to see how putting the attribute on the <command> provides any benefit.
Assignee | ||
Comment 4•8 years ago
|
||
Comment 5•8 years ago
|
||
Comment on attachment 8825796 [details] [diff] [review]
Move reserved attribute to keys
Review of attachment 8825796 [details] [diff] [review]:
-----------------------------------------------------------------
The code looks sane to me. But I know that a lot of this reserved handling has changed since the first version to deal with the non-e10s case, so I'm not 100% if this is enough. Did you test both on e10s and non-e10s?
Attachment #8825796 -
Flags: review?(felipc) → review+
Assignee | ||
Comment 6•8 years ago
|
||
> Did you test both on e10s and non-e10s?
Yes, it works in both.
Assignee | ||
Comment 7•8 years ago
|
||
Assignee | ||
Comment 8•8 years ago
|
||
Assignee | ||
Comment 9•8 years ago
|
||
Comment 10•8 years ago
|
||
Pushed by neil@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/c8db5ac137c5
reserved attribute should be on key element not on the command, r=felipe
Comment 11•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox53:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Updated•8 years ago
|
status-firefox51:
affected → ---
You need to log in
before you can comment on or make changes to this bug.
Description
•