ITMLKit Inspector: Computed Style Box Model section throws exceptions
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2018 20:05:34 +0000 (20:05 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 20 Dec 2018 20:05:34 +0000 (20:05 +0000)
commit8add50553b02e4f7190deb21942933c1d72cd742
treeb434c3b1639a56dbb20f826a6852ab6cc5fffd41
parent225bbb34d1c64ef90646e1040006c5df8fa20e1d
ITMLKit Inspector: Computed Style Box Model section throws exceptions
https://bugs.webkit.org/show_bug.cgi?id=192911
<rdar://problem/46861112>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-12-20
Reviewed by Matt Baker.

* UserInterface/Views/BoxModelDetailsSectionRow.js:
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createBoxPartElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics.createContentAreaElement):
(WI.BoxModelDetailsSectionRow.prototype._updateMetrics):
ITMLKit doesn't always provide a display/position/width/height etc properties.
Protect against this, and just show an empty message in the box model section
if those properties do not exist.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239459 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/BoxModelDetailsSectionRow.js