Web Inspector: Changes: style attribute changes aren't being tracked
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2019 08:31:16 +0000 (08:31 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 16 Mar 2019 08:31:16 +0000 (08:31 +0000)
commitaadc35f7ec6db5ca22f325125a9d70b01a8ad156
tree82a25dffbedecf0f93549547ea8df6825d3dc090
parent02cca8926d5388fa5a12b892a47330e7dd48b88b
Web Inspector: Changes: style attribute changes aren't being tracked
https://bugs.webkit.org/show_bug.cgi?id=193859
<rdar://problem/47568977>

Reviewed by Devin Rousso.

* UserInterface/Controllers/CSSManager.js:
(WI.CSSManager):
(WI.CSSManager.prototype.get modifiedStyles):
(WI.CSSManager.prototype.addModifiedStyle):
(WI.CSSManager.prototype._mainResourceDidChange):
(WI.CSSManager.prototype.get modifiedCSSRules): Deleted.
(WI.CSSManager.prototype.addModifiedCSSRule): Deleted.
(WI.CSSManager.prototype.removeModifiedCSSRule): Deleted.
* UserInterface/Models/CSSRule.js:
(WI.CSSRule.prototype.get stringId): Deleted.
(WI.CSSRule.prototype.markModified): Deleted.
* UserInterface/Models/CSSStyleDeclaration.js:
(WI.CSSStyleDeclaration.prototype.get stringId):
(WI.CSSStyleDeclaration.prototype.markModified):
Inline styles weren't tracked because they didn't have owner rules.
Track style declarations instead of CSS rules.

* UserInterface/Views/ChangesDetailsSidebarPanel.css:
(.sidebar > .panel.changes-panel .css-rule):
(.sidebar > .panel.changes-panel .css-rule + .css-rule):
(.changes-panel .selector.style-attribute):
(.changes-panel .selector:not(.style-attribute)):
(.changes-panel .css-property-line > .property):
(.changes-panel .css-property-line.unchanged): Deleted.
Drive-by: use text-color-secondary for unchanged properties instead of altering opacity.
* UserInterface/Views/ChangesDetailsSidebarPanel.js:
(WI.ChangesDetailsSidebarPanel.prototype.layout):
(WI.ChangesDetailsSidebarPanel.prototype._createRuleElement):
For an inline style declaration, instead of showing a CSS source file location show an appropriate selector for its DOM node.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243038 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/CSSManager.js
Source/WebInspectorUI/UserInterface/Models/CSSRule.js
Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js
Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.css
Source/WebInspectorUI/UserInterface/Views/ChangesDetailsSidebarPanel.js