Closed
Bug 961531
Opened 11 years ago
Closed 10 years ago
Remove inline script / style in browser/devtools/shadereditor/shadereditor.xul
Categories
(DevTools Graveyard :: WebGL Shader Editor, defect)
DevTools Graveyard
WebGL Shader Editor
Tracking
(firefox43 fixed)
RESOLVED
FIXED
Firefox 43
| Tracking | Status | |
|---|---|---|
| firefox43 | --- | fixed |
People
(Reporter: bgrins, Assigned: amovah, Mentored)
References
(Blocks 1 open bug)
Details
(Whiteboard: [lang=html][good first bug][lang=js])
Attachments
(3 files)
|
2.02 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.11 KB,
patch
|
bgrins
:
feedback+
|
Details | Diff | Splinter Review |
|
2.74 KB,
patch
|
bgrins
:
review+
|
Details | Diff | Splinter Review |
https://mxr.mozilla.org/mozilla-central/source/browser/devtools/shadereditor/shadereditor.xul
There is an inline event handler on the requests-menu-reload-notice-button element. This should be moved into shadereditor.js. Victor, please correct me if you think it should be elsewhere, but I'm thinking it should be added and removed in EventsHandler.initialize and EventsHandler.destroy.
Comment 1•11 years ago
|
||
Thank you Brian. Can you please assign me in?
| Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Malintha Fernando from comment #1)
> Thank you Brian. Can you please assign me in?
Sure :). And if you haven't seen it already, take a look at our guide for getting DevTools built and running: https://wiki.mozilla.org/DevTools/Hacking. You may also need to enable the shader editor panel in the DevTools options pane if you don't see it as an available tab.
Assignee: nobody → malinthak2
Updated•11 years ago
|
Status: NEW → ASSIGNED
Comment 3•11 years ago
|
||
Removed scripts/styles from browser/devtools/shadereditor/shadereditor.xul
Please tell me if any changes are required.
Cheers!
Attachment #8375412 -
Flags: feedback+
| Reporter | ||
Comment 4•11 years ago
|
||
Comment on attachment 8375412 [details] [diff] [review]
Proposing a patch for Bug 961531
Review of attachment 8375412 [details] [diff] [review]:
-----------------------------------------------------------------
FYI, if you'd like feedback on the patch you can mark feedback ? and enter a user name in the box, or leave the box blank if you don't know who. In this case you can enter :bgrins.
::: browser/devtools/shadereditor/shadereditor.js
@@ +52,5 @@
> * The current target and the WebGL Editor front, set by this tool's host.
> */
> let gToolbox, gTarget, gFront;
> +document.addEventListener("DOMContentLoaded", function() {
> + let requests-menu-reload-notice-button = document.getElementById("requests-menu-reload-notice-button");
This is not valid JavaScript. I'd suggest you open the Shader Editor with the patch applied to test out the changes.
Secondly, rather than putting this in a new DOMContentLoaded handler, the button should have an addEventListener call in the EventsHandler.initialize function, and a removeEventListener call in the EventsHandler.destroy function.
You can use $("#requests-menu-reload-notice-button") as a helper function to get ahold of the button element in both places.
Attachment #8375412 -
Flags: feedback+
Comment 5•11 years ago
|
||
Sorry for the delay. I'm working on this.
Comment 7•11 years ago
|
||
Mike - Sorry, I got engaged in one of the GSoC projects. So may not be able to look in to this for some time. You can take this if you like. :)
Flags: needinfo?(malinthak2)
Updated•11 years ago
|
Mentor: bgrinstead
Whiteboard: [mentor=bgrins][lang=html][good first bug][lang=js] → [lang=html][good first bug][lang=js]
Comment 8•10 years ago
|
||
Based on comment 7 unassigned the bug.
Assignee: malinthak2 → nobody
Status: ASSIGNED → NEW
| Assignee | ||
Comment 9•10 years ago
|
||
Hi, I'm interested in to fix this issue. May you assign me to this bug?
Comment 10•10 years ago
|
||
Hi, Ali - Go for it! Feel free to ask Brian if you have questions, by checking the "Need more information" box below, and picking "mentor".
Thanks!
Assignee: nobody → ali_movahedi
| Assignee | ||
Comment 11•10 years ago
|
||
Attachment #8652714 -
Flags: review?(bgrinstead)
| Reporter | ||
Comment 12•10 years ago
|
||
Comment on attachment 8652714 [details] [diff] [review]
Move inline event handle from shadereditor.xul to shadereditor.js
Review of attachment 8652714 [details] [diff] [review]:
-----------------------------------------------------------------
Looks great, thanks Ali! I've included a couple of minor notes, but this looks ready to go after those are updated. Also, in the commit message, can you replace 'event handle' with 'event handler'? You can re-upload a patch and flag me for review again after that.
::: browser/devtools/shadereditor/shadereditor.js
@@ +64,5 @@
> EventsHandler.initialize(),
> ShadersListView.initialize(),
> ShadersEditorsView.initialize()
> ]);
> }
Please re-add the new line between these two functions
@@ +114,5 @@
> +
> + /**
> + * Handle a command event on reload button
> + */
> + _onCommand() {
Maybe rename this function to _onReloadCommand
Attachment #8652714 -
Flags: review?(bgrinstead) → feedback+
| Assignee | ||
Comment 13•10 years ago
|
||
Attachment #8653342 -
Flags: review?(bgrinstead)
| Assignee | ||
Updated•10 years ago
|
Attachment #8653342 -
Attachment description: Remove inline script → Move inline event handler form shadereditor.xul to shadereditor.js
| Reporter | ||
Comment 14•10 years ago
|
||
Comment on attachment 8653342 [details] [diff] [review]
Move inline event handler form shadereditor.xul to shadereditor.js
Review of attachment 8653342 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good to me. Here's a try push: https://treeherder.mozilla.org/#/jobs?repo=try&revision=3e701d5364fa
Attachment #8653342 -
Flags: review?(bgrinstead) → review+
| Reporter | ||
Comment 15•10 years ago
|
||
I'll push this to fxteam once the tree is opened again
| Reporter | ||
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 17•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox43:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Updated•7 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
•