WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 230153
Web Inspector: Update naming of WI.CSSCompletions callback used for collecting supported CSS properties from the target
https://bugs.webkit.org/show_bug.cgi?id=230153
Summary
Web Inspector: Update naming of WI.CSSCompletions callback used for collectin...
Razvan Caliman
Reported
2021-09-10 08:27:46 PDT
`Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js:82` The callback is confusingly named `propertyNamesCallback()` and has a `names` argument. The payload is actually a list of objects with CSS property names, values, aliases, longhands, etc. The constructor of `WI.CSSCompletions` expects and handles this payload. Seems like `WI.CSSCompletions` began life handling just CSS property names, but overtime got overloaded to support additional use cases. For example, `WI.CSSCompletions` ends up having an instance of itself assigned as a property o_O: ``` WI.CSSCompletions.cssNameCompletions = new WI.CSSCompletions(properties, false); ``` There's a bit of confusing ping-pong between `WI.CSSCompletions` and `WI.CSSKeywordCompletions`. But that's a fix for another patch.
Attachments
Patch 1.0
(3.23 KB, patch)
2021-09-10 08:35 PDT
,
Razvan Caliman
no flags
Details
Formatted Diff
Diff
Patch 1.1
(3.24 KB, patch)
2021-09-13 08:59 PDT
,
Razvan Caliman
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Razvan Caliman
Comment 1
2021-09-10 08:35:40 PDT
Created
attachment 437875
[details]
Patch 1.0
Radar WebKit Bug Importer
Comment 2
2021-09-10 09:29:12 PDT
<
rdar://problem/82975738
>
Devin Rousso
Comment 3
2021-09-10 16:12:49 PDT
Comment on
attachment 437875
[details]
Patch 1.0 View in context:
https://bugs.webkit.org/attachment.cgi?id=437875&action=review
r=me
> Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js:88 > + function propertiesCallback(error, properties)
NIT: this should really be named `cssProperties` to match what's used in the protocol
Razvan Caliman
Comment 4
2021-09-13 08:59:54 PDT
Created
attachment 438046
[details]
Patch 1.1 Carry over R+
EWS
Comment 5
2021-09-13 14:41:05 PDT
Committed
r282360
(
241623@main
): <
https://commits.webkit.org/241623@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 438046
[details]
.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug