Closed Bug 1490720 Opened 7 years ago Closed 7 years ago

Track Changes: Log changes to CSS declarations coming from the Inspector

Categories

(DevTools :: Inspector, enhancement, P2)

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: rcaliman, Assigned: rcaliman)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

All CSS changes occurring in the Inspector panel pass through StyleRuleActor. This is a good place to monitor atomic changes (proxy RuleRewriter methods) and pass them onward to the ChangesActor introduced by Bug 1468754. This implementation explicitly handles on they Inspector and its tools. The Style Editor is not covered in this implementation.
MozReview-Commit-ID: 9J4zBcSxYwj
Attachment #9008457 - Attachment description: Bug 1490720 - Monitor style changes on StyleRuleFront; Make StyleRuleActor emit "track-change" events. r=tromey → Bug 1490720 - Monitor style changes on StyleRuleFront; Make StyleRuleActor emit "track-change" events. r=pbro
I'm starting to look at this change now. This is the main architecture part for supporting track changes in the inspector. So I want to be careful reviewing this. I was going to say that it would make things clearer if we could remove the non-authored CSS handling code before doing this. The authored CSS project was done by tromey in bug 984880 which landed in 2015, in Firefox 44. So in terms of backward compat, we don't need to worry about it anymore and can get rid of it. However, after looking at that part again, I realized that we don't only have it for backwards compat reasons, but also to handle the element inline style rule, and to handle rules that have been modified by CSSOM dynamically. So it looks like we do have to keep on using the 2 logics (authored and non-authored), and therefore both the RuleRewriter and RuleModificationList.
(In reply to Patrick Brosset <:pbro> from comment #2) > However, after looking at that part again, I realized that we don't only > have it for backwards compat reasons, but also to handle the element inline > style rule That's incorrect. We only use it for handling rules that have been changed by CSSOM.
Attachment #9008457 - Attachment description: Bug 1490720 - Monitor style changes on StyleRuleFront; Make StyleRuleActor emit "track-change" events. r=pbro → Bug 1490720 - Log changes to CSS declarations from StyleRuleActor. r=pbro
Comment on attachment 9008457 [details] Bug 1490720 - Log changes to CSS declarations from StyleRuleActor. r=pbro Patrick Brosset <:pbro> has approved the revision.
Attachment #9008457 - Flags: review+
Pushed by rcaliman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4c34c45253ef Log changes to CSS declarations from StyleRuleActor. r=pbro
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
Summary: Track Changes: Log CSS changes coming from the Inspector → Track Changes: Log changes to CSS declarations coming from the Inspector
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: