Closed Bug 768229 Opened 12 years ago Closed 4 months ago

[style editor] The 2nd time the style editor is launched, it doesn't include the modification of the 1st session

Categories

(DevTools :: Style Editor, defect, P2)

x86
All
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: paul, Unassigned)

References

Details

STR:
- go to about:home
- start the style editor
- change something (font-size:100% to font-size:50%)
- close the style editor
- open it again

Expected result:
- CSS code should be as we left it (font-size:50%)

Actual result:
- CSS code is back to what it was at first (font-size:100%) and doesn't correspond to what is in the page
Cedric, any idea how we could fix that?
Blocks: 771203
Blocks: 782593
Not relevant anymore (since Toolbox).

Bug triage, filter on PINKISBEAUTIFUL
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
How about if you reopen the toolbox? The bug should still be there.
You're very right.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Priority: -- → P2
Some people don't use the style editor because of this bug.
The style-editor retrieves stylesheets content either from the cache or from the network (when the resource wasn't cached). And it doesn't write its changes (whenever a change is made, we call DOMUtils.parseStyleSheet(text) with the new text, which parses and apply the sheet to the current document, but doesn't save the text anywhere).
So whenever the toolbox is closed and opened again, we go again to the cache or network to retrieve the stylesheet text.

This isn't only a problem for stylesheets. When we'll be able to change scripts, the same will happen. Same for any resources.

One solution is to implement a devtools' cache which would have the following characteristics:
- provide a tree structure of all the downloaded resources on the given page,
- provide each resource's content as authored (not as parsed),
- resources would be writable.

I'm trying to get a discussion started around this here: https://etherpad.mozilla.org/devtools-cache
Bug 984880 added a cache, so style editor (and inspector) changes won't be lost
now if you close and reopen the tools.

However, this doesn't address the fact that the editor re-fetches the style sheet
the first time around.
Product: Firefox → DevTools
Severity: normal → S3
Status: REOPENED → RESOLVED
Closed: 12 years ago4 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.