[webkit-reviews] review granted: [Bug 225972] Web Inspector: Styles panel slow to render when inspecting node with many inherited CSS variables : [Attachment 430585] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Jun 4 10:43:59 PDT 2021
Devin Rousso <drousso at apple.com> has granted Razvan Caliman
<rcaliman at apple.com>'s request for review:
Bug 225972: Web Inspector: Styles panel slow to render when inspecting node
with many inherited CSS variables
https://bugs.webkit.org/show_bug.cgi?id=225972
Attachment 430585: Patch
https://bugs.webkit.org/attachment.cgi?id=430585&action=review
--- Comment #24 from Devin Rousso <drousso at apple.com> ---
Comment on attachment 430585
--> https://bugs.webkit.org/attachment.cgi?id=430585
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=430585&action=review
r=me, nice fix, thanks for iterating :)
>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.
css:36
> + --css-declaration-indentation:
calc(var(--css-declaration-horizontal-padding) + 17px);
NIT: it'd be nice to also pull out the `17px` and give it a name (e.g.
`--property-checkbox-width`) so that it's less of a magic number
NIT: Since this is declared on a class with "declaration" already in the name,
it's a bit redundant. How about just `--property-indentation`?
>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.
js:314
> + if (!property.overridden &&
this._hiddenUnusedVariables.has(property)) {
Is it possible that somehow we have two instances of `WI.CSSProperty` that both
refer to the same underlying CSS? I think that's why the check for
`canonicalName` is done below. Might be worth investigating as a followup.
>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.
js:729
> +
this._delegate?.spreadsheetCSSStyleDeclarationEditorSetAllPropertyVisibilityMod
e?.(propertyVisibilityMode);
Style: this should really provide `this` as the first argument as is
normal/proper delegate convention
>
Source/WebInspectorUI/UserInterface/Views/SpreadsheetCSSStyleDeclarationSection
.js:294
> +
this._delegate?.spreadsheetCSSStyleDeclarationSectionSetAllPropertyVisibilityMo
de?.(propertyVisibilityMode);
Style: this should really provide `this` as the first argument as is
normal/proper delegate convention
More information about the webkit-reviews
mailing list