chrome-devtools-frontend 1.0.927127 → 1.0.928589
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/AUTHORS +1 -0
- package/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +30 -4
- package/config/gni/devtools_image_files.gni +1 -0
- package/front_end/Images/src/ic_preview_feature.svg +3 -0
- package/front_end/Tests.js +2 -3
- package/front_end/core/common/Settings.ts +26 -45
- package/front_end/core/host/UserMetrics.ts +2 -2
- package/front_end/core/i18n/locales/en-US.json +60 -15
- package/front_end/core/i18n/locales/en-XL.json +60 -15
- package/front_end/core/platform/keyboard-utilities.ts +1 -0
- package/front_end/core/root/Runtime.ts +62 -61
- package/front_end/core/sdk/AccessibilityModel.ts +73 -73
- package/front_end/core/sdk/CPUProfileDataModel.ts +14 -14
- package/front_end/core/sdk/CPUProfilerModel.ts +33 -33
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -8
- package/front_end/core/sdk/CSSFontFace.ts +10 -10
- package/front_end/core/sdk/CSSMatchedStyles.ts +114 -114
- package/front_end/core/sdk/CSSMedia.ts +22 -22
- package/front_end/core/sdk/CSSMetadata.ts +53 -49
- package/front_end/core/sdk/CSSModel.ts +139 -135
- package/front_end/core/sdk/CSSProperty.ts +18 -18
- package/front_end/core/sdk/CSSRule.ts +15 -15
- package/front_end/core/sdk/CSSStyleDeclaration.ts +49 -47
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +12 -12
- package/front_end/core/sdk/ChildTargetManager.ts +41 -40
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +10 -10
- package/front_end/core/sdk/Connections.ts +81 -81
- package/front_end/core/sdk/ConsoleModel.ts +68 -68
- package/front_end/core/sdk/Cookie.ts +48 -48
- package/front_end/core/sdk/CookieModel.ts +13 -13
- package/front_end/core/sdk/CookieParser.ts +45 -45
- package/front_end/core/sdk/DOMDebuggerModel.ts +131 -131
- package/front_end/core/sdk/DOMModel.ts +264 -252
- package/front_end/core/sdk/DebuggerModel.ts +209 -205
- package/front_end/core/sdk/EmulationModel.ts +76 -76
- package/front_end/core/sdk/FilmStripModel.ts +29 -29
- package/front_end/core/sdk/FrameManager.ts +43 -42
- package/front_end/core/sdk/HeapProfilerModel.ts +36 -36
- package/front_end/core/sdk/IsolateManager.ts +82 -82
- package/front_end/core/sdk/IssuesModel.ts +6 -6
- package/front_end/core/sdk/LayerTreeBase.ts +37 -37
- package/front_end/core/sdk/LogModel.ts +5 -5
- package/front_end/core/sdk/NetworkManager.ts +229 -225
- package/front_end/core/sdk/NetworkRequest.ts +368 -360
- package/front_end/core/sdk/OverlayColorGenerator.ts +9 -9
- package/front_end/core/sdk/OverlayModel.ts +155 -153
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +100 -101
- package/front_end/core/sdk/PageResourceLoader.ts +30 -30
- package/front_end/core/sdk/PaintProfiler.ts +16 -16
- package/front_end/core/sdk/PerformanceMetricsModel.ts +12 -12
- package/front_end/core/sdk/ProfileTreeModel.ts +3 -3
- package/front_end/core/sdk/RemoteObject.ts +108 -104
- package/front_end/core/sdk/Resource.ts +85 -84
- package/front_end/core/sdk/ResourceTreeModel.ts +150 -145
- package/front_end/core/sdk/RuntimeModel.ts +38 -34
- package/front_end/core/sdk/SDKModel.ts +3 -3
- package/front_end/core/sdk/ScreenCaptureModel.ts +19 -19
- package/front_end/core/sdk/Script.ts +29 -29
- package/front_end/core/sdk/SecurityOriginManager.ts +19 -19
- package/front_end/core/sdk/ServerTiming.ts +2 -2
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +43 -43
- package/front_end/core/sdk/ServiceWorkerManager.ts +72 -68
- package/front_end/core/sdk/SourceMap.ts +40 -36
- package/front_end/core/sdk/SourceMapManager.ts +57 -57
- package/front_end/core/sdk/Target.ts +64 -63
- package/front_end/core/sdk/TargetManager.ts +60 -56
- package/front_end/core/sdk/TracingManager.ts +39 -39
- package/front_end/core/sdk/TracingModel.ts +125 -125
- package/front_end/core/sdk/WebAuthnModel.ts +9 -9
- package/front_end/entrypoints/lighthouse_worker/{LighthouseService.js → LighthouseService.ts} +20 -45
- package/front_end/entrypoints/lighthouse_worker/{lighthouse_worker.js → lighthouse_worker.ts} +0 -0
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/legacy_test_runner/elements_test_runner/ElementsTestRunner.js +4 -4
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +1 -1
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -6
- package/front_end/models/issues_manager/GenericIssue.ts +86 -0
- package/front_end/models/issues_manager/Issue.ts +24 -0
- package/front_end/models/issues_manager/IssuesManager.ts +18 -6
- package/front_end/models/issues_manager/descriptions/genericCrossOriginPortalPostMessageError.md +3 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5422 -1
- package/front_end/panels/console/ConsoleSidebar.ts +0 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +53 -61
- package/front_end/panels/elements/ElementsTreeOutline.ts +0 -1
- package/front_end/panels/elements/components/LayoutPane.ts +5 -1
- package/front_end/panels/issues/GenericIssueDetailsView.ts +68 -0
- package/front_end/panels/issues/IssueAggregator.ts +16 -0
- package/front_end/panels/issues/IssueKindView.ts +95 -0
- package/front_end/panels/issues/IssueView.ts +6 -0
- package/front_end/panels/issues/IssuesPane.ts +81 -18
- package/front_end/panels/issues/issuesTree.css +8 -3
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/networkLogView.css +5 -0
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +1 -0
- package/front_end/panels/settings/settingsScreen.css +24 -0
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +8 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/sources-meta.ts +22 -7
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +4 -4
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +137 -0
- package/front_end/ui/components/code_highlighter/codeHighlighter.css +51 -0
- package/front_end/ui/components/code_highlighter/code_highlighter.ts +11 -0
- package/front_end/ui/components/docs/text_editor/basic.html +28 -0
- package/front_end/ui/components/docs/text_editor/basic.ts +14 -0
- package/front_end/ui/components/docs/text_prompt/basic.html +35 -0
- package/front_end/ui/components/docs/text_prompt/basic.ts +19 -0
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +1 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +17 -0
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +1 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +161 -0
- package/front_end/ui/components/text_editor/config.ts +264 -0
- package/front_end/{panels/console/components/components.ts → ui/components/text_editor/text_editor.ts} +2 -5
- package/front_end/ui/components/text_editor/theme.ts +113 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +144 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +33 -0
- package/front_end/ui/components/text_prompt/text_prompt.ts +9 -0
- package/front_end/ui/legacy/ARIAUtils.ts +14 -11
- package/front_end/ui/legacy/TabbedPane.ts +32 -3
- package/front_end/ui/legacy/UIUtils.ts +3 -1
- package/front_end/ui/legacy/View.ts +6 -0
- package/front_end/ui/legacy/ViewManager.ts +5 -1
- package/front_end/ui/legacy/ViewRegistration.ts +5 -0
- package/front_end/ui/legacy/XLink.ts +1 -1
- package/front_end/ui/legacy/closeButton.css +6 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +38 -38
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +10 -4
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +23 -6
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +14 -16
- package/front_end/ui/legacy/filter.css +1 -0
- package/front_end/ui/legacy/tabbedPane.css +24 -0
- package/front_end/ui/legacy/toolbar.css +5 -0
- package/inspector_overlay/main.ts +2 -1
- package/inspector_overlay/tool_screenshot.ts +8 -1
- package/package.json +1 -1
- package/scripts/build/rollup.config.js +9 -0
- package/scripts/migration/class-fields/migrate.js +56 -0
- package/scripts/migration/class-fields/package.json +5 -0
- package/front_end/panels/console/components/SidebarDeprecation.ts +0 -58
- package/front_end/panels/console/components/sidebarDeprecation.css +0 -17
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
import {Cookie, Type} from './Cookie.js';
|
|
39
39
|
|
|
40
40
|
export class CookieParser {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
readonly #domain: string|undefined;
|
|
42
|
+
#cookiesInternal: Cookie[];
|
|
43
|
+
#input!: string|undefined;
|
|
44
|
+
#originalInputLength: number;
|
|
45
|
+
#lastCookie?: Cookie|null;
|
|
46
|
+
#lastCookieLine?: string;
|
|
47
|
+
#lastCookiePosition?: number;
|
|
48
48
|
constructor(domain?: string) {
|
|
49
49
|
if (domain) {
|
|
50
|
-
// Handle domain according to
|
|
50
|
+
// Handle #domain according to
|
|
51
51
|
// https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-5.3.3
|
|
52
|
-
this
|
|
52
|
+
this.#domain = domain.toLowerCase().replace(/^\./, '');
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
this
|
|
55
|
+
this.#cookiesInternal = [];
|
|
56
56
|
|
|
57
|
-
this
|
|
57
|
+
this.#originalInputLength = 0;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
static parseSetCookie(header: string|undefined, domain?: string): Cookie[]|null {
|
|
@@ -62,7 +62,7 @@ export class CookieParser {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
cookies(): Cookie[] {
|
|
65
|
-
return this
|
|
65
|
+
return this.#cookiesInternal;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
parseSetCookie(setCookieHeader: string|undefined): Cookie[]|null {
|
|
@@ -70,8 +70,8 @@ export class CookieParser {
|
|
|
70
70
|
return null;
|
|
71
71
|
}
|
|
72
72
|
for (let kv = this.extractKeyValue(); kv; kv = this.extractKeyValue()) {
|
|
73
|
-
if (this
|
|
74
|
-
this
|
|
73
|
+
if (this.#lastCookie) {
|
|
74
|
+
this.#lastCookie.addAttribute(kv.key, kv.value);
|
|
75
75
|
} else {
|
|
76
76
|
this.addCookie(kv, Type.Response);
|
|
77
77
|
}
|
|
@@ -80,36 +80,36 @@ export class CookieParser {
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
this.flushCookie();
|
|
83
|
-
return this
|
|
83
|
+
return this.#cookiesInternal;
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
private initialize(headerValue: string|undefined): boolean {
|
|
87
|
-
this
|
|
87
|
+
this.#input = headerValue;
|
|
88
88
|
|
|
89
89
|
if (typeof headerValue !== 'string') {
|
|
90
90
|
return false;
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
this
|
|
94
|
-
this
|
|
95
|
-
this
|
|
96
|
-
this
|
|
93
|
+
this.#cookiesInternal = [];
|
|
94
|
+
this.#lastCookie = null;
|
|
95
|
+
this.#lastCookieLine = '';
|
|
96
|
+
this.#originalInputLength = (this.#input as string).length;
|
|
97
97
|
return true;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
private flushCookie(): void {
|
|
101
|
-
if (this
|
|
101
|
+
if (this.#lastCookie) {
|
|
102
102
|
// if we have a last cookie we know that these valeus all exist, hence the typecasts
|
|
103
|
-
this
|
|
104
|
-
this
|
|
105
|
-
this
|
|
103
|
+
this.#lastCookie.setSize(
|
|
104
|
+
this.#originalInputLength - (this.#input as string).length - (this.#lastCookiePosition as number));
|
|
105
|
+
this.#lastCookie.setCookieLine((this.#lastCookieLine as string).replace('\n', ''));
|
|
106
106
|
}
|
|
107
|
-
this
|
|
108
|
-
this
|
|
107
|
+
this.#lastCookie = null;
|
|
108
|
+
this.#lastCookieLine = '';
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
private extractKeyValue(): KeyValue|null {
|
|
112
|
-
if (!this
|
|
112
|
+
if (!this.#input || !this.#input.length) {
|
|
113
113
|
return null;
|
|
114
114
|
}
|
|
115
115
|
// Note: RFCs offer an option for quoted values that may contain commas and semicolons.
|
|
@@ -117,48 +117,48 @@ export class CookieParser {
|
|
|
117
117
|
// and http://crbug.com/12361). The logic below matches latest versions of IE, Firefox,
|
|
118
118
|
// Chrome and Safari on some old platforms. The latest version of Safari supports quoted
|
|
119
119
|
// cookie values, though.
|
|
120
|
-
const keyValueMatch = /^[ \t]*([
|
|
120
|
+
const keyValueMatch = /^[ \t]*([^=;]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this.#input);
|
|
121
121
|
if (!keyValueMatch) {
|
|
122
|
-
console.error('Failed parsing cookie header before: ' + this
|
|
122
|
+
console.error('Failed parsing cookie header before: ' + this.#input);
|
|
123
123
|
return null;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
const result = new KeyValue(
|
|
127
|
-
keyValueMatch[1], keyValueMatch[2] && keyValueMatch[2].trim(),
|
|
128
|
-
(this
|
|
129
|
-
this
|
|
130
|
-
this
|
|
127
|
+
keyValueMatch[1] && keyValueMatch[1].trim(), keyValueMatch[2] && keyValueMatch[2].trim(),
|
|
128
|
+
(this.#originalInputLength as number) - this.#input.length);
|
|
129
|
+
this.#lastCookieLine += keyValueMatch[0];
|
|
130
|
+
this.#input = this.#input.slice(keyValueMatch[0].length);
|
|
131
131
|
return result;
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
private advanceAndCheckCookieDelimiter(): boolean {
|
|
135
|
-
if (!this
|
|
135
|
+
if (!this.#input) {
|
|
136
136
|
return false;
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
const match = /^\s*[\n;]\s*/.exec(this
|
|
139
|
+
const match = /^\s*[\n;]\s*/.exec(this.#input);
|
|
140
140
|
if (!match) {
|
|
141
141
|
return false;
|
|
142
142
|
}
|
|
143
|
-
this
|
|
144
|
-
this
|
|
143
|
+
this.#lastCookieLine += match[0];
|
|
144
|
+
this.#input = this.#input.slice(match[0].length);
|
|
145
145
|
return match[0].match('\n') !== null;
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
private addCookie(keyValue: KeyValue, type: Type): void {
|
|
149
|
-
if (this
|
|
150
|
-
this
|
|
149
|
+
if (this.#lastCookie) {
|
|
150
|
+
this.#lastCookie.setSize(keyValue.position - (this.#lastCookiePosition as number));
|
|
151
151
|
}
|
|
152
152
|
|
|
153
153
|
// Mozilla bug 169091: Mozilla, IE and Chrome treat single token (w/o "=") as
|
|
154
154
|
// specifying a value for a cookie with empty name.
|
|
155
|
-
this
|
|
156
|
-
|
|
157
|
-
if (this
|
|
158
|
-
this
|
|
155
|
+
this.#lastCookie = typeof keyValue.value === 'string' ? new Cookie(keyValue.key, keyValue.value, type) :
|
|
156
|
+
new Cookie('', keyValue.key, type);
|
|
157
|
+
if (this.#domain) {
|
|
158
|
+
this.#lastCookie.addAttribute('domain', this.#domain);
|
|
159
159
|
}
|
|
160
|
-
this
|
|
161
|
-
this
|
|
160
|
+
this.#lastCookiePosition = keyValue.position;
|
|
161
|
+
this.#cookiesInternal.push(this.#lastCookie);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
164
|
|