chrome-devtools-frontend 1.0.1581708 → 1.0.1583146
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/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/NetworkManager.ts +63 -115
- package/front_end/core/sdk/RemoteObject.ts +7 -1
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +9 -24
- package/front_end/entrypoints/greendev_floaty/floaty.css +1 -1
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +1 -1
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.js +2 -0
- package/front_end/generated/protocol.ts +0 -6
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +6 -6
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +17 -9
- package/front_end/models/ai_assistance/agents/NetworkAgent.ts +2 -6
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +66 -2
- package/front_end/models/greendev/Prototypes.ts +1 -10
- package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +75 -0
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +0 -30
- package/front_end/models/issues_manager/IssuesManager.ts +5 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowlistItemType.md +12 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidHeader.md +12 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidUrlPattern.md +8 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistItemNotInnerList.md +12 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistMoreThanOneList.md +7 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistReportingEndpointNotToken.md +10 -0
- package/front_end/models/issues_manager/issues_manager.ts +2 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -4
- package/front_end/panels/ai_assistance/components/ChatInput.ts +7 -3
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -2
- package/front_end/panels/application/preloading/PreloadingView.ts +8 -1
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +4 -1
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +2 -1
- package/front_end/panels/application/preloading/components/PreloadingString.ts +12 -3
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +14 -0
- package/front_end/panels/autofill/AutofillView.ts +4 -8
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +37 -3
- package/front_end/panels/changes/ChangesSidebar.ts +2 -6
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +27 -8
- package/front_end/panels/console/ConsoleSidebar.ts +3 -11
- package/front_end/panels/elements/ComputedStyleWidget.ts +41 -29
- package/front_end/panels/elements/ElementStatePaneWidget.ts +1 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +487 -426
- package/front_end/panels/elements/EventListenersWidget.ts +2 -4
- package/front_end/panels/elements/PropertiesWidget.ts +1 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +18 -2
- package/front_end/panels/elements/computedStyleWidget.css +30 -0
- package/front_end/panels/lighthouse/LighthouseStartView.ts +3 -5
- package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
- package/front_end/panels/network/NetworkLogView.ts +67 -108
- package/front_end/panels/network/RequestConditionsDrawer.ts +40 -131
- package/front_end/panels/network/RequestInitiatorView.ts +19 -8
- package/front_end/panels/network/network-meta.ts +4 -27
- package/front_end/panels/settings/AISettingsTab.ts +1 -5
- package/front_end/panels/settings/SettingsScreen.ts +0 -51
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +2 -2
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +4 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +13 -16
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +5 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +8 -0
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -0
- package/front_end/ui/components/text_editor/config.ts +6 -0
- package/front_end/ui/legacy/Toolbar.ts +16 -8
- package/front_end/ui/legacy/Treeoutline.ts +4 -4
- package/front_end/ui/legacy/UIUtils.ts +35 -4
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +6 -11
- package/front_end/ui/legacy/components/utils/Linkifier.ts +4 -7
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +0 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +0 -1
- package/front_end/models/issues_manager/descriptions/federatedAuthRequestClientMetadataNoResponse.md +0 -1
- package/front_end/panels/elements/computedStyleSidebarPane.css +0 -18
|
@@ -105,8 +105,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
105
105
|
<devtools-toolbar class="event-listener-toolbar" role="presentation">
|
|
106
106
|
<devtools-button ${bindToAction(input.refreshEventListenersActionName)}></devtools-button>
|
|
107
107
|
<devtools-checkbox title=${i18nString(UIStrings.showListenersOnTheAncestors)}
|
|
108
|
-
${bindToSetting(input.showForAncestorsSetting)}
|
|
109
|
-
jslog=${VisualLogging.toggle('show-event-listeners-for-ancestors').track({ change: true })}>
|
|
108
|
+
${bindToSetting(input.showForAncestorsSetting)}>
|
|
110
109
|
${i18nString(UIStrings.ancestors)}
|
|
111
110
|
</devtools-checkbox>
|
|
112
111
|
<select class="dispatch-filter"
|
|
@@ -120,8 +119,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
120
119
|
</option>`)}
|
|
121
120
|
</select>
|
|
122
121
|
<devtools-checkbox title=${i18nString(UIStrings.resolveEventListenersBoundWith)}
|
|
123
|
-
${bindToSetting(input.showFrameworkListenersSetting)}
|
|
124
|
-
jslog=${VisualLogging.toggle('show-frameowkr-listeners').track({ change: true })}>
|
|
122
|
+
${bindToSetting(input.showFrameworkListenersSetting)}>
|
|
125
123
|
${i18nString(UIStrings.frameworkListeners)}
|
|
126
124
|
</devtools-checkbox>
|
|
127
125
|
</devtools-toolbar>
|
|
@@ -86,8 +86,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
86
86
|
<div class="hbox properties-widget-toolbar">
|
|
87
87
|
<devtools-toolbar class="styles-pane-toolbar" role="presentation">
|
|
88
88
|
<devtools-toolbar-input type="filter" @change=${input.onFilterChanged} style="flex-grow:1; flex-shrink:1"></devtools-toolbar-input>
|
|
89
|
-
<devtools-checkbox title=${i18nString(UIStrings.showAllTooltip)} ${bindToSetting(getShowAllPropertiesSetting())}
|
|
90
|
-
jslog=${VisualLogging.toggle('show-all-properties').track({change: true})}>
|
|
89
|
+
<devtools-checkbox title=${i18nString(UIStrings.showAllTooltip)} ${bindToSetting(getShowAllPropertiesSetting())}>
|
|
91
90
|
${i18nString(UIStrings.showAll)}
|
|
92
91
|
</devtools-checkbox>
|
|
93
92
|
</devtools-toolbar>
|
|
@@ -2155,6 +2155,9 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2155
2155
|
}
|
|
2156
2156
|
|
|
2157
2157
|
renderedPropertyText(): string {
|
|
2158
|
+
if (!this.#isConnected()) {
|
|
2159
|
+
return '';
|
|
2160
|
+
}
|
|
2158
2161
|
if (!this.nameElement || !this.valueElement) {
|
|
2159
2162
|
return '';
|
|
2160
2163
|
}
|
|
@@ -2895,8 +2898,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2895
2898
|
const regex = new RegExp(propertyNamePattern, 'i');
|
|
2896
2899
|
await computedStyleWidget.filterComputedStyles(regex);
|
|
2897
2900
|
|
|
2898
|
-
computedStyleWidget.
|
|
2899
|
-
computedStyleWidget.input.element.focus();
|
|
2901
|
+
computedStyleWidget.setFilterInput(this.property.name);
|
|
2900
2902
|
}
|
|
2901
2903
|
|
|
2902
2904
|
private copyCssDeclarationAsJs(): void {
|
|
@@ -3434,7 +3436,17 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3434
3436
|
styleTextAppliedForTest(): void {
|
|
3435
3437
|
}
|
|
3436
3438
|
|
|
3439
|
+
// If the item isn't connected to the DOM, then reading its innerText will
|
|
3440
|
+
// also include any invisible text (e.g. sources, styles), so we don't want
|
|
3441
|
+
// to do that.
|
|
3442
|
+
#isConnected(): boolean {
|
|
3443
|
+
return this.listItemElement.isConnected;
|
|
3444
|
+
}
|
|
3445
|
+
|
|
3437
3446
|
applyStyleText(styleText: string, majorChange: boolean, property?: SDK.CSSProperty.CSSProperty|null): Promise<void> {
|
|
3447
|
+
if (!this.#isConnected()) {
|
|
3448
|
+
return Promise.resolve();
|
|
3449
|
+
}
|
|
3438
3450
|
return this.applyStyleThrottler.schedule(this.innerApplyStyleText.bind(this, styleText, majorChange, property));
|
|
3439
3451
|
}
|
|
3440
3452
|
|
|
@@ -3445,6 +3457,10 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
3445
3457
|
return;
|
|
3446
3458
|
}
|
|
3447
3459
|
|
|
3460
|
+
if (!this.#isConnected()) {
|
|
3461
|
+
return;
|
|
3462
|
+
}
|
|
3463
|
+
|
|
3448
3464
|
const oldStyleRange = this.style.range;
|
|
3449
3465
|
if (!oldStyleRange) {
|
|
3450
3466
|
return;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2015 The Chromium Authors
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
@scope to (devtools-widget > *) {
|
|
8
|
+
.styles-sidebar-pane-toolbar {
|
|
9
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.styles-pane-toolbar {
|
|
14
|
+
width: 100%;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.styles-sidebar-computed-style-widget {
|
|
18
|
+
min-height: auto;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.computed-style-tree-outline-container {
|
|
22
|
+
flex-grow: 1;
|
|
23
|
+
flex-shrink: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
devtools-toolbar-input[type="filter"] {
|
|
27
|
+
flex-grow: 1;
|
|
28
|
+
flex-shrink: 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -166,8 +166,6 @@ export class StartView extends UI.Widget.Widget {
|
|
|
166
166
|
checkbox.setIndeterminate(true);
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
UI.ARIAUtils.markAsGroup(categoryFormElements);
|
|
170
|
-
UI.ARIAUtils.setLabel(categoryFormElements, i18nString(UIStrings.categories));
|
|
171
169
|
}
|
|
172
170
|
|
|
173
171
|
private render(): void {
|
|
@@ -194,10 +192,10 @@ export class StartView extends UI.Widget.Widget {
|
|
|
194
192
|
<div class="lighthouse-form-elements" $="device-type-form-elements"></div>
|
|
195
193
|
</div>
|
|
196
194
|
<div class="lighthouse-form-categories">
|
|
197
|
-
<
|
|
198
|
-
<
|
|
195
|
+
<fieldset class="lighthouse-form-section lighthouse-form-categories-fieldset">
|
|
196
|
+
<legend class="lighthouse-form-section-label">${i18nString(UIStrings.categories)}</legend>
|
|
199
197
|
<div class="lighthouse-form-elements" $="categories-form-elements"></div>
|
|
200
|
-
</
|
|
198
|
+
</fieldset>
|
|
201
199
|
</div>
|
|
202
200
|
</div>
|
|
203
201
|
<div $="warning-text" class="lighthouse-warning-text hidden"></div>
|
|
@@ -39,7 +39,6 @@ import * as Common from '../../core/common/common.js';
|
|
|
39
39
|
import * as Host from '../../core/host/host.js';
|
|
40
40
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
41
41
|
import * as Platform from '../../core/platform/platform.js';
|
|
42
|
-
import * as Root from '../../core/root/root.js';
|
|
43
42
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
44
43
|
import * as Protocol from '../../generated/protocol.js';
|
|
45
44
|
import * as Annotations from '../../models/annotations/annotations.js';
|
|
@@ -1722,21 +1721,21 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
1722
1721
|
}
|
|
1723
1722
|
|
|
1724
1723
|
UI.Context.Context.instance().setFlavor(SDK.NetworkRequest.NetworkRequest, request);
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1724
|
+
const action = UI.ActionRegistry.ActionRegistry.instance().getAction(openAiAssistanceId);
|
|
1725
|
+
const submenu = contextMenu.footerSection().appendSubMenuItem(action.title(), false, openAiAssistanceId);
|
|
1726
|
+
submenu.defaultSection().appendAction(openAiAssistanceId, i18nString(UIStrings.startAChat));
|
|
1727
|
+
appendSubmenuPromptAction(
|
|
1728
|
+
submenu, action, i18nString(UIStrings.explainPurpose), 'What is the purpose of this request?',
|
|
1729
|
+
openAiAssistanceId + '.purpose');
|
|
1730
|
+
appendSubmenuPromptAction(
|
|
1731
|
+
submenu, action, i18nString(UIStrings.explainSlowness), 'Why is this request taking so long?',
|
|
1732
|
+
openAiAssistanceId + '.slowness');
|
|
1733
|
+
appendSubmenuPromptAction(
|
|
1734
|
+
submenu, action, i18nString(UIStrings.explainFailures), 'Why is the request failing?',
|
|
1735
|
+
openAiAssistanceId + '.failures');
|
|
1736
|
+
appendSubmenuPromptAction(
|
|
1737
|
+
submenu, action, i18nString(UIStrings.assessSecurityHeaders), 'Are there any security headers present?',
|
|
1738
|
+
openAiAssistanceId + '.security');
|
|
1740
1739
|
}
|
|
1741
1740
|
copyMenu.defaultSection().appendItem(
|
|
1742
1741
|
i18nString(UIStrings.copyURL),
|
|
@@ -1854,98 +1853,58 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
1854
1853
|
const maxBlockedURLLength = 20;
|
|
1855
1854
|
const manager = SDK.NetworkManager.MultitargetNetworkManager.instance();
|
|
1856
1855
|
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
manager.requestConditions.conditionsEnabled = true;
|
|
1856
|
+
function removeRequestCondition(pattern: SDK.NetworkManager.RequestURLPattern): void {
|
|
1857
|
+
const entry = manager.requestConditions.findCondition(pattern.constructorString);
|
|
1858
|
+
if (entry) {
|
|
1859
|
+
manager.requestConditions.delete(entry);
|
|
1862
1860
|
void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');
|
|
1863
1861
|
}
|
|
1862
|
+
}
|
|
1864
1863
|
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
if (urlWithoutScheme && !manager.requestConditions.has(urlWithoutScheme)) {
|
|
1875
|
-
contextMenu.debugSection().appendItem(
|
|
1876
|
-
i18nString(UIStrings.blockRequestUrl), addBlockedURL.bind(null, urlWithoutScheme),
|
|
1877
|
-
{jslogContext: 'block-request-url'});
|
|
1878
|
-
} else if (urlWithoutScheme) {
|
|
1879
|
-
const croppedURL = Platform.StringUtilities.trimMiddle(urlWithoutScheme, maxBlockedURLLength);
|
|
1880
|
-
contextMenu.debugSection().appendItem(
|
|
1881
|
-
i18nString(UIStrings.unblockS, {PH1: croppedURL}), removeBlockedURL.bind(null, urlWithoutScheme),
|
|
1882
|
-
{jslogContext: 'unblock'});
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
const domain = request.parsedURL.domain();
|
|
1886
|
-
if (domain && !manager.requestConditions.has(domain)) {
|
|
1887
|
-
contextMenu.debugSection().appendItem(
|
|
1888
|
-
i18nString(UIStrings.blockRequestDomain), addBlockedURL.bind(null, domain),
|
|
1889
|
-
{jslogContext: 'block-request-domain'});
|
|
1890
|
-
} else if (domain) {
|
|
1891
|
-
const croppedDomain = Platform.StringUtilities.trimMiddle(domain, maxBlockedURLLength);
|
|
1892
|
-
contextMenu.debugSection().appendItem(
|
|
1893
|
-
i18nString(UIStrings.unblockS, {PH1: croppedDomain}), removeBlockedURL.bind(null, domain),
|
|
1894
|
-
{jslogContext: 'unblock'});
|
|
1895
|
-
}
|
|
1896
|
-
} else {
|
|
1897
|
-
function removeRequestCondition(pattern: SDK.NetworkManager.RequestURLPattern): void {
|
|
1898
|
-
const entry = manager.requestConditions.findCondition(pattern.constructorString);
|
|
1899
|
-
if (entry) {
|
|
1900
|
-
manager.requestConditions.delete(entry);
|
|
1901
|
-
void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');
|
|
1902
|
-
}
|
|
1903
|
-
}
|
|
1904
|
-
|
|
1905
|
-
function addRequestCondition(
|
|
1906
|
-
pattern: SDK.NetworkManager.RequestURLPattern,
|
|
1907
|
-
conditions: SDK.NetworkManager.ThrottlingConditions,
|
|
1908
|
-
): void {
|
|
1909
|
-
const entry = manager.requestConditions.findCondition(pattern.constructorString);
|
|
1910
|
-
if (entry) {
|
|
1911
|
-
entry.conditions = conditions;
|
|
1912
|
-
} else {
|
|
1913
|
-
manager.requestConditions.add(SDK.NetworkManager.RequestCondition.create(pattern, conditions));
|
|
1914
|
-
}
|
|
1915
|
-
manager.requestConditions.conditionsEnabled = true;
|
|
1916
|
-
void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');
|
|
1864
|
+
function addRequestCondition(
|
|
1865
|
+
pattern: SDK.NetworkManager.RequestURLPattern,
|
|
1866
|
+
conditions: SDK.NetworkManager.ThrottlingConditions,
|
|
1867
|
+
): void {
|
|
1868
|
+
const entry = manager.requestConditions.findCondition(pattern.constructorString);
|
|
1869
|
+
if (entry) {
|
|
1870
|
+
entry.conditions = conditions;
|
|
1871
|
+
} else {
|
|
1872
|
+
manager.requestConditions.add(SDK.NetworkManager.RequestCondition.create(pattern, conditions));
|
|
1917
1873
|
}
|
|
1874
|
+
manager.requestConditions.conditionsEnabled = true;
|
|
1875
|
+
void UI.ViewManager.ViewManager.instance().showView('network.blocked-urls');
|
|
1876
|
+
}
|
|
1918
1877
|
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
1878
|
+
const blockingMenu =
|
|
1879
|
+
contextMenu.debugSection().appendSubMenuItem(i18nString(UIStrings.blockRequests), /* disabled=*/ true);
|
|
1880
|
+
const throttlingMenu =
|
|
1881
|
+
contextMenu.debugSection().appendSubMenuItem(i18nString(UIStrings.throttleRequests), /* disabled=*/ true);
|
|
1882
|
+
|
|
1883
|
+
const urlWithoutScheme = request.parsedURL.urlWithoutScheme();
|
|
1884
|
+
const urlPattern = urlWithoutScheme &&
|
|
1885
|
+
SDK.NetworkManager.RequestURLPattern.create(
|
|
1886
|
+
`*://${urlWithoutScheme}` as SDK.NetworkManager.URLPatternConstructorString);
|
|
1887
|
+
if (urlPattern) {
|
|
1888
|
+
throttlingMenu.setEnabled(true);
|
|
1889
|
+
blockingMenu.setEnabled(true);
|
|
1890
|
+
const existingConditions = manager.requestConditions.findCondition(urlPattern.constructorString);
|
|
1891
|
+
const isBlocking = existingConditions?.conditions === SDK.NetworkManager.BlockingConditions;
|
|
1892
|
+
const isThrottling = existingConditions &&
|
|
1893
|
+
existingConditions.conditions !== SDK.NetworkManager.BlockingConditions &&
|
|
1894
|
+
existingConditions.conditions !== SDK.NetworkManager.NoThrottlingConditions;
|
|
1895
|
+
const croppedURL = Platform.StringUtilities.trimMiddle(urlPattern.constructorString, maxBlockedURLLength);
|
|
1896
|
+
blockingMenu.debugSection().appendItem(
|
|
1897
|
+
isBlocking ? i18nString(UIStrings.unblockS, {PH1: croppedURL}) : i18nString(UIStrings.blockRequestUrl),
|
|
1898
|
+
() => isBlocking ? removeRequestCondition(urlPattern) :
|
|
1899
|
+
addRequestCondition(urlPattern, SDK.NetworkManager.BlockingConditions),
|
|
1900
|
+
{jslogContext: 'block-request-url'});
|
|
1901
|
+
throttlingMenu.debugSection().appendItem(
|
|
1902
|
+
isThrottling ? i18nString(UIStrings.unthrottleS, {PH1: croppedURL}) :
|
|
1903
|
+
i18nString(UIStrings.throttleRequestUrl),
|
|
1904
|
+
() => isThrottling ? removeRequestCondition(urlPattern) :
|
|
1905
|
+
addRequestCondition(urlPattern, SDK.NetworkManager.Slow3GConditions),
|
|
1906
|
+
{jslogContext: 'throttle-request-url'});
|
|
1907
|
+
}
|
|
1949
1908
|
|
|
1950
1909
|
const domain = request.parsedURL.domain();
|
|
1951
1910
|
const domainPattern = domain &&
|
|
@@ -1959,19 +1918,18 @@ export class NetworkLogView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
1959
1918
|
const isThrottling = existingConditions &&
|
|
1960
1919
|
existingConditions.conditions !== SDK.NetworkManager.BlockingConditions &&
|
|
1961
1920
|
existingConditions.conditions !== SDK.NetworkManager.NoThrottlingConditions;
|
|
1921
|
+
const croppedURL = Platform.StringUtilities.trimMiddle(domainPattern.constructorString, maxBlockedURLLength);
|
|
1962
1922
|
blockingMenu.debugSection().appendItem(
|
|
1963
|
-
isBlocking ? i18nString(UIStrings.unblockS, {PH1:
|
|
1964
|
-
i18nString(UIStrings.blockRequestDomain),
|
|
1923
|
+
isBlocking ? i18nString(UIStrings.unblockS, {PH1: croppedURL}) : i18nString(UIStrings.blockRequestDomain),
|
|
1965
1924
|
() => isBlocking ? removeRequestCondition(domainPattern) :
|
|
1966
1925
|
addRequestCondition(domainPattern, SDK.NetworkManager.BlockingConditions),
|
|
1967
1926
|
{jslogContext: 'block-request-domain'});
|
|
1968
1927
|
throttlingMenu.debugSection().appendItem(
|
|
1969
|
-
isThrottling ? i18nString(UIStrings.unthrottleS, {PH1:
|
|
1928
|
+
isThrottling ? i18nString(UIStrings.unthrottleS, {PH1: croppedURL}) :
|
|
1970
1929
|
i18nString(UIStrings.throttleRequestDomain),
|
|
1971
1930
|
() => isThrottling ? removeRequestCondition(domainPattern) :
|
|
1972
1931
|
addRequestCondition(domainPattern, SDK.NetworkManager.Slow3GConditions),
|
|
1973
1932
|
{jslogContext: 'throttle-request-domain'});
|
|
1974
|
-
}
|
|
1975
1933
|
}
|
|
1976
1934
|
|
|
1977
1935
|
if (SDK.NetworkManager.NetworkManager.canReplayRequest(request)) {
|
|
@@ -2758,7 +2716,8 @@ export class MoreFiltersDropDownUI extends Common.ObjectWrapper.ObjectWrapper<UI
|
|
|
2758
2716
|
this.updateActiveFiltersCount();
|
|
2759
2717
|
|
|
2760
2718
|
this.dropDownButton = new UI.Toolbar.ToolbarMenuButton(
|
|
2761
|
-
this.showMoreFiltersContextMenu.bind(this),
|
|
2719
|
+
this.showMoreFiltersContextMenu.bind(this),
|
|
2720
|
+
/* isIconDropdown=*/ false, /* useSoftMenu=*/ true,
|
|
2762
2721
|
/* jslogContext=*/ undefined, /* iconName=*/ undefined,
|
|
2763
2722
|
/* keepOpen=*/ true);
|
|
2764
2723
|
this.dropDownButton.setTitle(i18nString(UIStrings.showOnlyHideRequests));
|