chrome-devtools-frontend 1.0.948916 → 1.0.950768
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/all_devtools_files.gni +5 -0
- package/config/gni/devtools_grd_files.gni +5 -1
- package/docs/triage_guidelines.md +2 -2
- package/front_end/core/dom_extension/DOMExtension.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +0 -1
- package/front_end/core/host/UserMetrics.ts +0 -14
- package/front_end/core/i18n/locales/en-US.json +30 -0
- package/front_end/core/i18n/locales/en-XL.json +34 -4
- package/front_end/core/platform/platform.ts +1 -2
- package/front_end/core/platform/typescript-utilities.ts +4 -0
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/AccessibilityModel.ts +7 -7
- package/front_end/devtools_compatibility.js +0 -1
- package/front_end/entrypoints/device_mode_emulation_frame/device_mode_emulation_frame.ts +2 -7
- package/front_end/entrypoints/main/MainImpl.ts +1 -3
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +53 -7
- package/front_end/models/issues_manager/CorsIssue.ts +1 -4
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourceExpiry.md +4 -0
- package/front_end/models/issues_manager/descriptions/arInvalidAttributionSourcePriority.md +4 -0
- package/front_end/models/issues_manager/descriptions/arInvalidEventSourceTriggerData.md +9 -0
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerDedupKey.md +5 -0
- package/front_end/models/issues_manager/descriptions/arInvalidTriggerPriority.md +5 -0
- package/front_end/models/issues_manager/descriptions/corsPreflightResponseInvalid.md +2 -2
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +45 -3
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +2 -4
- package/front_end/panels/accessibility/axBreadcrumbs.css +4 -0
- package/front_end/panels/animation/animationTimeline.css +2 -1
- package/front_end/panels/application/components/FrameDetailsView.ts +29 -15
- package/front_end/panels/console/ConsolePrompt.ts +14 -8
- package/front_end/panels/elements/AccessibilityTreeView.ts +4 -6
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +44 -0
- package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -2
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +1 -0
- package/front_end/panels/sources/BreakpointEditDialog.ts +8 -5
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +23 -6
- package/front_end/third_party/codemirror.next/package.json +4 -4
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +16 -0
- package/front_end/ui/components/report_view/report.css +0 -1
- package/front_end/ui/components/text_editor/config.ts +7 -4
- package/front_end/ui/components/text_editor/javascript.ts +16 -7
- package/package.json +1 -1
- package/scripts/build/ninja/copy.gni +2 -2
- package/front_end/core/platform/utilities.ts +0 -49
- package/scripts/build/rjsmin.py +0 -484
|
@@ -2029,6 +2029,11 @@ declare abstract class WidgetType {
|
|
|
2029
2029
|
events.
|
|
2030
2030
|
*/
|
|
2031
2031
|
ignoreEvent(_event: Event): boolean;
|
|
2032
|
+
/**
|
|
2033
|
+
This is called when the an instance of the widget is removed
|
|
2034
|
+
from the editor view.
|
|
2035
|
+
*/
|
|
2036
|
+
destroy(_dom: HTMLElement): void;
|
|
2032
2037
|
}
|
|
2033
2038
|
/**
|
|
2034
2039
|
A decoration set represents a collection of decorated ranges,
|
|
@@ -2276,6 +2281,7 @@ interface MeasureRequest<T> {
|
|
|
2276
2281
|
*/
|
|
2277
2282
|
key?: any;
|
|
2278
2283
|
}
|
|
2284
|
+
declare type AttrSource = Attrs | ((view: EditorView) => Attrs | null);
|
|
2279
2285
|
/**
|
|
2280
2286
|
View [plugins](https://codemirror.net/6/docs/ref/#view.ViewPlugin) are given instances of this
|
|
2281
2287
|
class, which describe what happened, whenever the view is updated.
|
|
@@ -2539,6 +2545,7 @@ declare class EditorView {
|
|
|
2539
2545
|
readonly contentDOM: HTMLElement;
|
|
2540
2546
|
private announceDOM;
|
|
2541
2547
|
private plugins;
|
|
2548
|
+
private pluginMap;
|
|
2542
2549
|
private editorAttrs;
|
|
2543
2550
|
private contentAttrs;
|
|
2544
2551
|
private styleModules;
|
|
@@ -2757,6 +2764,11 @@ declare class EditorView {
|
|
|
2757
2764
|
Find the DOM parent node and offset (child offset if `node` is
|
|
2758
2765
|
an element, character offset when it is a text node) at the
|
|
2759
2766
|
given document position.
|
|
2767
|
+
|
|
2768
|
+
Note that for positions that aren't currently in
|
|
2769
|
+
`visibleRanges`, the resulting DOM position isn't necessarily
|
|
2770
|
+
meaningful (it may just point before or after a placeholder
|
|
2771
|
+
element).
|
|
2760
2772
|
*/
|
|
2761
2773
|
domAtPos(pos: number): {
|
|
2762
2774
|
node: Node;
|
|
@@ -2960,12 +2972,12 @@ declare class EditorView {
|
|
|
2960
2972
|
Facet that provides additional DOM attributes for the editor's
|
|
2961
2973
|
editable DOM element.
|
|
2962
2974
|
*/
|
|
2963
|
-
static contentAttributes: Facet<
|
|
2975
|
+
static contentAttributes: Facet<AttrSource, readonly AttrSource[]>;
|
|
2964
2976
|
/**
|
|
2965
2977
|
Facet that provides DOM attributes for the editor's outer
|
|
2966
2978
|
element.
|
|
2967
2979
|
*/
|
|
2968
|
-
static editorAttributes: Facet<
|
|
2980
|
+
static editorAttributes: Facet<AttrSource, readonly AttrSource[]>;
|
|
2969
2981
|
/**
|
|
2970
2982
|
An extension that enables line wrapping in the editor (by
|
|
2971
2983
|
setting CSS `white-space` to `pre-wrap` in the content).
|
|
@@ -3157,10 +3169,10 @@ Configuration options.
|
|
|
3157
3169
|
config?: SpecialCharConfig): Extension;
|
|
3158
3170
|
|
|
3159
3171
|
/**
|
|
3160
|
-
Returns
|
|
3161
|
-
equivalent to the height of the editor, minus one line
|
|
3162
|
-
that every line in the document can be scrolled to the
|
|
3163
|
-
editor.
|
|
3172
|
+
Returns an extension that makes sure the content has a bottom
|
|
3173
|
+
margin equivalent to the height of the editor, minus one line
|
|
3174
|
+
height, so that every line in the document can be scrolled to the
|
|
3175
|
+
top of the editor.
|
|
3164
3176
|
|
|
3165
3177
|
This is only meaningful when the editor is scrollable, and should
|
|
3166
3178
|
not be enabled in editors that take the size of their content.
|
|
@@ -4637,6 +4649,11 @@ declare abstract class GutterMarker extends RangeValue {
|
|
|
4637
4649
|
element that contains this marker.
|
|
4638
4650
|
*/
|
|
4639
4651
|
elementClass: string;
|
|
4652
|
+
/**
|
|
4653
|
+
Called if the marker has a `toDOM` method and its representation
|
|
4654
|
+
was removed from a gutter.
|
|
4655
|
+
*/
|
|
4656
|
+
destroy(dom: Node): void;
|
|
4640
4657
|
}
|
|
4641
4658
|
declare type Handlers = {
|
|
4642
4659
|
[event: string]: (view: EditorView, line: BlockInfo, event: Event) => boolean;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@codemirror/autocomplete": "0.19.9",
|
|
7
7
|
"@codemirror/closebrackets": "0.19.0",
|
|
8
|
-
"@codemirror/commands": "0.19.
|
|
8
|
+
"@codemirror/commands": "0.19.6",
|
|
9
9
|
"@codemirror/comment": "0.19.0",
|
|
10
10
|
"@codemirror/fold": "0.19.2",
|
|
11
|
-
"@codemirror/gutter": "0.19.
|
|
11
|
+
"@codemirror/gutter": "0.19.9",
|
|
12
12
|
"@codemirror/highlight": "0.19.6",
|
|
13
13
|
"@codemirror/history": "0.19.0",
|
|
14
14
|
"@codemirror/lang-cpp": "0.19.1",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@codemirror/lang-python": "0.19.2",
|
|
23
23
|
"@codemirror/lang-wast": "0.19.0",
|
|
24
24
|
"@codemirror/lang-xml": "0.19.2",
|
|
25
|
-
"@codemirror/language": "0.19.
|
|
25
|
+
"@codemirror/language": "0.19.7",
|
|
26
26
|
"@codemirror/legacy-modes": "0.19.0",
|
|
27
27
|
"@codemirror/matchbrackets": "0.19.3",
|
|
28
28
|
"@codemirror/panel": "0.19.0",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@codemirror/stream-parser": "0.19.2",
|
|
33
33
|
"@codemirror/text": "0.19.5",
|
|
34
34
|
"@codemirror/tooltip": "0.19.10",
|
|
35
|
-
"@codemirror/view": "0.19.
|
|
35
|
+
"@codemirror/view": "0.19.29",
|
|
36
36
|
"@lezer/common": "0.15.10",
|
|
37
37
|
"@lezer/lr": "0.15.5",
|
|
38
38
|
"@rollup/plugin-node-resolve": "^13.0.4",
|
|
@@ -27,9 +27,25 @@ export const markdownLinks = new Map<string, string>([
|
|
|
27
27
|
],
|
|
28
28
|
['issueQuirksModeDoctype', 'https://web.dev/doctype/'],
|
|
29
29
|
['sameSiteAndSameOrigin', 'https://web.dev/same-site-same-origin/'],
|
|
30
|
+
// Link URLs for deprecation issues (see blink::Deprecation)
|
|
31
|
+
['https://xhr.spec.whatwg.org/', 'https://xhr.spec.whatwg.org/'],
|
|
32
|
+
['https://goo.gl/rStTGz', 'https://goo.gl/rStTGz'],
|
|
33
|
+
['https://webrtc.org/web-apis/chrome/unified-plan/', 'https://webrtc.org/web-apis/chrome/unified-plan/'],
|
|
34
|
+
[
|
|
35
|
+
'https://developer.chrome.com/blog/enabling-shared-array-buffer/',
|
|
36
|
+
'https://developer.chrome.com/blog/enabling-shared-array-buffer/',
|
|
37
|
+
],
|
|
38
|
+
['https://developer.chrome.com/docs/extensions/mv3/', 'https://developer.chrome.com/docs/extensions/mv3/'],
|
|
39
|
+
[
|
|
40
|
+
'https://developer.chrome.com/blog/immutable-document-domain',
|
|
41
|
+
'https://developer.chrome.com/blog/immutable-document-domain',
|
|
42
|
+
],
|
|
30
43
|
]);
|
|
31
44
|
|
|
32
45
|
export const getMarkdownLink = (key: string): string => {
|
|
46
|
+
if (/^https:\/\/www.chromestatus.com\/feature\/\d+$/.test(key)) {
|
|
47
|
+
return key;
|
|
48
|
+
}
|
|
33
49
|
const link = markdownLinks.get(key);
|
|
34
50
|
if (!link) {
|
|
35
51
|
throw new Error(`Markdown link with key '${key}' is not available, please check MarkdownLinksMap.ts`);
|
|
@@ -70,10 +70,13 @@ export const tabMovesFocus = DynamicSetting.bool('textEditorTabMovesFocus', [],
|
|
|
70
70
|
shift: (view: CM.EditorView): boolean => view.state.doc.length ? CM.indentLess(view) : false,
|
|
71
71
|
}]));
|
|
72
72
|
|
|
73
|
-
export const autocompletion =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
73
|
+
export const autocompletion: CM.Extension = [
|
|
74
|
+
CM.autocompletion({
|
|
75
|
+
icons: false,
|
|
76
|
+
optionClass: (option: CM.Completion): string => option.type === 'secondary' ? 'cm-secondaryCompletion' : '',
|
|
77
|
+
}),
|
|
78
|
+
CM.Prec.highest(CM.keymap.of([{key: 'ArrowRight', run: CM.acceptCompletion}])),
|
|
79
|
+
];
|
|
77
80
|
|
|
78
81
|
export const sourcesAutocompletion = DynamicSetting.bool('textEditorAutocompletion', autocompletion);
|
|
79
82
|
|
|
@@ -402,13 +402,22 @@ async function completeExpressionGlobal(): Promise<CompletionSet> {
|
|
|
402
402
|
return fetchNames;
|
|
403
403
|
}
|
|
404
404
|
|
|
405
|
-
export function isExpressionComplete(
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
405
|
+
export async function isExpressionComplete(expression: string): Promise<boolean> {
|
|
406
|
+
const currentExecutionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
407
|
+
if (!currentExecutionContext) {
|
|
408
|
+
return true;
|
|
409
|
+
}
|
|
410
|
+
const result =
|
|
411
|
+
await currentExecutionContext.runtimeModel.compileScript(expression, '', false, currentExecutionContext.id);
|
|
412
|
+
if (!result || !result.exceptionDetails || !result.exceptionDetails.exception) {
|
|
413
|
+
return true;
|
|
414
|
+
}
|
|
415
|
+
const description = result.exceptionDetails.exception.description;
|
|
416
|
+
if (description) {
|
|
417
|
+
return !description.startsWith('SyntaxError: Unexpected end of input') &&
|
|
418
|
+
!description.startsWith('SyntaxError: Unterminated template literal');
|
|
419
|
+
}
|
|
420
|
+
return false;
|
|
412
421
|
}
|
|
413
422
|
|
|
414
423
|
export function argumentHints(): CodeMirror.Extension {
|
package/package.json
CHANGED
|
@@ -16,8 +16,8 @@ template("copy_to_gen") {
|
|
|
16
16
|
|
|
17
17
|
script = "scripts/build/ninja/copy-files.js"
|
|
18
18
|
|
|
19
|
-
_copy_src = rebase_path(get_path_info(target_name, "dir"))
|
|
20
|
-
_copy_dest = rebase_path(target_gen_dir)
|
|
19
|
+
_copy_src = rebase_path(get_path_info(target_name, "dir"), root_build_dir)
|
|
20
|
+
_copy_dest = rebase_path(target_gen_dir, root_build_dir)
|
|
21
21
|
|
|
22
22
|
args = [
|
|
23
23
|
_copy_src,
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
// Copyright 2020 The Chromium Authors. All rights reserved.
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
/*
|
|
6
|
-
* Copyright (C) 2007 Apple Inc. All rights reserved.
|
|
7
|
-
* Copyright (C) 2012 Google Inc. All rights reserved.
|
|
8
|
-
*
|
|
9
|
-
* Redistribution and use in source and binary forms, with or without
|
|
10
|
-
* modification, are permitted provided that the following conditions
|
|
11
|
-
* are met:
|
|
12
|
-
*
|
|
13
|
-
* 1. Redistributions of source code must retain the above copyright
|
|
14
|
-
* notice, this list of conditions and the following disclaimer.
|
|
15
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
|
16
|
-
* notice, this list of conditions and the following disclaimer in the
|
|
17
|
-
* documentation and/or other materials provided with the distribution.
|
|
18
|
-
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
|
19
|
-
* its contributors may be used to endorse or promote products derived
|
|
20
|
-
* from this software without specific prior written permission.
|
|
21
|
-
*
|
|
22
|
-
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
|
|
23
|
-
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
24
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
25
|
-
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
|
26
|
-
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
27
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
28
|
-
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
29
|
-
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
30
|
-
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
31
|
-
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
export function runOnWindowLoad(callback: () => void): void {
|
|
35
|
-
function windowLoaded(): void {
|
|
36
|
-
window.removeEventListener('DOMContentLoaded', windowLoaded, false);
|
|
37
|
-
callback();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (document.readyState === 'complete' || document.readyState === 'interactive') {
|
|
41
|
-
callback();
|
|
42
|
-
} else {
|
|
43
|
-
window.addEventListener('DOMContentLoaded', windowLoaded, false);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function assertNever(type: never, message: string): never {
|
|
48
|
-
throw new Error(message);
|
|
49
|
-
}
|