Title: [282360] trunk/Source/WebInspectorUI
- Revision
- 282360
- Author
- [email protected]
- Date
- 2021-09-13 14:40:56 -0700 (Mon, 13 Sep 2021)
Log Message
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
Reviewed by Devin Rousso.
Rename `WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback(names)` to `propertiesCallback(properties)`
to remove confusion about what the payload actually contains: not a list of property names, but a list of objects with
CSS property names, values, aliases, longhands, etc.
The constructor of `WI.CSSCompletions` expects and handles this payload.
* UserInterface/Models/CSSCompletions.js:
(WI.CSSCompletions.initializeCSSCompletions):
(WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback): Deleted.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (282359 => 282360)
--- trunk/Source/WebInspectorUI/ChangeLog 2021-09-13 21:32:57 UTC (rev 282359)
+++ trunk/Source/WebInspectorUI/ChangeLog 2021-09-13 21:40:56 UTC (rev 282360)
@@ -1,3 +1,20 @@
+2021-09-13 Razvan Caliman <[email protected]>
+
+ 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
+
+ Reviewed by Devin Rousso.
+
+ Rename `WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback(names)` to `propertiesCallback(properties)`
+ to remove confusion about what the payload actually contains: not a list of property names, but a list of objects with
+ CSS property names, values, aliases, longhands, etc.
+
+ The constructor of `WI.CSSCompletions` expects and handles this payload.
+
+ * UserInterface/Models/CSSCompletions.js:
+ (WI.CSSCompletions.initializeCSSCompletions):
+ (WI.CSSCompletions.initializeCSSCompletions.propertyNamesCallback): Deleted.
+
2021-08-27 Russell Epstein <[email protected]>
Land Windows build fixes from safari-612.1.29.14-branch.
Modified: trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js (282359 => 282360)
--- trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js 2021-09-13 21:32:57 UTC (rev 282359)
+++ trunk/Source/WebInspectorUI/UserInterface/Models/CSSCompletions.js 2021-09-13 21:40:56 UTC (rev 282360)
@@ -85,14 +85,14 @@
if (WI.CSSCompletions.cssNameCompletions)
return;
- function propertyNamesCallback(error, names)
+ function propertiesCallback(error, cssProperties)
{
if (error)
return;
- WI.CSSCompletions.cssNameCompletions = new WI.CSSCompletions(names, false);
+ WI.CSSCompletions.cssNameCompletions = new WI.CSSCompletions(cssProperties, false);
- WI.CSSKeywordCompletions.addCustomCompletions(names);
+ WI.CSSKeywordCompletions.addCustomCompletions(cssProperties);
// CodeMirror is not included by tests so we shouldn't assume it always exists.
// If it isn't available we skip MIME type associations.
@@ -119,7 +119,7 @@
valueKeywordsForCodeMirror[codeMirrorPropertyName] = true;
}
- for (var property of names)
+ for (var property of cssProperties)
collectPropertyNameForCodeMirror(property.name);
for (var propertyName in WI.CSSKeywordCompletions._propertyKeywordMap) {
@@ -164,7 +164,7 @@
WI.CSSKeywordCompletions.addPropertyCompletionValues("font", fontFamilyNames);
}
- target.CSSAgent.getSupportedCSSProperties(propertyNamesCallback);
+ target.CSSAgent.getSupportedCSSProperties(propertiesCallback);
if (target.hasCommand("CSS.getSupportedSystemFontFamilyNames"))
target.CSSAgent.getSupportedSystemFontFamilyNames(fontFamilyNamesCallback);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes