⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 268982 in webkit


Ignore:
Timestamp:
Oct 26, 2020, 10:27:47 AM (6 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._boxModelDiagramRow.minimumWidth')
​https://bugs.webkit.org/show_bug.cgi?id=218135

Patch by Patrick Angle <Patrick Angle> on 2020-10-26
Reviewed by Brian Burg.

minimumWidth may be retrieved before the ComputedStylesDetailsPanel has done its initial layout, which means the
_boxModelDiagramRow will not have been initialized. In this case, we want to return 0 causing the absolute
minimum width of a sidebar to be used for calculations instead.

  • UserInterface/Views/ComputedStyleDetailsPanel.js:

(WI.ComputedStyleDetailsPanel.prototype.get minimumWidth):

Location:
trunk/Source/WebInspectorUI
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r268981 r268982  
     12020-10-26  Patrick Angle  <pangle@apple.com>
     2
     3        Web Inspector: Uncaught Exception: TypeError: undefined is not an object (evaluating 'this._boxModelDiagramRow.minimumWidth')
     4        https://bugs.webkit.org/show_bug.cgi?id=218135
     5
     6        Reviewed by Brian Burg.
     7
     8        minimumWidth may be retrieved before the ComputedStylesDetailsPanel has done its initial layout, which means the
     9        _boxModelDiagramRow will not have been initialized. In this case, we want to return 0 causing the absolute
     10        minimum width of a sidebar to be used for calculations instead.
     11
     12        * UserInterface/Views/ComputedStyleDetailsPanel.js:
     13        (WI.ComputedStyleDetailsPanel.prototype.get minimumWidth):
     14
    1152020-10-26  Patrick Angle  <pangle@apple.com>
    216
  • trunk/Source/WebInspectorUI/UserInterface/Views/ComputedStyleDetailsPanel.js

    r262302 r268982  
    4040    get minimumWidth()
    4141    {
    42         return this._boxModelDiagramRow.minimumWidth;
     42        return this._boxModelDiagramRow?.minimumWidth ?? 0;
    4343    }
    4444
Note: See TracChangeset for help on using the changeset viewer.