Bug 233198 - Web Inspector: Remove unused `dontCreateIfMissing` argument from CSSStyleDeclaration.prototype.propertyForName
Summary: Web Inspector: Remove unused `dontCreateIfMissing` argument from CSSStyleDecl...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
Keywords: InRadar
Depends on:
Reported: 2021-11-16 09:52 PST by Nikita Vasilyev
Modified: 2021-11-16 16:24 PST (History)
5 users (show)

See Also:

Patch (13.02 KB, patch)
2021-11-16 10:10 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff
Patch (13.99 KB, patch)
2021-11-16 13:24 PST, Nikita Vasilyev
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2021-11-16 09:52:49 PST
`dontCreateIfMissing` is always true. We don't need to make it an argument.
Comment 1 Nikita Vasilyev 2021-11-16 10:10:28 PST
Created attachment 444405 [details]

Never liked a negation in the argument name anyway :p
Comment 2 Devin Rousso 2021-11-16 12:29:31 PST
Comment on attachment 444405 [details]

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

> Source/WebInspectorUI/UserInterface/Models/CSSStyleDeclaration.js:332
> +        return bestMatchProperty;

We should simplify `propertyForName` while we're at it.  There's no reason to have an inline function `findMatch` that we only call once.
Comment 3 Nikita Vasilyev 2021-11-16 13:24:07 PST
Created attachment 444424 [details]

Comment 4 Devin Rousso 2021-11-16 13:59:07 PST
Comment on attachment 444424 [details]

Comment 5 EWS 2021-11-16 16:23:27 PST
Committed r285896 (244314@main): <https://commits.webkit.org/244314@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444424 [details].
Comment 6 Radar WebKit Bug Importer 2021-11-16 16:24:22 PST