chrome-devtools-frontend 1.0.1679704 → 1.0.1681498
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/front_end/core/platform/TypescriptUtilities.ts +0 -9
- package/front_end/core/platform/platform.ts +1 -1
- package/front_end/core/sdk/ConsoleModel.ts +6 -3
- package/front_end/core/sdk/DOMModel.ts +110 -0
- package/front_end/core/sdk/EmulationModel.ts +4 -2
- package/front_end/core/sdk/NetworkManager.ts +15 -9
- package/front_end/core/sdk/OverlayModel.ts +3 -2
- package/front_end/core/sdk/PageResourceLoader.ts +4 -3
- package/front_end/core/sdk/RuntimeModel.ts +5 -3
- package/front_end/core/sdk/SDKSettings.ts +66 -0
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +4 -2
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +32 -0
- package/front_end/entrypoints/main/MainImpl.ts +1 -1
- package/front_end/entrypoints/main/main-meta.ts +82 -0
- package/front_end/entrypoints/shell/shell.ts +0 -3
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -3
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.ts +20 -0
- package/front_end/generated/protocol-mapping.d.ts +7 -0
- package/front_end/generated/protocol-proxy-api.d.ts +5 -0
- package/front_end/generated/protocol.ts +15 -3
- package/front_end/models/ai_code_completion/debug.ts +6 -3
- package/front_end/models/ai_code_generation/debug.ts +6 -3
- package/front_end/models/badges/UserBadges.ts +9 -2
- package/front_end/models/emulation/DeviceModeModel.ts +16 -27
- package/front_end/models/emulation/EmulatedDevices.ts +30 -125
- package/front_end/models/extensions/ExtensionAPI.ts +34 -23
- package/front_end/models/logs/NetworkLog.ts +3 -3
- package/front_end/models/logs/logs-meta.ts +0 -60
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +2 -0
- package/front_end/panels/common/BadgeNotification.ts +1 -1
- package/front_end/panels/common/ExtensionPanel.ts +12 -7
- package/front_end/panels/common/ExtensionServer.ts +76 -16
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +4 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
- package/front_end/panels/console/console-meta.ts +19 -5
- package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
- package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
- package/front_end/panels/elements/DOMTreeContextMenu.ts +538 -0
- package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
- package/front_end/panels/elements/ElementStatePaneWidget.ts +6 -6
- package/front_end/panels/elements/ElementsPanel.ts +10 -10
- package/front_end/panels/elements/ElementsTreeElement.ts +47 -514
- package/front_end/panels/elements/ElementsTreeOutline.ts +168 -297
- package/front_end/panels/elements/EventListenersWidget.ts +8 -8
- package/front_end/panels/elements/LayersWidget.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +11 -11
- package/front_end/panels/elements/MarkerDecorator.ts +3 -3
- package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
- package/front_end/panels/elements/PropertiesWidget.ts +4 -4
- package/front_end/panels/elements/PropertyRenderer.ts +2 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +14 -14
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +13 -13
- package/front_end/panels/elements/elements.ts +3 -0
- package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
- package/front_end/panels/issues/AffectedElementsView.ts +5 -0
- package/front_end/panels/issues/CorsIssueDetailsView.ts +13 -9
- package/front_end/panels/issues/IssueView.ts +7 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +3 -1
- package/front_end/panels/network/NetworkConfigView.ts +2 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -2
- package/front_end/panels/network/NetworkOverview.ts +11 -5
- package/front_end/panels/network/NetworkPanel.ts +3 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/components/ResponseHeaderSection.ts +6 -2
- package/front_end/panels/network/network-meta.ts +117 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +2 -1
- package/front_end/panels/profiler/ProfileLauncherView.ts +19 -16
- package/front_end/panels/profiler/ProfileSidebarTreeElement.ts +1 -1
- package/front_end/panels/security/security.ts +6 -0
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
- package/front_end/panels/sources/NavigatorView.ts +6 -2
- package/front_end/panels/sources/SourcesNavigator.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +4 -2
- package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
- package/front_end/panels/sources/SourcesView.ts +8 -107
- package/front_end/panels/sources/TabbedEditorContainer.ts +110 -7
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +16 -0
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +6 -0
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +4 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/MetricCard.ts +4 -3
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +5 -2
- package/front_end/panels/timeline/components/TimelineRangeSummaryView.ts +1 -1
- package/front_end/panels/timeline/components/TimelineSummary.ts +8 -5
- package/front_end/panels/web_audio/WebAudioView.ts +8 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/rebuild.sh +1 -1
- package/front_end/ui/legacy/TabbedPane.ts +34 -2
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +164 -325
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -5
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +7 -7
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +1 -1
- package/front_end/ui/legacy/components/quick_open/quick_open-meta.ts +2 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +40 -0
- package/mcp/mcp.ts +0 -3
- package/package.json +1 -1
- package/front_end/core/sdk/sdk-meta.ts +0 -178
- package/front_end/models/badges/badges-meta.ts +0 -27
- package/front_end/models/persistence/persistence-meta.ts +0 -69
|
@@ -142,11 +142,11 @@ const UIStrings = {
|
|
|
142
142
|
*/
|
|
143
143
|
selectAnElementInThePageTo: 'Select an element in the page to inspect it',
|
|
144
144
|
/**
|
|
145
|
-
* @description Title/tooltip of an action in the
|
|
145
|
+
* @description Title/tooltip of an action in the Elements panel to add a new style rule.
|
|
146
146
|
*/
|
|
147
|
-
newStyleRule: 'New
|
|
147
|
+
newStyleRule: 'New style rule',
|
|
148
148
|
/**
|
|
149
|
-
* @description Title/tooltip of an action in the
|
|
149
|
+
* @description Title/tooltip of an action in the Elements panel to refresh the event listeners.
|
|
150
150
|
*/
|
|
151
151
|
refreshEventListeners: 'Refresh event listeners',
|
|
152
152
|
/**
|
|
@@ -166,11 +166,11 @@ const UIStrings = {
|
|
|
166
166
|
*/
|
|
167
167
|
htmlComments: 'HTML comments',
|
|
168
168
|
/**
|
|
169
|
-
* @description Title of an option under the Elements category that can be invoked through the Command Menu
|
|
169
|
+
* @description Title of an option under the Elements category that can be invoked through the Command Menu.
|
|
170
170
|
*/
|
|
171
171
|
showHtmlComments: 'Show `HTML` comments',
|
|
172
172
|
/**
|
|
173
|
-
* @description Title of an option under the Elements category that can be invoked through the Command Menu
|
|
173
|
+
* @description Title of an option under the Elements category that can be invoked through the Command Menu.
|
|
174
174
|
*/
|
|
175
175
|
hideHtmlComments: 'Hide `HTML` comments',
|
|
176
176
|
/**
|
|
@@ -187,12 +187,12 @@ const UIStrings = {
|
|
|
187
187
|
detailedInspectTooltip: 'Detailed inspect tooltip',
|
|
188
188
|
/**
|
|
189
189
|
* @description Title of a setting under the Elements category in Settings. Turns on a mode where
|
|
190
|
-
* hovering over CSS properties in the Styles
|
|
190
|
+
* hovering over CSS properties in the Styles tab will display a popover with documentation.
|
|
191
191
|
*/
|
|
192
192
|
CSSDocumentationTooltip: 'CSS documentation tooltip',
|
|
193
193
|
/**
|
|
194
|
-
* @description A context menu item (command) in the Elements panel that
|
|
195
|
-
*
|
|
194
|
+
* @description A context menu item (command) in the Elements panel that copies the styles of
|
|
195
|
+
* an HTML element.
|
|
196
196
|
*/
|
|
197
197
|
copyStyles: 'Copy styles',
|
|
198
198
|
/**
|
|
@@ -201,20 +201,20 @@ const UIStrings = {
|
|
|
201
201
|
*/
|
|
202
202
|
toggleA11yTree: 'Toggle accessibility tree',
|
|
203
203
|
/**
|
|
204
|
-
* @description Title of a setting under the Elements category. Whether to show
|
|
204
|
+
* @description Title of a setting under the Elements category. Whether to show or hide
|
|
205
205
|
* the shadow DOM nodes of HTML elements that are built into the browser (e.g. the <input> element).
|
|
206
206
|
*/
|
|
207
207
|
userAgentShadowDOM: 'User agent shadow `DOM`',
|
|
208
208
|
/**
|
|
209
209
|
* @description Command for showing the 'Computed' tool. Displays computed CSS styles in Elements sidebar.
|
|
210
210
|
*/
|
|
211
|
-
showComputedStyles: 'Show Computed
|
|
211
|
+
showComputedStyles: 'Show Computed styles',
|
|
212
212
|
/**
|
|
213
213
|
* @description Command for showing the 'Styles' tool. Displays CSS styles in Elements sidebar.
|
|
214
214
|
*/
|
|
215
215
|
showStyles: 'Show Styles',
|
|
216
216
|
/**
|
|
217
|
-
* @description Command for toggling the eye dropper when the color picker is open
|
|
217
|
+
* @description Command for toggling the eye dropper when the color picker is open.
|
|
218
218
|
*/
|
|
219
219
|
toggleEyeDropper: 'Toggle eye dropper',
|
|
220
220
|
/**
|
|
@@ -222,11 +222,11 @@ const UIStrings = {
|
|
|
222
222
|
*/
|
|
223
223
|
cssAnimationsOnlyWhenAnimationsTabOpen: 'Show animation styles only when the Animations tab is open',
|
|
224
224
|
/**
|
|
225
|
-
* @description Whether CSS rules that do not apply active styles in the Styles
|
|
225
|
+
* @description Whether CSS rules that do not apply active styles in the Styles tab are collapsed by default.
|
|
226
226
|
*/
|
|
227
227
|
collapseNonContributingCSSRules: 'Collapse non-contributing CSS rules',
|
|
228
228
|
/**
|
|
229
|
-
* @description Title of a setting in the Event
|
|
229
|
+
* @description Title of a setting in the Event listeners tab.
|
|
230
230
|
*/
|
|
231
231
|
frameworkListeners: 'Framework listeners',
|
|
232
232
|
} as const;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import './InspectElementModeController.js';
|
|
6
6
|
import './ColorSwatchPopoverIcon.js';
|
|
7
7
|
import './DOMPath.js';
|
|
8
|
+
import './DOMTreeContextMenu.js';
|
|
8
9
|
import './ElementsSidebarPane.js';
|
|
9
10
|
import './ElementsTreeElement.js';
|
|
10
11
|
import './AdoptedStyleSheetTreeElement.js';
|
|
@@ -40,6 +41,7 @@ import * as CSSRuleValidator from './CSSRuleValidator.js';
|
|
|
40
41
|
import * as CSSSpecificityBreakdown from './CSSSpecificityBreakdown.js';
|
|
41
42
|
import * as CSSValueTraceView from './CSSValueTraceView.js';
|
|
42
43
|
import * as DOMPath from './DOMPath.js';
|
|
44
|
+
import * as DOMTreeContextMenu from './DOMTreeContextMenu.js';
|
|
43
45
|
import * as ElementsPanel from './ElementsPanel.js';
|
|
44
46
|
import * as ElementsSidebarPane from './ElementsSidebarPane.js';
|
|
45
47
|
import * as ElementStatePaneWidget from './ElementStatePaneWidget.js';
|
|
@@ -77,6 +79,7 @@ export {
|
|
|
77
79
|
CSSSpecificityBreakdown,
|
|
78
80
|
CSSValueTraceView,
|
|
79
81
|
DOMPath,
|
|
82
|
+
DOMTreeContextMenu,
|
|
80
83
|
ElementsPanel,
|
|
81
84
|
ElementsSidebarPane,
|
|
82
85
|
ElementStatePaneWidget,
|
|
@@ -67,6 +67,7 @@ export class AffectedCookiesView extends AffectedResourcesView {
|
|
|
67
67
|
#appendAffectedCookie(cookie: Protocol.Audits.AffectedCookie, hasAssociatedRequest: boolean): void {
|
|
68
68
|
const element = document.createElement('tr');
|
|
69
69
|
element.classList.add('affected-resource-cookie');
|
|
70
|
+
element.setAttribute('jslog', `${VisualLogging.tableRow('affected-cookie')}`);
|
|
70
71
|
const name = document.createElement('td');
|
|
71
72
|
if (hasAssociatedRequest) {
|
|
72
73
|
const link = document.createElement('button');
|
|
@@ -121,6 +122,7 @@ export class AffectedRawCookieLinesView extends AffectedResourcesView {
|
|
|
121
122
|
for (const cookie of cookieLinesWithRequestIndicator) {
|
|
122
123
|
const row = document.createElement('tr');
|
|
123
124
|
row.classList.add('affected-resource-directive');
|
|
125
|
+
row.setAttribute('jslog', `${VisualLogging.tableRow('affected-raw-cookie')}`);
|
|
124
126
|
if (cookie.hasRequest) {
|
|
125
127
|
const cookieLine = document.createElement('td');
|
|
126
128
|
const link = document.createElement('button');
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
9
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
9
10
|
|
|
10
11
|
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
|
11
12
|
|
|
@@ -34,6 +35,10 @@ export class AffectedElementsView extends AffectedResourcesView {
|
|
|
34
35
|
async #appendAffectedElement(element: IssuesManager.Issue.AffectedElement): Promise<void> {
|
|
35
36
|
const cellElement = await this.createElementCell(element, this.issue.getCategory());
|
|
36
37
|
const rowElement = document.createElement('tr');
|
|
38
|
+
rowElement.setAttribute('jslog', `${VisualLogging.tableRow('affected-element')}`);
|
|
39
|
+
if (element.backendNodeId) {
|
|
40
|
+
rowElement.setAttribute('data-backend-node-id', String(element.backendNodeId));
|
|
41
|
+
}
|
|
37
42
|
rowElement.appendChild(cellElement);
|
|
38
43
|
this.affectedResources.appendChild(rowElement);
|
|
39
44
|
}
|
|
@@ -204,11 +204,14 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
|
|
|
204
204
|
case IssuesManager.CorsIssue.IssueCode.NO_CORS_REDIRECT_MODE_NOT_FOLLOW:
|
|
205
205
|
this.appendColumnTitle(header, i18nString(UIStrings.sourceLocation));
|
|
206
206
|
break;
|
|
207
|
+
case IssuesManager.CorsIssue.IssueCode.PREFLIGHT_MISSING_ALLOW_EXTERNAL:
|
|
208
|
+
case IssuesManager.CorsIssue.IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL:
|
|
209
|
+
case IssuesManager.CorsIssue.IssueCode.INVALID_LOCAL_NETWORK_ACCESS:
|
|
210
|
+
case IssuesManager.CorsIssue.IssueCode.LOCAL_NETWORK_ACCESS_PERMISSION_DENIED:
|
|
211
|
+
// The default columns suffice.
|
|
212
|
+
break;
|
|
207
213
|
default:
|
|
208
|
-
Platform.
|
|
209
|
-
IssuesManager.CorsIssue.IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL|
|
|
210
|
-
IssuesManager.CorsIssue.IssueCode.INVALID_LOCAL_NETWORK_ACCESS|
|
|
211
|
-
IssuesManager.CorsIssue.IssueCode.LOCAL_NETWORK_ACCESS_PERMISSION_DENIED>(issueCode);
|
|
214
|
+
Platform.assertNever(issueCode, 'Unknow issue code ' + issueCode);
|
|
212
215
|
}
|
|
213
216
|
|
|
214
217
|
this.affectedResources.appendChild(header);
|
|
@@ -428,14 +431,15 @@ export class CorsIssueDetailsView extends AffectedResourcesView {
|
|
|
428
431
|
this.#appendStatus(element, details.isWarning);
|
|
429
432
|
this.appendSourceLocation(element, details.location, issue.model()?.getTargetIfNotDisposed());
|
|
430
433
|
break;
|
|
431
|
-
|
|
434
|
+
case IssuesManager.CorsIssue.IssueCode.PREFLIGHT_MISSING_ALLOW_EXTERNAL:
|
|
435
|
+
case IssuesManager.CorsIssue.IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL:
|
|
436
|
+
case IssuesManager.CorsIssue.IssueCode.INVALID_LOCAL_NETWORK_ACCESS:
|
|
437
|
+
case IssuesManager.CorsIssue.IssueCode.LOCAL_NETWORK_ACCESS_PERMISSION_DENIED:
|
|
432
438
|
element.appendChild(this.createRequestCell(details.request, opts));
|
|
433
439
|
this.#appendStatus(element, details.isWarning);
|
|
434
|
-
Platform.assertUnhandled<IssuesManager.CorsIssue.IssueCode.PREFLIGHT_MISSING_ALLOW_EXTERNAL|
|
|
435
|
-
IssuesManager.CorsIssue.IssueCode.PREFLIGHT_INVALID_ALLOW_EXTERNAL|
|
|
436
|
-
IssuesManager.CorsIssue.IssueCode.INVALID_LOCAL_NETWORK_ACCESS|
|
|
437
|
-
IssuesManager.CorsIssue.IssueCode.LOCAL_NETWORK_ACCESS_PERMISSION_DENIED>(issueCode);
|
|
438
440
|
break;
|
|
441
|
+
default:
|
|
442
|
+
Platform.assertNever(issueCode, 'Unknown issue code: ' + issueCode);
|
|
439
443
|
}
|
|
440
444
|
|
|
441
445
|
this.affectedResources.appendChild(element);
|
|
@@ -17,6 +17,7 @@ import * as MarkdownView from '../../ui/components/markdown_view/markdown_view.j
|
|
|
17
17
|
import {Icon} from '../../ui/kit/kit.js';
|
|
18
18
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
19
19
|
import {html, render} from '../../ui/lit/lit.js';
|
|
20
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
20
21
|
|
|
21
22
|
import {AffectedBlockedByResponseView} from './AffectedBlockedByResponseView.js';
|
|
22
23
|
import {AffectedCookiesView, AffectedRawCookieLinesView} from './AffectedCookiesView.js';
|
|
@@ -95,6 +96,10 @@ class AffectedRequestsView extends AffectedResourcesView {
|
|
|
95
96
|
for (const affectedRequest of affectedRequests) {
|
|
96
97
|
const element = document.createElement('tr');
|
|
97
98
|
element.classList.add('affected-resource-request');
|
|
99
|
+
element.setAttribute('jslog', `${VisualLogging.tableRow('affected-request')}`);
|
|
100
|
+
if (affectedRequest.requestId) {
|
|
101
|
+
element.setAttribute('data-network-request-id', affectedRequest.requestId);
|
|
102
|
+
}
|
|
98
103
|
const category = this.issue.getCategory();
|
|
99
104
|
const tab =
|
|
100
105
|
issueTypeToNetworkHeaderMap.get(category) || NetworkForward.UIRequestLocation.UIRequestTabs.HEADERS_COMPONENT;
|
|
@@ -413,7 +418,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
|
413
418
|
}
|
|
414
419
|
|
|
415
420
|
#createAffectedResources(): UI.TreeOutline.TreeElement {
|
|
416
|
-
const wrapper = new UI.TreeOutline.TreeElement();
|
|
421
|
+
const wrapper = new UI.TreeOutline.TreeElement(undefined, false, 'affected-resources');
|
|
417
422
|
wrapper.setCollapsible(false);
|
|
418
423
|
wrapper.setExpandable(true);
|
|
419
424
|
wrapper.expand();
|
|
@@ -427,7 +432,7 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
|
427
432
|
}
|
|
428
433
|
|
|
429
434
|
#createBody(): void {
|
|
430
|
-
const messageElement = new UI.TreeOutline.TreeElement();
|
|
435
|
+
const messageElement = new UI.TreeOutline.TreeElement(undefined, false, 'issue-description');
|
|
431
436
|
messageElement.setCollapsible(false);
|
|
432
437
|
messageElement.selectable = false;
|
|
433
438
|
const markdownComponent = new MarkdownView.MarkdownView.MarkdownView();
|
|
@@ -215,34 +215,38 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: Docu
|
|
|
215
215
|
// clang-format on
|
|
216
216
|
};
|
|
217
217
|
|
|
218
|
+
const domNode = layer.nodeForSelfOrAncestor();
|
|
219
|
+
|
|
218
220
|
// clang-format off
|
|
219
221
|
Lit.render(
|
|
220
222
|
html`
|
|
221
|
-
<div class="layer-details-container"
|
|
223
|
+
<div class="layer-details-container"
|
|
224
|
+
data-backend-node-id=${domNode ? domNode.backendNodeId() : nothing}
|
|
225
|
+
jslog=${VisualLogging.section('layer-details')}>
|
|
222
226
|
<table>
|
|
223
227
|
<tbody>
|
|
224
|
-
<tr>
|
|
228
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
225
229
|
<td>${i18nString(UIStrings.size)}</td>
|
|
226
230
|
<td>${i18nString(
|
|
227
231
|
UIStrings.updateRectangleDimensions,
|
|
228
232
|
{PH1: layer.width(), PH2: layer.height(), PH3: layer.offsetX(), PH4: layer.offsetY()})}</td>
|
|
229
233
|
</tr>
|
|
230
|
-
<tr>
|
|
234
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
231
235
|
<td>${i18nString(UIStrings.compositingReasons)}</td>
|
|
232
236
|
<td>
|
|
233
237
|
${!compositingReasons.length ? 'n/a' :
|
|
234
238
|
html`<ul>${compositingReasons.map(reason => html`<li>${reason}</li>`)}</ul>`}
|
|
235
239
|
</td>
|
|
236
240
|
</tr>
|
|
237
|
-
<tr>
|
|
241
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
238
242
|
<td>${i18nString(UIStrings.memoryEstimate)}</td>
|
|
239
243
|
<td>${i18n.ByteUtilities.bytesToString(layer.gpuMemoryUsage())}</td>
|
|
240
244
|
</tr>
|
|
241
|
-
<tr>
|
|
245
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
242
246
|
<td>${i18nString(UIStrings.paintCount)}</td>
|
|
243
247
|
<td>${layer.paintCount()}</td>
|
|
244
248
|
</tr>
|
|
245
|
-
<tr>
|
|
249
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
246
250
|
<td>${i18nString(UIStrings.slowScrollRegions)}</td>
|
|
247
251
|
<td>
|
|
248
252
|
${slowScrollRects.map((scrollRect, index) => html`
|
|
@@ -259,7 +263,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: Docu
|
|
|
259
263
|
</span>`)}
|
|
260
264
|
</td>
|
|
261
265
|
</tr>
|
|
262
|
-
<tr>
|
|
266
|
+
<tr jslog=${VisualLogging.tableRow('detail-row')}>
|
|
263
267
|
<td>${i18nString(UIStrings.stickyPositionConstraint)}</td>
|
|
264
268
|
<td>${renderStickyPositionConstraint(stickyPositionConstraint)}</td>
|
|
265
269
|
</tr>
|
|
@@ -80,6 +80,8 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
80
80
|
return html`
|
|
81
81
|
<li role="treeitem"
|
|
82
82
|
data-layer-id=${layer.id()}
|
|
83
|
+
data-backend-node-id=${domNode ? domNode.backendNodeId() : nothing}
|
|
84
|
+
jslog=${VisualLogging.treeItem('layer-item')}
|
|
83
85
|
class=${isHovered ? 'hovered' : ''}
|
|
84
86
|
?selected=${isSelected}
|
|
85
87
|
aria-expanded=${node.isExpanded ? 'true' : 'false'}
|
|
@@ -36,7 +36,9 @@ export class NetworkPanelIndicator {
|
|
|
36
36
|
SDK.NetworkManager.MultitargetNetworkManager.Events.BLOCKED_PATTERNS_CHANGED, updateVisibility);
|
|
37
37
|
manager.addEventListener(
|
|
38
38
|
SDK.NetworkManager.MultitargetNetworkManager.Events.INTERCEPTORS_CHANGED, updateVisibility);
|
|
39
|
-
Common.Settings.Settings.instance()
|
|
39
|
+
Common.Settings.Settings.instance()
|
|
40
|
+
.resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor)
|
|
41
|
+
.addChangeListener(updateVisibility, this);
|
|
40
42
|
|
|
41
43
|
updateVisibility();
|
|
42
44
|
|
|
@@ -203,7 +203,8 @@ export class NetworkConfigView extends UI.Widget.VBox {
|
|
|
203
203
|
private createCacheSection(): void {
|
|
204
204
|
const section = this.createSection(i18nString(UIStrings.caching), 'network-config-disable-cache');
|
|
205
205
|
section.appendChild(SettingsUI.SettingsUI.createSettingCheckbox(
|
|
206
|
-
i18nString(UIStrings.disableCache),
|
|
206
|
+
i18nString(UIStrings.disableCache),
|
|
207
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor)));
|
|
207
208
|
}
|
|
208
209
|
|
|
209
210
|
private createNetworkThrottlingSection(): void {
|
|
@@ -1059,7 +1059,8 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
1059
1059
|
resourceTreeModel.removeEventListener(
|
|
1060
1060
|
SDK.ResourceTreeModel.Events.DOMContentLoaded, this.domContentLoadedEventFired, this);
|
|
1061
1061
|
}
|
|
1062
|
-
const preserveLog =
|
|
1062
|
+
const preserveLog =
|
|
1063
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.preserveNetworkLogSettingDescriptor).get();
|
|
1063
1064
|
if (!preserveLog) {
|
|
1064
1065
|
this.reset();
|
|
1065
1066
|
}
|
|
@@ -2196,7 +2197,9 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
2196
2197
|
NetworkForward.UIRequestLocation.UIRequestLocation.responseHeaderMatch(request, {name: '', value: ''});
|
|
2197
2198
|
const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
|
|
2198
2199
|
if (networkPersistenceManager.project()) {
|
|
2199
|
-
Common.Settings.Settings.instance()
|
|
2200
|
+
Common.Settings.Settings.instance()
|
|
2201
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
2202
|
+
.set(true);
|
|
2200
2203
|
await networkPersistenceManager.getOrCreateHeadersUISourceCodeFromUrl(request.url());
|
|
2201
2204
|
await Common.Revealer.reveal(requestLocation);
|
|
2202
2205
|
} else { // If folder for local overrides has not been provided yet
|
|
@@ -156,10 +156,10 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie
|
|
|
156
156
|
}
|
|
157
157
|
|
|
158
158
|
const context = this.context();
|
|
159
|
-
const linesByType = new Map<
|
|
159
|
+
const linesByType = new Map<NetworkTimeCalculator.RequestTimeRangeNames, number[]>();
|
|
160
160
|
const paddingTop = PADDING;
|
|
161
161
|
|
|
162
|
-
function drawLines(type:
|
|
162
|
+
function drawLines(type: NetworkTimeCalculator.RequestTimeRangeNames): void {
|
|
163
163
|
const lines = linesByType.get(type);
|
|
164
164
|
if (!lines) {
|
|
165
165
|
return;
|
|
@@ -183,7 +183,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
-
function addLine(type:
|
|
186
|
+
function addLine(type: NetworkTimeCalculator.RequestTimeRangeNames, y: number, start: number, end: number): void {
|
|
187
187
|
let lines = linesByType.get(type);
|
|
188
188
|
if (!lines) {
|
|
189
189
|
lines = [];
|
|
@@ -217,6 +217,8 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie
|
|
|
217
217
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER);
|
|
218
218
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION);
|
|
219
219
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_RESPOND_WITH);
|
|
220
|
+
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_ROUTER_EVALUATION);
|
|
221
|
+
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_CACHE_LOOKUP);
|
|
220
222
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.PUSH);
|
|
221
223
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.PROXY);
|
|
222
224
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.DNS);
|
|
@@ -224,6 +226,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie
|
|
|
224
226
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.SENDING);
|
|
225
227
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.WAITING);
|
|
226
228
|
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING);
|
|
229
|
+
drawLines(NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH);
|
|
227
230
|
|
|
228
231
|
if (this.highlightedRequest) {
|
|
229
232
|
const size = 5;
|
|
@@ -297,7 +300,7 @@ export class NetworkOverview extends PerfUI.TimelineOverviewPane.TimelineOvervie
|
|
|
297
300
|
}
|
|
298
301
|
}
|
|
299
302
|
|
|
300
|
-
export const RequestTimeRangeNameToColor = {
|
|
303
|
+
export const RequestTimeRangeNameToColor: Record<NetworkTimeCalculator.RequestTimeRangeNames, string> = {
|
|
301
304
|
[NetworkTimeCalculator.RequestTimeRangeNames.TOTAL]: '--network-overview-total',
|
|
302
305
|
[NetworkTimeCalculator.RequestTimeRangeNames.BLOCKING]: '--network-overview-blocking',
|
|
303
306
|
[NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING]: '--network-overview-connecting',
|
|
@@ -305,6 +308,8 @@ export const RequestTimeRangeNameToColor = {
|
|
|
305
308
|
[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_PREPARATION]: '--network-overview-service-worker',
|
|
306
309
|
[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_RESPOND_WITH]:
|
|
307
310
|
'--network-overview-service-worker-respond-with',
|
|
311
|
+
[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_ROUTER_EVALUATION]: '--network-overview-service-worker',
|
|
312
|
+
[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_CACHE_LOOKUP]: '--network-overview-service-worker',
|
|
308
313
|
[NetworkTimeCalculator.RequestTimeRangeNames.PUSH]: '--network-overview-push',
|
|
309
314
|
[NetworkTimeCalculator.RequestTimeRangeNames.PROXY]: '--override-network-overview-proxy',
|
|
310
315
|
[NetworkTimeCalculator.RequestTimeRangeNames.DNS]: '--network-overview-dns',
|
|
@@ -312,8 +317,9 @@ export const RequestTimeRangeNameToColor = {
|
|
|
312
317
|
[NetworkTimeCalculator.RequestTimeRangeNames.SENDING]: '--override-network-overview-sending',
|
|
313
318
|
[NetworkTimeCalculator.RequestTimeRangeNames.WAITING]: '--network-overview-waiting',
|
|
314
319
|
[NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING]: '--network-overview-receiving',
|
|
320
|
+
[NetworkTimeCalculator.RequestTimeRangeNames.RECEIVING_PUSH]: '--network-overview-receiving',
|
|
315
321
|
[NetworkTimeCalculator.RequestTimeRangeNames.QUEUEING]: '--network-overview-queueing',
|
|
316
|
-
}
|
|
322
|
+
};
|
|
317
323
|
|
|
318
324
|
const BAND_HEIGHT = 3;
|
|
319
325
|
const PADDING = 5;
|
|
@@ -354,7 +354,8 @@ export class NetworkPanel extends UI.Panel.Panel implements
|
|
|
354
354
|
this.networkLogLargeRowsSetting.addChangeListener(this.toggleLargerRequests, this);
|
|
355
355
|
this.networkRecordFilmStripSetting.addChangeListener(this.toggleRecordFilmStrip, this);
|
|
356
356
|
|
|
357
|
-
this.preserveLogSetting =
|
|
357
|
+
this.preserveLogSetting =
|
|
358
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.preserveNetworkLogSettingDescriptor);
|
|
358
359
|
this.recordLogSetting = Common.Settings.Settings.instance().moduleSetting('network-log.record-log');
|
|
359
360
|
this.recordLogSetting.addChangeListener(({data}) => this.toggleRecord(data));
|
|
360
361
|
|
|
@@ -462,7 +463,7 @@ export class NetworkPanel extends UI.Panel.Panel implements
|
|
|
462
463
|
|
|
463
464
|
this.panelToolbar.appendSeparator();
|
|
464
465
|
const disableCacheCheckbox = new UI.Toolbar.ToolbarSettingCheckbox(
|
|
465
|
-
Common.Settings.Settings.instance().
|
|
466
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.cacheDisabledSettingDescriptor),
|
|
466
467
|
i18nString(UIStrings.disableCacheWhileDevtoolsIsOpen), i18nString(UIStrings.disableCache));
|
|
467
468
|
this.panelToolbar.appendToolbarItem(disableCacheCheckbox);
|
|
468
469
|
|
|
@@ -98,7 +98,7 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
98
98
|
this.textLayers = [];
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
static buildRequestTimeRangeStyle(): Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle> {
|
|
102
102
|
const styleMap = new Map<NetworkTimeCalculator.RequestTimeRangeNames, LayerStyle>();
|
|
103
103
|
styleMap.set(
|
|
104
104
|
NetworkTimeCalculator.RequestTimeRangeNames.CONNECTING,
|
|
@@ -142,6 +142,13 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
142
142
|
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_RESPOND_WITH, {
|
|
143
143
|
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_RESPOND_WITH],
|
|
144
144
|
});
|
|
145
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_ROUTER_EVALUATION, {
|
|
146
|
+
fillStyle:
|
|
147
|
+
RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_ROUTER_EVALUATION],
|
|
148
|
+
});
|
|
149
|
+
styleMap.set(NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_CACHE_LOOKUP, {
|
|
150
|
+
fillStyle: RequestTimeRangeNameToColor[NetworkTimeCalculator.RequestTimeRangeNames.SERVICE_WORKER_CACHE_LOOKUP],
|
|
151
|
+
});
|
|
145
152
|
return styleMap;
|
|
146
153
|
}
|
|
147
154
|
|
|
@@ -610,8 +617,14 @@ export class NetworkWaterfallColumn extends UI.Widget.VBox {
|
|
|
610
617
|
continue;
|
|
611
618
|
}
|
|
612
619
|
|
|
613
|
-
const style =
|
|
614
|
-
|
|
620
|
+
const style = this.styleForTimeRangeName.get(range.name);
|
|
621
|
+
if (!style) {
|
|
622
|
+
continue;
|
|
623
|
+
}
|
|
624
|
+
const path = this.pathForStyle.get(style);
|
|
625
|
+
if (!path) {
|
|
626
|
+
continue;
|
|
627
|
+
}
|
|
615
628
|
const lineWidth = style.lineWidth || 0;
|
|
616
629
|
const height = this.getBarHeight(range.name);
|
|
617
630
|
const middleBarY = y + Math.floor(this.rowHeight / 2 - height / 2) + lineWidth / 2;
|
|
@@ -290,7 +290,7 @@ export class RequestHeadersView extends UI.Widget.Widget {
|
|
|
290
290
|
this.#workspace.addEventListener(
|
|
291
291
|
Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);
|
|
292
292
|
Common.Settings.Settings.instance()
|
|
293
|
-
.
|
|
293
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
294
294
|
.addChangeListener(this.requestUpdate, this);
|
|
295
295
|
}
|
|
296
296
|
|
|
@@ -319,7 +319,7 @@ export class RequestHeadersView extends UI.Widget.Widget {
|
|
|
319
319
|
this.#workspace.removeEventListener(
|
|
320
320
|
Workspace.Workspace.Events.UISourceCodeRemoved, this.#uiSourceCodeAddedOrRemoved, this);
|
|
321
321
|
Common.Settings.Settings.instance()
|
|
322
|
-
.
|
|
322
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
323
323
|
.removeChangeListener(this.requestUpdate, this);
|
|
324
324
|
}
|
|
325
325
|
|
|
@@ -395,8 +395,8 @@ function renderHeaderOverridesLink(input: ViewInput): Lit.LitTemplate {
|
|
|
395
395
|
event.preventDefault();
|
|
396
396
|
input.revealHeadersFile?.();
|
|
397
397
|
};
|
|
398
|
-
const overridesSetting: Common.Settings.Setting<boolean> =
|
|
399
|
-
|
|
398
|
+
const overridesSetting: Common.Settings.Setting<boolean> = Common.Settings.Settings.instance().resolve(
|
|
399
|
+
Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor);
|
|
400
400
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
401
401
|
// clang-format off
|
|
402
402
|
const fileIcon = html`
|
|
@@ -281,7 +281,9 @@ export class ResponseHeaderSection extends ResponseHeaderSectionBase {
|
|
|
281
281
|
if (!this.#overrides.every(Persistence.NetworkPersistenceManager.isHeaderOverride)) {
|
|
282
282
|
throw new Error('Type mismatch after parsing');
|
|
283
283
|
}
|
|
284
|
-
if (Common.Settings.Settings.instance()
|
|
284
|
+
if (Common.Settings.Settings.instance()
|
|
285
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
286
|
+
.get() &&
|
|
285
287
|
this.#isEditingAllowed === EditingAllowedStatus.DISABLED) {
|
|
286
288
|
this.#isEditingAllowed = EditingAllowedStatus.ENABLED;
|
|
287
289
|
}
|
|
@@ -566,7 +568,9 @@ export class ResponseHeaderSection extends ResponseHeaderSectionBase {
|
|
|
566
568
|
const requestUrl = this.#request.url();
|
|
567
569
|
const networkPersistenceManager = Persistence.NetworkPersistenceManager.NetworkPersistenceManager.instance();
|
|
568
570
|
if (networkPersistenceManager.project()) {
|
|
569
|
-
Common.Settings.Settings.instance()
|
|
571
|
+
Common.Settings.Settings.instance()
|
|
572
|
+
.resolve(Persistence.NetworkPersistenceManager.persistenceNetworkOverridesEnabledSettingDescriptor)
|
|
573
|
+
.set(true);
|
|
570
574
|
await networkPersistenceManager.getOrCreateHeadersUISourceCodeFromUrl(requestUrl);
|
|
571
575
|
} else { // If folder for local overrides has not been provided yet
|
|
572
576
|
UI.InspectorView.InspectorView.instance().displaySelectOverrideFolderInfobar(async () => {
|
|
@@ -10,11 +10,73 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
10
10
|
import * as Workspace from '../../models/workspace/workspace.js';
|
|
11
11
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
12
12
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
|
+
import * as SettingsUI from '../../ui/settings/settings.js';
|
|
13
14
|
|
|
14
15
|
import * as NetworkForward from './forward/forward.js';
|
|
15
16
|
import type * as Network from './network.js';
|
|
16
17
|
|
|
17
18
|
const UIStrings = {
|
|
19
|
+
/**
|
|
20
|
+
* @description Text to keep the log after refreshing.
|
|
21
|
+
*/
|
|
22
|
+
keepLog: 'Keep log',
|
|
23
|
+
/**
|
|
24
|
+
* @description A term that can be used to search in the command menu, and will find the search
|
|
25
|
+
* result 'Keep log on page reload / navigation'. This is an additional search term to help
|
|
26
|
+
* the user find the setting even when they don't know the exact name of it.
|
|
27
|
+
*/
|
|
28
|
+
keep: 'keep',
|
|
29
|
+
/**
|
|
30
|
+
* @description A term that can be used to search in the command menu, and will find the search
|
|
31
|
+
* result 'Keep log on page reload / navigation'. This is an additional search term to help
|
|
32
|
+
* the user find the setting even when they don't know the exact name of it.
|
|
33
|
+
*/
|
|
34
|
+
preserve: 'preserve',
|
|
35
|
+
/**
|
|
36
|
+
* @description A term that can be used to search in the command menu, and will find the search
|
|
37
|
+
* result 'Keep log on page reload / navigation'. This is an additional search term to help
|
|
38
|
+
* the user find the setting even when they don't know the exact name of it.
|
|
39
|
+
*/
|
|
40
|
+
clearTag: 'clear',
|
|
41
|
+
/**
|
|
42
|
+
* @description A term that can be used to search in the command menu, and will find the search
|
|
43
|
+
* result 'Keep log on page reload / navigation'. This is an additional search term to help
|
|
44
|
+
* the user find the setting even when they don't know the exact name of it.
|
|
45
|
+
*/
|
|
46
|
+
reset: 'reset',
|
|
47
|
+
/**
|
|
48
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
49
|
+
*/
|
|
50
|
+
keepLogOnPageReload: 'Keep log on page reload / navigation',
|
|
51
|
+
/**
|
|
52
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
53
|
+
*/
|
|
54
|
+
doNotKeepLogOnPageReload: 'Don’t keep log on page reload / navigation',
|
|
55
|
+
/**
|
|
56
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
57
|
+
*/
|
|
58
|
+
enableCache: 'Enable cache',
|
|
59
|
+
/**
|
|
60
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
61
|
+
*/
|
|
62
|
+
disableCache: 'Disable cache while DevTools is open',
|
|
63
|
+
/**
|
|
64
|
+
* @description Tooltip text for a setting that controls the network cache. Disabling the network cache can simulate the network connections of users that are visiting a page for the first time.
|
|
65
|
+
*/
|
|
66
|
+
networkCacheExplanation:
|
|
67
|
+
'Disabling the network cache will simulate a network experience similar to a first time visitor.',
|
|
68
|
+
/**
|
|
69
|
+
* @description Title of a setting under the Network category.
|
|
70
|
+
*/
|
|
71
|
+
networkRequestBlocking: 'Network request blocking',
|
|
72
|
+
/**
|
|
73
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
74
|
+
*/
|
|
75
|
+
enableNetworkRequestBlocking: 'Enable network request blocking',
|
|
76
|
+
/**
|
|
77
|
+
* @description Title of a setting under the Network category that can be invoked through the Command Menu.
|
|
78
|
+
*/
|
|
79
|
+
disableNetworkRequestBlocking: 'Disable network request blocking',
|
|
18
80
|
/**
|
|
19
81
|
* @description Command for showing the 'Network' tool
|
|
20
82
|
*/
|
|
@@ -428,6 +490,61 @@ Common.Settings.registerSettingExtension({
|
|
|
428
490
|
],
|
|
429
491
|
});
|
|
430
492
|
|
|
493
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.requestBlockingEnabledSettingDescriptor, {
|
|
494
|
+
category: Common.Settings.SettingCategory.NETWORK,
|
|
495
|
+
title: i18nLazyString(UIStrings.networkRequestBlocking),
|
|
496
|
+
options: [
|
|
497
|
+
{
|
|
498
|
+
value: true,
|
|
499
|
+
title: i18nLazyString(UIStrings.enableNetworkRequestBlocking),
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
value: false,
|
|
503
|
+
title: i18nLazyString(UIStrings.disableNetworkRequestBlocking),
|
|
504
|
+
},
|
|
505
|
+
],
|
|
506
|
+
});
|
|
507
|
+
|
|
508
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.cacheDisabledSettingDescriptor, {
|
|
509
|
+
category: Common.Settings.SettingCategory.NETWORK,
|
|
510
|
+
title: i18nLazyString(UIStrings.disableCache),
|
|
511
|
+
order: 0,
|
|
512
|
+
options: [
|
|
513
|
+
{
|
|
514
|
+
value: true,
|
|
515
|
+
title: i18nLazyString(UIStrings.disableCache),
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
value: false,
|
|
519
|
+
title: i18nLazyString(UIStrings.enableCache),
|
|
520
|
+
},
|
|
521
|
+
],
|
|
522
|
+
learnMore: {
|
|
523
|
+
tooltip: i18nLazyString(UIStrings.networkCacheExplanation),
|
|
524
|
+
},
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.preserveNetworkLogSettingDescriptor, {
|
|
528
|
+
category: Common.Settings.SettingCategory.NETWORK,
|
|
529
|
+
title: i18nLazyString(UIStrings.keepLog),
|
|
530
|
+
tags: [
|
|
531
|
+
i18nLazyString(UIStrings.keep),
|
|
532
|
+
i18nLazyString(UIStrings.preserve),
|
|
533
|
+
i18nLazyString(UIStrings.clearTag),
|
|
534
|
+
i18nLazyString(UIStrings.reset),
|
|
535
|
+
],
|
|
536
|
+
options: [
|
|
537
|
+
{
|
|
538
|
+
value: true,
|
|
539
|
+
title: i18nLazyString(UIStrings.keepLogOnPageReload),
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
value: false,
|
|
543
|
+
title: i18nLazyString(UIStrings.doNotKeepLogOnPageReload),
|
|
544
|
+
},
|
|
545
|
+
],
|
|
546
|
+
});
|
|
547
|
+
|
|
431
548
|
UI.ViewManager.registerLocationResolver({
|
|
432
549
|
name: UI.ViewManager.ViewLocationValues.NETWORK_SIDEBAR,
|
|
433
550
|
category: UI.ViewManager.ViewLocationCategory.NETWORK,
|