Web Inspector: Box Model values not updated when DOM node styles change
https://bugs.webkit.org/show_bug.cgi?id=162525

Reviewed by Brian Burg.

The Box Model section should refresh itself when the selected node's
computed style changes. This is necessary since the Styles sidebar
doesn't always refresh its sections on node changes.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WebInspector.BoxModelDetailsSectionRow.prototype.set nodeStyles):
Refresh metrics whenever the computed style changes.

(WebInspector.BoxModelDetailsSectionRow.prototype._getBox):
(WebInspector.BoxModelDetailsSectionRow.prototype._getComponentSuffix):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createValueElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics):
Drive-by cleanup to make this large function easier to read.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createElement): Deleted.
Renamed createValueElement.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaWidthElement): Deleted.
(WebInspector.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaHeightElement): Deleted.
Combined these into a single function taking a property name (width or height).


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206406 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2 files changed