Style sheets in iframes are not listed in the style editor

RESOLVED FIXED in Firefox 23


7 years ago
6 months ago


(Reporter: dangoor, Assigned: dcrewi)


Firefox 23

Firefox Tracking Flags

(Not tracked)



(1 attachment, 1 obsolete attachment)



7 years ago

1. Go to any site with iframes
   here's a simple example:
2. open the style editor
3. only stylesheets from the main page are listed

expected results: should be able to edit styles that live within the iframes

This is also noticeable if you inspect an element in the iframe and then click the link from the property view into the style editor. The editor that pops up is empty.
OS: Mac OS X → All
Hardware: x86 → All
Version: unspecified → Trunk


6 years ago
Assignee: nobody → dcrewi

Comment 1

6 years ago
Created attachment 739155 [details] [diff] [review]
patch v1
Attachment #739155 - Flags: review?(jwalker)
Comment on attachment 739155 [details] [diff] [review]
patch v1

Review of attachment 739155 [details] [diff] [review]:

I'm going to bounce this to Heather who is working on the Style Editor right now.
Attachment #739155 - Flags: review?(jwalker) → review?(harthur)
Attachment #739155 - Flags: review?(harthur) → review?(fayearthur)
Thanks for the patch, David. This might have to wait for bug 816967 (remote style editor). That patch changes the structure of the style editor a lot, and should land very soon.
Comment on attachment 739155 [details] [diff] [review]
patch v1

Review of attachment 739155 [details] [diff] [review]:

So sorry about the delay. This looks good. It'll have to be rebased on the new Style Editor that uses the remote debugging protocol. If you want to do that, go for it. There is no more StyleEditorChrome.jsm file, this code would go in the StyleEditorActor in toolkit/devtools/styleeditor/dbg-styleeditor-actors.js, and the test would have to use the new API (see the other tests for reference).

Otherwise, I can rebase it myself soon, it's up to you. Thanks again for the patch.

::: browser/devtools/styleeditor/StyleEditorChrome.jsm
@@ +367,5 @@
> +        this._showImportedStyleSheets(styleSheet);
> +      }
> +      let iframes = document.getElementsByTagName("iframe");
> +      for (let i = 0; i < iframes.length; ++i) {
> +        let iframe = iframes[i];

Don't have to change this, but cool fact, we can use for...of loops here to avoid the counter. `for (let iframe of iframes)`.

Comment 5

6 years ago
Created attachment 745934 [details] [diff] [review]
patch v2, rewrite on top of remotable style editor

It wasn't a rebase so much as a rewrite. At least the test didn't have to be modified much.
Attachment #739155 - Attachment is obsolete: true
Attachment #739155 - Flags: review?(fayearthur)
Attachment #745934 - Flags: review?(fayearthur)
Comment on attachment 745934 [details] [diff] [review]
patch v2, rewrite on top of remotable style editor

Review of attachment 745934 [details] [diff] [review]:

Thanks for rewriting it for the remote editor. This looks good. I've got a try server run here: Barring any failures I can check it in.

::: browser/devtools/styleeditor/test/browser_styleeditor_bug_740541_iframes.js
@@ +71,5 @@
> +
> +  waitForExplicitFinish();
> +  let styleSheetCount = 0;
> +  addTabAndOpenStyleEditor(function (aPanel) {
> +    aPanel._debuggee.on("stylesheet-added", function () {

Should wait for the aPanel.UI.on("editor-added") event since we're checking editors.

I can change this before checking in.
Attachment #745934 - Flags: review?(fayearthur) → review+
Last Resolved: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 23


6 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.