Closed Bug 918004 Opened 11 years ago Closed 11 years ago

B2G: Can't see remote stylesheets in Style Editor

Categories

(DevTools Graveyard :: WebIDE, defect, P1)

defect

Tracking

(firefox26 fixed, firefox27 fixed)

RESOLVED FIXED
Firefox 27
Tracking Status
firefox26 --- fixed
firefox27 --- fixed

People

(Reporter: jryans, Assigned: paul)

References

Details

Attachments

(1 file, 1 obsolete file)

While debugging bug 917306, I noticed that currently the Style Editor can't display remote stylesheets inside B2G apps. When the actor attempts to run _loadSourceFromCache for a remote (http[s]) stylesheet, asyncOpen on the channel fails. My current suspicion for why this happens is that for B2G apps, the actor code is loaded into the same context as the app itself, and so the B2G security model is blocking the actor from making this request, just as it would for some types of apps. I have seen this issue in at least two apps so far: * Marketplace app (app://marketplace.firefox.com/index.html) * 1 app:// sheet (this usually loads, but see bug 917306) * <iframe src="https://marketplace.firefox.com/?mcc=&mnc="></iframe> * 2 https:// sheets inside (these fail to load) * Twitter app (sign in page) (https://mobile.twitter.com/) * 1 inline sheet (loads fine) * 1 https:// sheet directly on page (this fails to load)
Attached patch Workaround (obsolete) (deleted) — Splinter Review
Here's my workaround to show the remote sheets. Seems bad, since I assume |setPrivate| needs to stay there... :)
Heather, can you take a quick look at this? Is there an easy way to work around that?
Flags: needinfo?(fayearthur)
(also look at bug 917306 comment 5)
Are these iframes regular iframes with just a `src` attribute, or are they using mozbrowser and/or mozapp attribute(s)? If they don't, we should have same kind of limitations than in firefox desktop. The actor still loads in chrome sandboxes. But mozbrowser iframes introduce security limitation that can't be bypassed by chrome priviledges. And if they use mozapp, the iframe will run in another process... So, if these iframes use mozbrowser API, it would be easier to implement iframe target support rather than working around b2g security model. If they don't, it sounds like there is a bug to fix.
Blocks: appmgr_v1
No longer blocks: 917306
(In reply to Alexandre Poirot (:ochameau) from comment #4) > Are these iframes regular iframes with just a `src` attribute, or are they > using mozbrowser and/or mozapp attribute(s)? In the case of the Marketplace app, it is just a regular iframe with a src. For the Twitter app, there is no iframe involved, but the app itself is a hosted app, not a packaged app on the device.
Assignee: nobody → paul
Status: NEW → ASSIGNED
http://bugmotodo.org has the same problem.
Attached patch Patch v1 (deleted) — Splinter Review
Using the same loadGroup as the window.
Attachment #806869 - Attachment is obsolete: true
Attachment #808604 - Flags: review?(ehsan)
Flags: needinfo?(fayearthur)
jryans came up with this solution. Ehsan confirmed that might be a good-enough way to do it.
Component: Developer Tools: Style Editor → Developer Tools: App Manager
Priority: -- → P1
Attachment #808604 - Flags: review?(ehsan) → review+
Keywords: checkin-needed
Whiteboard: [needed-in-aurora-26]
Comment on attachment 808604 [details] [diff] [review] Patch v1 [Approval Request Comment] Bug caused by (feature/regressing bug #): new feature (app manager) User impact if declined: can't correctly use the style editor with apps Testing completed (on m-c, etc.): locally Risk to taking this patch (and alternatives if risky): low String or IDL/UUID changes made by this patch: none
Attachment #808604 - Flags: approval-mozilla-aurora?
Keywords: checkin-needed
Whiteboard: [needed-in-aurora-26] → [needed-in-aurora-26][fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [needed-in-aurora-26][fixed-in-fx-team] → [needed-in-aurora-26]
Target Milestone: --- → Firefox 27
Attachment #808604 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Whiteboard: [needed-in-aurora-26] → [land-in-aurora-26]
Product: Firefox → DevTools
Product: DevTools → DevTools Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: