Bug 220987

Summary: Web Inspector: add Box Model into Layout panel
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ews-watchlist, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
bburg: review+, bburg: commit-queue-
[Video] With patch applied
none
Patch none

Description Nikita Vasilyev 2021-01-26 09:51:52 PST
I'm going to add Box Model to the experimental Layout panel. Once Layout panel is enabled by default, the plan is to remove Box Model from the Computed panel.

<rdar://problem/73503841>
Comment 1 Nikita Vasilyev 2021-02-01 14:11:36 PST
Created attachment 418920 [details]
Patch
Comment 2 Nikita Vasilyev 2021-02-01 14:12:03 PST
Created attachment 418921 [details]
[Video] With patch applied
Comment 3 BJ Burg 2021-02-01 14:51:00 PST
Comment on attachment 418920 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=418920&action=review

r=me with some little things

> Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js:43
> +            return hasDOMNode;

Nit: I prefer `return false`, it's easier to understand without any context.

> Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js:91
>          // FIXME: Move the Box Model section here from the Computed panel.

Nit: remove the FIXME

> Source/WebInspectorUI/UserInterface/Views/LayoutDetailsSidebarPanel.js:106
>      // Private

I believe this needs to be ported over as well:


    get minimumWidth()
    {
        return this._boxModelDiagramRow?.minimumWidth ?? 0;
    }
Comment 4 Devin Rousso 2021-02-01 15:01:27 PST
Comment on attachment 418920 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=418920&action=review

> Source/WebInspectorUI/ChangeLog:3
> +        Web Inspector: move Box Model into Layout panel

Seeing as how this patch doesn't touch the Computed panel, I'd rename the bug "add" instead of "move" (the latter implies that it's taken from it's old location, which is not the case as I mentioned).
Comment 5 Nikita Vasilyev 2021-02-01 15:34:11 PST
Created attachment 418935 [details]
Patch
Comment 6 EWS 2021-02-01 18:10:42 PST
Committed r272182: <https://trac.webkit.org/changeset/272182>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418935 [details].