Closed
Bug 980919
Opened 11 years ago
Closed 10 years ago
Ensure devtools/app-manager/content/*.xhtml is free of inline script and styles.
Categories
(DevTools Graveyard :: WebIDE, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1007061
People
(Reporter: mgoodwin, Unassigned)
References
(Blocks 1 open bug)
Details
There are a number of xhtml documents in devtools/app-manager/content/ that have inline scripts and styles. These will break when we attempt to apply a content security policy so it'd be nice to clean these up.
A quick look reveals a number instances of script attributes (e.g. oncommand), some instances of style attributes (e.g. style="display:none") and a few inline scripts.
It might make sense to deal with these at the same time as bug 980335.
Whiteboard: [good first bug][lang=html][mentor=jryans]
Hello. I would like to be assigned to this bug. Could you guide me as to where to start?
Thanks for offering to help out!
Please take a look at the Dev Tools hacking[1] guide to get started with our code base. Another good resource is the Mercurial FAQ[2].
This bug involves moving inline code and styles out of the pages used in the App Manager. All of these files are in browser/devtools/app-manager/content in the source tree.
It may be helpful to review other similar bugs[3], especially resolved ones, if you unsure what's needed here. Also, please feel free to ask questions here or on IRC (#devtools).
[1]: https://wiki.mozilla.org/DevTools/Hacking
[2]: https://developer.mozilla.org/en-US/docs/Mercurial_FAQ#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
[3]: https://bugzilla.mozilla.org/showdependencytree.cgi?id=960728&hide_resolved=0
Assignee: nobody → abhishekrm
Status: NEW → ASSIGNED
Thanks! I am doing a firefox build now, following https://developer.mozilla.org/en-US/docs/Simple_Firefox_build. As soon as that's done, I'll start working on the bug. :)
Sorry for the delay. I am still working on this. I see some inline script in help.xhtml:38. To which file am I suppose to move it?
(In reply to zack from comment #5)
> Sorry for the delay. I am still working on this. I see some inline script in
> help.xhtml:38. To which file am I suppose to move it?
You should add a new help.js script file to that page, similar to the other pages.
You'll also need to add an entry to browser/devtools/jar.mn for the new JS file. Search for the other JS files in app-manager to get an idea of what to do here.
I created a new help.js file and moved the inline script there. I also made the necessary changes to the jar.mn file. But I am not able to set up mercurial to generate a patch. It gives me an error everytime I do ./mach mercurial-setup. What do I do?
Hmm, I am not familiar with that command, as I've always set it up myself. I'd suggest either setting up this manual configuration[1] or join the #build room on IRC, where they can help you work out issues with "mach mercurial-setup".
[1]: https://developer.mozilla.org/en-US/docs/Installing_Mercurial#Basic_configuration
Comment 9•11 years ago
|
||
Posting the precise error that you get would be helpful.
Comment 10•11 years ago
|
||
Sorry, was on a break. Here is the error that I get.
Error running mach:
['mercurial-setup']
The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.
You should consider filing a bug for this issue.
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
CalledProcessError: Command '[u'/usr/bin/hg', u'--config', u'hostfingerprints.bitbucket.org=24:9c:45:8b:9c:aa:ba:55:4e:01:6d:58:ff:e4:28:7d:2a:14:ae:3b', u'--config', u'hostfingerprints.bugzilla.mozilla.org=47:13:a2:14:0c:46:45:53:12:0d:e5:36:16:a5:60:26:3e:da:3a:60', u'--config', u'hostfingerprints.hg.mozilla.org=af:27:b9:34:47:4e:e5:98:01:f6:83:2b:51:c9:aa:d8:df:fb:1a:27', u'clone', u'https://bitbucket.org/sfink/mqext', u'/home/gamerboy/.mozbuild/mercurial/extensions/mqext']' returned non-zero exit status 255
File "/home/gamerboy/Desktop/Experiments/FireFox/mozilla-central/tools/mercurial/mach_commands.py", line 32, in mercurial_bootstrap
result = wizard.run(map(os.path.expanduser, config_paths))
File "/home/gamerboy/Desktop/Experiments/FireFox/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 171, in run
'Ensuring mqext extension is up to date...')
File "/home/gamerboy/Desktop/Experiments/FireFox/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 270, in update_mercurial_repo
update_mercurial_repo, hostfingerprints=HOST_FINGERPRINTS)
File "/home/gamerboy/Desktop/Experiments/FireFox/mozilla-central/tools/mercurial/hgsetup/wizard.py", line 279, in _update_repo
fn(binary, url, dest, branch, *args, **kwargs)
File "/home/gamerboy/Desktop/Experiments/FireFox/mozilla-central/python/mozversioncontrol/mozversioncontrol/repoupdate.py", line 27, in update_mercurial_repo
subprocess.check_call(args + ['clone', repo, path])
File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
Hmm, I am not sure why that would error... It seems like the repo is still reachable. gps, any ideas here?
Flags: needinfo?(gps)
Comment 12•11 years ago
|
||
I see that bitbucket has a new certificate. Can you update your tree and try again? If that does not fix it, maybe try editing the entry in your .hgrc like this:
[hostfingerprints]
bitbucket.org = 67:b3:bf:9f:c5:38:0e:4c:dd:4e:8a:da:3d:11:1b:c2:a5:d1:6c:6b
Comment 13•11 years ago
|
||
Almost certainly due to running mercurial-setup from a tree older than bug 981724 / 67485526e241.
You shouldn't be writing this patch on top of a tree that's 2 weeks old. Run `hg pull --update`.
Flags: needinfo?(gps)
Comment 14•11 years ago
|
||
'hg pull --update' fixed it. :). I will post the patch in a while.
Unassigning for now. Zack, if you do have a patch in progress / are actively working on this, let me know. Otherwise, someone else can give it a shot.
Assignee: abhishekrm → nobody
Status: ASSIGNED → NEW
Comment 16•11 years ago
|
||
These files will be removed once we enable the new app manager UI.
Clearing mentored bug status since the files will be removed.
Whiteboard: [good first bug][lang=html][mentor=jryans]
Updated•10 years ago
|
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•5 years ago
|
Product: DevTools → DevTools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•