chrome-devtools-frontend 1.0.976703 → 1.0.977567
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +1 -1
- package/front_end/core/i18n/locales/af.json +5 -5
- package/front_end/core/i18n/locales/am.json +5 -5
- package/front_end/core/i18n/locales/ar.json +5 -5
- package/front_end/core/i18n/locales/as.json +5 -5
- package/front_end/core/i18n/locales/az.json +5 -5
- package/front_end/core/i18n/locales/be.json +5 -5
- package/front_end/core/i18n/locales/bg.json +5 -5
- package/front_end/core/i18n/locales/bn.json +5 -5
- package/front_end/core/i18n/locales/bs.json +5 -5
- package/front_end/core/i18n/locales/ca.json +5 -5
- package/front_end/core/i18n/locales/cs.json +5 -5
- package/front_end/core/i18n/locales/cy.json +5 -5
- package/front_end/core/i18n/locales/da.json +5 -5
- package/front_end/core/i18n/locales/de.json +5 -5
- package/front_end/core/i18n/locales/el.json +5 -5
- package/front_end/core/i18n/locales/en-GB.json +5 -5
- package/front_end/core/i18n/locales/en-US.json +18 -15
- package/front_end/core/i18n/locales/en-XL.json +18 -15
- package/front_end/core/i18n/locales/es-419.json +5 -5
- package/front_end/core/i18n/locales/es.json +5 -5
- package/front_end/core/i18n/locales/et.json +5 -5
- package/front_end/core/i18n/locales/eu.json +5 -5
- package/front_end/core/i18n/locales/fa.json +5 -5
- package/front_end/core/i18n/locales/fi.json +5 -5
- package/front_end/core/i18n/locales/fil.json +5 -5
- package/front_end/core/i18n/locales/fr-CA.json +5 -5
- package/front_end/core/i18n/locales/fr.json +5 -5
- package/front_end/core/i18n/locales/gl.json +5 -5
- package/front_end/core/i18n/locales/gu.json +5 -5
- package/front_end/core/i18n/locales/he.json +5 -5
- package/front_end/core/i18n/locales/hi.json +5 -5
- package/front_end/core/i18n/locales/hr.json +5 -5
- package/front_end/core/i18n/locales/hu.json +5 -5
- package/front_end/core/i18n/locales/hy.json +5 -5
- package/front_end/core/i18n/locales/id.json +5 -5
- package/front_end/core/i18n/locales/is.json +5 -5
- package/front_end/core/i18n/locales/it.json +5 -5
- package/front_end/core/i18n/locales/ja.json +5 -5
- package/front_end/core/i18n/locales/ka.json +5 -5
- package/front_end/core/i18n/locales/kk.json +5 -5
- package/front_end/core/i18n/locales/km.json +5 -5
- package/front_end/core/i18n/locales/kn.json +5 -5
- package/front_end/core/i18n/locales/ko.json +5 -5
- package/front_end/core/i18n/locales/ky.json +5 -5
- package/front_end/core/i18n/locales/lo.json +5 -5
- package/front_end/core/i18n/locales/lt.json +5 -5
- package/front_end/core/i18n/locales/lv.json +5 -5
- package/front_end/core/i18n/locales/mk.json +5 -5
- package/front_end/core/i18n/locales/ml.json +5 -5
- package/front_end/core/i18n/locales/mn.json +5 -5
- package/front_end/core/i18n/locales/mr.json +5 -5
- package/front_end/core/i18n/locales/ms.json +5 -5
- package/front_end/core/i18n/locales/my.json +5 -5
- package/front_end/core/i18n/locales/ne.json +5 -5
- package/front_end/core/i18n/locales/nl.json +5 -5
- package/front_end/core/i18n/locales/no.json +5 -5
- package/front_end/core/i18n/locales/or.json +5 -5
- package/front_end/core/i18n/locales/pa.json +5 -5
- package/front_end/core/i18n/locales/pl.json +5 -5
- package/front_end/core/i18n/locales/pt-PT.json +5 -5
- package/front_end/core/i18n/locales/pt.json +5 -5
- package/front_end/core/i18n/locales/ro.json +5 -5
- package/front_end/core/i18n/locales/ru.json +5 -5
- package/front_end/core/i18n/locales/si.json +5 -5
- package/front_end/core/i18n/locales/sk.json +5 -5
- package/front_end/core/i18n/locales/sl.json +5 -5
- package/front_end/core/i18n/locales/sq.json +5 -5
- package/front_end/core/i18n/locales/sr-Latn.json +5 -5
- package/front_end/core/i18n/locales/sr.json +5 -5
- package/front_end/core/i18n/locales/sv.json +5 -5
- package/front_end/core/i18n/locales/sw.json +5 -5
- package/front_end/core/i18n/locales/ta.json +5 -5
- package/front_end/core/i18n/locales/te.json +5 -5
- package/front_end/core/i18n/locales/th.json +5 -5
- package/front_end/core/i18n/locales/tr.json +5 -5
- package/front_end/core/i18n/locales/uk.json +5 -5
- package/front_end/core/i18n/locales/ur.json +5 -5
- package/front_end/core/i18n/locales/uz.json +5 -5
- package/front_end/core/i18n/locales/vi.json +5 -5
- package/front_end/core/i18n/locales/zh-HK.json +5 -5
- package/front_end/core/i18n/locales/zh-TW.json +5 -5
- package/front_end/core/i18n/locales/zh.json +5 -5
- package/front_end/core/i18n/locales/zu.json +5 -5
- package/front_end/models/issues_manager/{SameSiteCookieIssue.ts → CookieIssue.ts} +1 -1
- package/front_end/models/issues_manager/IssuesManager.ts +1 -1
- package/front_end/models/issues_manager/NavigatorUserAgentIssue.ts +1 -1
- package/front_end/models/issues_manager/issues_manager.ts +1 -1
- package/front_end/panels/application/components/BackForwardCacheView.ts +23 -1
- package/front_end/panels/timeline/TimelineController.ts +17 -5
- package/front_end/ui/components/expandable_list/expandableList.css +10 -0
- package/front_end/ui/components/text_editor/javascript.ts +46 -1
- package/package.json +1 -1
@@ -101,11 +101,11 @@ const dontCompleteIn = new Set([
|
|
101
101
|
'TypeName',
|
102
102
|
]);
|
103
103
|
|
104
|
-
// FIXME Implement Map property completion?
|
105
104
|
export const enum QueryType {
|
106
105
|
Expression = 0,
|
107
106
|
PropertyName = 1,
|
108
107
|
PropertyExpression = 2,
|
108
|
+
PotentiallyRetrievingFromMap = 3,
|
109
109
|
}
|
110
110
|
|
111
111
|
export function getQueryType(tree: CodeMirror.Tree, pos: number, doc: CodeMirror.Text): {
|
@@ -149,6 +149,22 @@ export function getQueryType(tree: CodeMirror.Tree, pos: number, doc: CodeMirror
|
|
149
149
|
return {type: QueryType.PropertyName, relatedNode: node};
|
150
150
|
}
|
151
151
|
}
|
152
|
+
if (node.name === '(') {
|
153
|
+
// map.get(<auto-complete>
|
154
|
+
if (parent.name === 'ArgList' && parent.parent.name === 'CallExpression') {
|
155
|
+
// map.get
|
156
|
+
const callReceiver = parent.parent.firstChild;
|
157
|
+
if (callReceiver.name === 'MemberExpression') {
|
158
|
+
// get
|
159
|
+
const propertyExpression = callReceiver.lastChild;
|
160
|
+
if (doc.sliceString(propertyExpression.from, propertyExpression.to) === 'get') {
|
161
|
+
// map
|
162
|
+
const potentiallyMapObject = callReceiver.firstChild;
|
163
|
+
return {type: QueryType.PotentiallyRetrievingFromMap, relatedNode: potentiallyMapObject};
|
164
|
+
}
|
165
|
+
}
|
166
|
+
}
|
167
|
+
}
|
152
168
|
return {type: QueryType.Expression};
|
153
169
|
}
|
154
170
|
|
@@ -184,6 +200,12 @@ export async function javascriptCompletionSource(cx: CodeMirror.CompletionContex
|
|
184
200
|
}
|
185
201
|
result = await completeProperties(
|
186
202
|
cx.state.sliceDoc(objectExpr.from, objectExpr.to), quote, cx.state.sliceDoc(cx.pos, cx.pos + 1) === ']');
|
203
|
+
} else if (query.type === QueryType.PotentiallyRetrievingFromMap) {
|
204
|
+
const potentialMapObject = query.relatedNode;
|
205
|
+
if (!potentialMapObject) {
|
206
|
+
return null;
|
207
|
+
}
|
208
|
+
result = await maybeCompleteKeysFromMap(cx.state.sliceDoc(potentialMapObject.from, potentialMapObject.to));
|
187
209
|
} else {
|
188
210
|
return null;
|
189
211
|
}
|
@@ -272,6 +294,29 @@ class PropertyCache {
|
|
272
294
|
}
|
273
295
|
}
|
274
296
|
|
297
|
+
async function maybeCompleteKeysFromMap(objectVariable: string): Promise<CompletionSet> {
|
298
|
+
const result = new CompletionSet();
|
299
|
+
const context = getExecutionContext();
|
300
|
+
if (!context) {
|
301
|
+
return result;
|
302
|
+
}
|
303
|
+
const maybeRetrieveKeys =
|
304
|
+
await evaluateExpression(context, `[...Map.prototype.keys.call(${objectVariable})]`, 'completion');
|
305
|
+
if (!maybeRetrieveKeys) {
|
306
|
+
return result;
|
307
|
+
}
|
308
|
+
const properties = SDK.RemoteObject.RemoteArray.objectAsArray(maybeRetrieveKeys);
|
309
|
+
const numProperties = properties.length();
|
310
|
+
for (let i = 0; i < numProperties; i++) {
|
311
|
+
result.add({
|
312
|
+
label: `"${(await properties.at(i)).value}")`,
|
313
|
+
type: 'constant',
|
314
|
+
boost: i * -1,
|
315
|
+
});
|
316
|
+
}
|
317
|
+
return result;
|
318
|
+
}
|
319
|
+
|
275
320
|
async function completeProperties(
|
276
321
|
expression: string,
|
277
322
|
quoted?: string,
|
package/package.json
CHANGED