Open Bug 591212 Opened 14 years ago Updated 2 years ago

The style inspector should react to dynamic changes to the pages stylesheets

Categories

(DevTools :: Inspector, defect, P3)

defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: jwalker, Unassigned)

References

Details

(Whiteboard: [computedview][ruleview])

The current csslogic patch in bug 582596 caches the sheets: >+ // Hunt down top level stylesheets, and cache them. >+ let domSheets = this.viewedDocument.styleSheets; What if a page dynamically adds stylesheets after you've created this static cache? We are doing performance work in bug 589849. This will change the need for a cache, but if it does not eradicate it, we should ensure that we use a dom mutation event to keep our cache up to date.
Blocks: 589849, 582596, 586984
Also from csslogic: >+ if (domSheet.disabled) { >+ continue; >+ } If a page toggles .disabled or uses .insertRule() / .deleteRule() we should also remain updated.
Whiteboard: [kd4b7]
No longer blocks: 582596
Severity: normal → blocker
Reprioritizing bugs. You can filter the mail on the word TEABAGS.
Severity: blocker → normal
Whiteboard: [kd4b7]
Blocks: devtools924
Assignee: nobody → jwalker
Joe: if the performance work I did in bug 589849 is fine with you, then this work should be based on that, if Kevin agrees. Otherwise, the work being done here will need big changes - as explained in the comments of that bug. If you want, we can schedule a meeting to discuss technical aspects.
I'll prioritize reviewing your changes in bug 589849
No longer blocks: devtools924
Can I suggest that we treat this a lower priority than getting something merged into central?
Whiteboard: [hydra] → [styleinspector]
Assignee: jwalker → nobody
Bug triage, filter on PEGASUS.
Whiteboard: [styleinspector] → [computedview][ruleview]
Component: Developer Tools → Developer Tools: Inspector
This is even more relevant now we have a StyleEditor. Open the Inspector. Open the Style Editor. Make a change a in the Style Editor. Inspector Rule View not updated.
Bug triage, filter on PINKISBEAUTIFUL
Priority: -- → P3
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Misunderstood this bug.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
comment 7 is not longer a valid STR. Styles updates in the style editor get updates in the rule view. But modifying stylesheet via the split console doesn't update the rule view. Here is a valid STR: * open: data:text/html,<style>* {background: gray;}</style>foo * open the webconsole * execute these commands and see no updates in the rule view: document.styleSheets[0].cssRules[0].style.background = "blue"; document.styleSheets[0].disabled = true; May be this bug should be in the top inspector bugs? I don't know how frequent dynamic stylesheet modification is? It could be if any common framework do so...
(In reply to Alexandre Poirot [:ochameau] from comment #11) > comment 7 is not longer a valid STR. Styles updates in the style editor get > updates in the rule view. > But modifying stylesheet via the split console doesn't update the rule view. > > Here is a valid STR: > * open: data:text/html,<style>* {background: gray;}</style>foo > * open the webconsole > * execute these commands and see no updates in the rule view: > > document.styleSheets[0].cssRules[0].style.background = "blue"; > document.styleSheets[0].disabled = true; > > May be this bug should be in the top inspector bugs? > I don't know how frequent dynamic stylesheet modification is? > It could be if any common framework do so... The assumption when we implemented the as-authored styles in the rule-view was that this was not very common. So we decided to not handle CSSOM changes then. :tromey had filed bug 1196250 to investigate how to implement that later.
Product: Firefox → DevTools
See Also: → 1637835
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.