[Webkit-unassigned] [Bug 230153] New: Web Inspector: Update naming of WI.CSSCompletions callback used for collecting supported CSS properties from the target

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 10 08:27:46 PDT 2021


https://bugs.webkit.org/show_bug.cgi?id=230153

            Bug ID: 230153
           Summary: Web Inspector: Update naming of WI.CSSCompletions
                    callback used for collecting supported CSS properties
                    from the target
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: rcaliman at apple.com
                CC: inspector-bugzilla-changes at group.apple.com

`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.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210910/a5d2feb0/attachment.htm>


More information about the webkit-unassigned mailing list