Closed Bug 1021724 Opened 7 years ago Closed 7 years ago
[Keyboard] Remove inline style for CSP compliance
+++ This bug was initially created as a clone of Bug #1018969 +++ See bug 968907 and bug 858787. We need to remove all inline CSS usage in certified apps. The following HTML files need to be changed: https://github.com/mozilla-b2g/gaia/blob/master/shared/style/progress_activity/index.html#L87 https://github.com/mozilla-b2g/gaia/blob/master/shared/style/date_selector/index.html#L24 https://github.com/mozilla-b2g/gaia/blob/master/shared/style/date_selector/index.html#L59 https://github.com/mozilla-b2g/gaia/blob/master/shared/style/date_selector/index.html#L75 https://github.com/mozilla-b2g/gaia/blob/master/shared/style/time_selector/index.html#L26 https://github.com/mozilla-b2g/gaia/blob/master/shared/style/time_selector/index.html#L42
Fixes keyboard inline styles for CSP compliance. Correct JSHint now (I think), and submitted pull request in its own branch.
46 bytes, text/x-github-pull-request
|Details | Review|
The keyboard app use setAttribute style which is blocked by CSP - see 968907 for details. Need to replace https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/js/render.js#L913 with something like contentNode.style.width=width;
(In reply to Paul Theriault [:pauljt] from comment #0) > The keyboard app use setAttribute style which is blocked by CSP - see 968907 > for details. > Need to replace > https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/js/render. > js#L913 > > with something like > > contentNode.style.width=width; This looks trivial and easily for contributor to pick up.
Whiteboard: [good first bug][mentor=timdream][mentor=rudyl][mentor-lang=zh][lang=js]
Hey there, I would like to work on this.
Assignee: nobody → loganallc
Status: NEW → ASSIGNED
Comment on attachment 8436346 [details] [review] Fixed keyboard inline style for CSP compliance This is correct, however your commit does not follow our jshint coding style. You can install jshint locally to ensure you pass the tests before pushing your commit to Github. I also recommend you to submit pull request from a feature branch instead of from master. |master| is usually in sync with upstream. Thanks!!
Attachment #8436346 - Flags: review?(timdream) → feedback+
Hey Tim, would you suggest that I create a new branch for this feature specifically, or that I pick a certain feature branch to to submit my pull request to?
New feature branch for patch of this bug.
Comment on attachment 8436647 [details] [review] Fixes keyboard inline styles for CSP compliance. Correct JSHint now (I think), and submitted pull request in its own branch. Thank you for the quick response. Please amend the commit with correct bug # in the message, and force push to the branch. After that I can merge this for you when Travis-CI passes.
Attachment #8436647 - Flags: review?(timdream) → review+
Amended the commit message, thanks!
master: https://github.com/mozilla-b2g/gaia/commit/45e1020c7edd8776c78abcb8917eda4f730724e0 Thank you again for the patch.
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.