Closed Bug 1012663 Opened 10 years ago Closed 10 years ago

[SMS] Remove inline style for CSP compliance

Categories

(Firefox OS Graveyard :: Gaia::SMS, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
2.0 S4 (20june)

People

(Reporter: gerard-majax, Assigned: azasypkin)

References

Details

(Whiteboard: [sms-most-wanted][p=1])

Attachments

(1 file, 1 obsolete file)

Confere bug 968907 and bug 858787. We need to remove all CSS inline usage in certified apps.

https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/index.html#L371
https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/index.html#L488

Those are in comments, I'm not sure if they are to be considered as an issue.
Summary: [] Remove inline style for CSP compliance → [SMS] Remove inline style for CSP compliance
Actually, line 488 is bug 1006781 already, but kuddo for finding line 371, I missed it.
Depends on: 1006781
Depends on: 817674
(In reply to Julien Wajsberg [:julienw] (away until 2nd June) from comment #1)
> Actually, line 488 is bug 1006781 already, but kuddo for finding line 371, I
> missed it.

Note that line 514 is also an issue (you can't have <style> either).

https://github.com/mozilla-b2g/gaia/blob/master/apps/sms/index.html#L514
Definitely, thanks.
Whiteboard: [sms-most-wanted]
As Anthony told me, we should try to use <img> elements instead of background images; but maybe it's not easy given the constraints we have here.

So I'd suggest to only switch to using "style.<xxx> =" in this bug so that we can switch on CSP 1.0 quickly, and in a follow-up try to use <img> elements.
Depends on: sms-sprint-3
Whiteboard: [sms-most-wanted] → [sms-most-wanted][p=1]
Target Milestone: --- → 2.0 S4 (20june)
Blocks: sms-sprint-3
No longer depends on: sms-sprint-3
Assignee: nobody → azasypkin
Status: NEW → ASSIGNED
Attached file GitHub pull request URL (obsolete) —
Comment on attachment 8438590 [details] [review]
GitHub pull request URL

Hey Julien,

This PR contains two separate commits. The first one addresses CSP compliance issue and the second one is solely related to Attachment.js refactoring as we were discussing previously. I'd rather move second commit to a separate bug\PR as it's not really related to CSP.

Thanks!
Attachment #8438590 - Attachment description: GitHub pull request URL (wip) → GitHub pull request URL
Attachment #8438590 - Flags: review?(felash)
Comment on attachment 8438590 [details] [review]
GitHub pull request URL

Added comments on github, mostly for the refactoring commit

thanks for separating this in 2 commits, actually maybe we want to keep the commit actually separate so that we can uplift only the fix if necessary ?
Attachment #8438590 - Flags: review?(felash)
Thinking more of it, let's do 2 bugs with these 2 commits, like you suggested.
Blocks: 1025552
(In reply to Julien Wajsberg [:julienw] from comment #10)
> Thinking more of it, let's do 2 bugs with these 2 commits, like you
> suggested.

Sure, updated PRs and filed follow-up bug 1025552
Attachment #8438590 - Attachment is obsolete: true
Comment on attachment 8440428 [details] [review]
GitHub pull request URL

Thanks for review! PR is updated.
Attachment #8440428 - Flags: review?(felash)
See Also: → 858787
Comment on attachment 8440428 [details] [review]
GitHub pull request URL

r=me with the nit
Attachment #8440428 - Flags: review?(felash) → review+
(In reply to Julien Wajsberg [:julienw] from comment #13)
> Comment on attachment 8440428 [details] [review]
> GitHub pull request URL
> 
> r=me with the nit

Thanks for review! Nit fixed, travis is greeen, so checkin-needed.
Keywords: checkin-needed
master = https://github.com/mozilla-b2g/gaia/commit/ded83da34a42ca0ee2bea69ad27d67afaa3006e2
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Unfortunately I've had to revert this for intermittent failures in sms/test/unit/attachment_test.js:
https://tbpl.mozilla.org/php/getParsedLog.php?id=42051727&tree=Mozilla-Inbound

https://github.com/mozilla-b2g/gaia/commit/77b533771a2d07c27b14691fd47af305e763dda8
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ed, do you see similar issues (120 sec timeout) in other files too?

I suspect that the issue comes from somewhere else.
Flags: needinfo?(emorley)
I haven't seen any other 120s timeouts - it's a different pattern to the other marionette-webapi and gaia-ui-test timeouts I've seen elsewhere
Flags: needinfo?(emorley)
As agreed on IRC, patch has been relanded:

master: https://github.com/mozilla-b2g/gaia/commit/60307b4fc59c8a5ae2a1e87f80827cd43c58c1f9
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: