Closed
Bug 1028234
Opened 10 years ago
Closed 10 years ago
Allow command buttons to use target to define the current target rather than tab
Categories
(DevTools Graveyard :: Graphic Commandline and Toolbar, defect)
DevTools Graveyard
Graphic Commandline and Toolbar
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 33
People
(Reporter: jwalker, Assigned: jwalker)
Details
Attachments
(1 file, 1 obsolete file)
6.61 KB,
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
The event to update the state of a command button currently requires a tab as the event argument. This will break with e10s, also 'target' is the right thing to do here.
Assignee | ||
Comment 1•10 years ago
|
||
This bug will not attempt to remove all places where 'tab' is used. That will be for a follow-up bug.
Assignee | ||
Comment 2•10 years ago
|
||
Comment 3•10 years ago
|
||
Comment on attachment 8443545 [details] [diff] [review] 0002-Bug-1028234-Allow-command-buttons-to-use-target-r-bg.patch Review of attachment 8443545 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. Maybe some tests will need to change now if they were checking for the 'checked' attribute on the button immediately - worth a try push ::: browser/devtools/shared/DeveloperToolbar.jsm @@ +133,5 @@ > + * a tab property. > + */ > + let onChange = (eventName, ev) => { > + if (ev.target == target || ev.tab == target.tab) { > + let reply = command.state.isChecked(target); So I presume the return type of isChecked is going to change to a promise in the future as each command becomes e10s compliant? Not sure if this interface is documented anywhere, but it should be updated if so
Attachment #8443545 -
Flags: review?(bgrinstead) → review+
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #3) > Comment on attachment 8443545 [details] [diff] [review] > 0002-Bug-1028234-Allow-command-buttons-to-use-target-r-bg.patch > > Review of attachment 8443545 [details] [diff] [review]: > ----------------------------------------------------------------- > > Looks good to me. Maybe some tests will need to change now if they were > checking for the 'checked' attribute on the button immediately - worth a try > push > > ::: browser/devtools/shared/DeveloperToolbar.jsm > @@ +133,5 @@ > > + * a tab property. > > + */ > > + let onChange = (eventName, ev) => { > > + if (ev.target == target || ev.tab == target.tab) { > > + let reply = command.state.isChecked(target); > > So I presume the return type of isChecked is going to change to a promise in > the future as each command becomes e10s compliant? Not sure if this > interface is documented anywhere, but it should be updated if so The problem is very annoying. TargetFactory.forTab returns a target that might not be remoted. The developer toolbar executes against the current tab, so any keypress in GCLI might be against an unremoted target. This is a symptom of this problem. E10S or merging GCLI into the toolbox will fix this, but I want to avoid patches exploding too much, so this is a hack. I'll post an update soon that avoids breaking webconsole tests.
Assignee | ||
Comment 5•10 years ago
|
||
This differs from the previous patch in that onChange in DeveloperToolbar.jsm now checks to see if the reply from isChecked is a promise so it can deal with non-promises synchronously.
Attachment #8443545 -
Attachment is obsolete: true
Comment 6•10 years ago
|
||
Comment on attachment 8444374 [details] [diff] [review] 0002-Bug-1028234-Allow-command-buttons-to-use-target-r-bg.patch Review of attachment 8444374 [details] [diff] [review]: ----------------------------------------------------------------- Looks fine to me with a green try push
Attachment #8444374 -
Flags: review+
Assignee | ||
Comment 7•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=d8d6fce40dbd
Assignee | ||
Comment 8•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Fx-Team&rev=5def913879a7 https://hg.mozilla.org/integration/fx-team/rev/5def913879a7
https://hg.mozilla.org/mozilla-central/rev/5def913879a7
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 33
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•