chrome-devtools-frontend 1.0.1575174 → 1.0.1576287
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/.stylelintrc.json +1 -1
- package/front_end/core/host/AidaClient.ts +21 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +2 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +27 -0
- package/front_end/core/sdk/NetworkManager.ts +3 -1
- package/front_end/core/sdk/NetworkRequest.ts +7 -0
- package/front_end/core/sdk/SourceMapScopesInfo.ts +2 -1
- package/front_end/entrypoints/main/MainImpl.ts +13 -7
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +3 -2
- package/front_end/generated/InspectorBackendCommands.ts +37 -0
- package/front_end/generated/SupportedCSSProperties.js +7 -0
- package/front_end/generated/protocol-mapping.d.ts +257 -0
- package/front_end/generated/protocol-proxy-api.d.ts +256 -0
- package/front_end/generated/protocol.ts +359 -0
- package/front_end/models/ai_assistance/AiConversation.ts +31 -10
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +35 -5
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +73 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +141 -0
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +6 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +9 -0
- package/front_end/models/live-metrics/LiveMetrics.ts +31 -51
- package/front_end/models/source_map_scopes/NamesResolver.ts +5 -8
- package/front_end/models/stack_trace/StackTrace.ts +2 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +84 -6
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +1 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +6 -4
- package/front_end/panels/ai_assistance/components/ChatView.ts +5 -6
- package/front_end/panels/ai_assistance/components/chatView.css +10 -0
- package/front_end/panels/application/DeviceBoundSessionsTreeElement.ts +22 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +44 -33
- package/front_end/panels/application/StorageView.ts +3 -3
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/application/preloading/components/preloadingDisabledInfobar.css +1 -1
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +12 -4
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -5
- package/front_end/panels/common/aiCodeCompletionSummaryToolbar.css +1 -1
- package/front_end/panels/console/ConsoleContextSelector.ts +4 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +63 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +17 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -0
- package/front_end/panels/issues/AffectedMetadataAllowedSitesView.ts +3 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseStartView.ts +7 -6
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +3 -2
- package/front_end/panels/network/NetworkItemView.ts +32 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -3
- package/front_end/panels/network/RequestDeviceBoundSessionsView.ts +160 -0
- package/front_end/panels/network/RequestPayloadView.ts +72 -97
- package/front_end/panels/network/SignedExchangeInfoView.ts +3 -4
- package/front_end/panels/network/components/HeaderSectionRow.css +1 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
- package/front_end/panels/network/network.ts +3 -0
- package/front_end/panels/network/requestDeviceBoundSessionsView.css +14 -0
- package/front_end/panels/recorder/components/RecordingView.ts +2 -2
- package/front_end/panels/recorder/components/recordingView.css +5 -0
- package/front_end/panels/security/SecurityPanelSidebar.ts +10 -9
- package/front_end/panels/settings/AISettingsTab.ts +4 -3
- package/front_end/panels/settings/KeybindsSettingsTab.ts +3 -5
- package/front_end/panels/settings/SettingsScreen.ts +2 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +10 -0
- package/front_end/panels/sources/DebuggerPlugin.ts +18 -12
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +4 -3
- package/front_end/panels/sources/SourcesNavigator.ts +2 -2
- package/front_end/panels/sources/SourcesPanel.ts +6 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +2 -2
- package/front_end/panels/sources/sources-meta.ts +2 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -2
- package/front_end/panels/timeline/components/DetailsView.ts +7 -7
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +11 -4
- package/front_end/panels/whats_new/releaseNoteView.css +1 -1
- package/front_end/panels/whats_new/resources/WNDT.md +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +30 -25
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +30 -21
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +31 -26
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/package.json +3 -3
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +45 -44
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/README.chromium +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts +2 -2
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/decode/decode.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/mod.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts +9 -1
- package/front_end/third_party/source-map-scopes-codec/package/_dist/src/scopes.d.ts.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/deno.json +8 -1
- package/front_end/third_party/source-map-scopes-codec/package/package.json +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +20 -7
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.ts +29 -9
- package/front_end/third_party/source-map-scopes-codec/package/src/mod.js.map +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/mod.ts +1 -0
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.js +1 -1
- package/front_end/third_party/source-map-scopes-codec/package/src/scopes.ts +12 -1
- package/front_end/ui/components/buttons/Button.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/panel_feedback/panelFeedback.css +1 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +37 -5
- package/front_end/ui/kit/link/Link.ts +31 -0
- package/front_end/ui/legacy/LinkContextMenuProvider.ts +3 -5
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +336 -250
- package/front_end/ui/legacy/inspectorCommon.css +0 -1
- package/front_end/ui/legacy/legacy.ts +0 -4
- package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
- package/front_end/ui/visual_logging/LoggingDriver.ts +10 -6
- package/package.json +1 -1
- package/front_end/ui/legacy/XElement.ts +0 -41
- package/front_end/ui/legacy/XLink.ts +0 -128
|
@@ -6,6 +6,7 @@ import * as Common from '../../core/common/common.js';
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../core/platform/platform.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import * as StackTrace from '../../models/stack_trace/stack_trace.js';
|
|
9
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
11
|
import * as Lit from '../../ui/lit/lit.js';
|
|
11
12
|
|
|
@@ -63,7 +64,7 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
|
|
|
63
64
|
UI.Context.Context.instance().addFlavorChangeListener(
|
|
64
65
|
SDK.RuntimeModel.ExecutionContext, this.executionContextChangedExternally, this);
|
|
65
66
|
UI.Context.Context.instance().addFlavorChangeListener(
|
|
66
|
-
|
|
67
|
+
StackTrace.StackTrace.DebuggableFrameFlavor, this.callFrameSelectedInUI, this);
|
|
67
68
|
SDK.TargetManager.TargetManager.instance().observeModels(SDK.RuntimeModel.RuntimeModel, this, {scoped: true});
|
|
68
69
|
SDK.TargetManager.TargetManager.instance().addModelListener(
|
|
69
70
|
SDK.DebuggerModel.DebuggerModel, SDK.DebuggerModel.Events.CallFrameSelected, this.callFrameSelectedInModel,
|
|
@@ -263,8 +264,8 @@ export class ConsoleContextSelector implements SDK.TargetManager.SDKModelObserve
|
|
|
263
264
|
}
|
|
264
265
|
|
|
265
266
|
private callFrameSelectedInUI(): void {
|
|
266
|
-
const callFrame = UI.Context.Context.instance().flavor(
|
|
267
|
-
const callFrameContext = callFrame?.script.executionContext();
|
|
267
|
+
const callFrame = UI.Context.Context.instance().flavor(StackTrace.StackTrace.DebuggableFrameFlavor);
|
|
268
|
+
const callFrameContext = callFrame?.sdkFrame.script.executionContext();
|
|
268
269
|
if (callFrameContext) {
|
|
269
270
|
UI.Context.Context.instance().setFlavor(SDK.RuntimeModel.ExecutionContext, callFrameContext);
|
|
270
271
|
}
|
|
@@ -54,7 +54,7 @@ import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
|
54
54
|
import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
|
|
55
55
|
import * as Highlighting from '../../ui/components/highlighting/highlighting.js';
|
|
56
56
|
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
57
|
-
import {Icon} from '../../ui/kit/kit.js';
|
|
57
|
+
import {Icon, Link} from '../../ui/kit/kit.js';
|
|
58
58
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
59
59
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
60
60
|
import * as Lit from '../../ui/lit/lit.js';
|
|
@@ -2458,7 +2458,7 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2458
2458
|
value = Platform.StringUtilities.trimMiddle(value, 60);
|
|
2459
2459
|
}
|
|
2460
2460
|
const link = node && node.nodeName().toLowerCase() === 'a' ?
|
|
2461
|
-
|
|
2461
|
+
Link.create(rewrittenHref, value, undefined, 'image-url') :
|
|
2462
2462
|
Components.Linkifier.Linkifier.linkifyURL(rewrittenHref, {
|
|
2463
2463
|
text: value,
|
|
2464
2464
|
preventClick: true,
|
|
@@ -101,6 +101,14 @@ const UIStrings = {
|
|
|
101
101
|
* @description A context menu item in Styles panel to view the computed CSS property value.
|
|
102
102
|
*/
|
|
103
103
|
viewComputedValue: 'View computed value',
|
|
104
|
+
/**
|
|
105
|
+
* @description Tooltip text for a style property overridden by an animation.
|
|
106
|
+
*/
|
|
107
|
+
overriddenByAnimation: 'Overridden by animation styles.',
|
|
108
|
+
/**
|
|
109
|
+
* @description Link text in the tooltip to open the Animations panel.
|
|
110
|
+
*/
|
|
111
|
+
openAnimationsPanel: 'Open Animations panel',
|
|
104
112
|
/**
|
|
105
113
|
* @description Title of the button that opens the flexbox editor in the Styles panel.
|
|
106
114
|
*/
|
|
@@ -2465,6 +2473,7 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2465
2473
|
|
|
2466
2474
|
if (this.property.parsedOk) {
|
|
2467
2475
|
this.updateAuthoringHint();
|
|
2476
|
+
this.updateAnimationOverrideHint();
|
|
2468
2477
|
} else {
|
|
2469
2478
|
// Avoid having longhands under an invalid shorthand.
|
|
2470
2479
|
this.listItemElement.classList.add('not-parsed-ok');
|
|
@@ -2695,6 +2704,60 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
2695
2704
|
}
|
|
2696
2705
|
}
|
|
2697
2706
|
|
|
2707
|
+
updateAnimationOverrideHint(): void {
|
|
2708
|
+
const existingElement = this.listItemElement.querySelector('.animation-override-hint-wrapper');
|
|
2709
|
+
if (existingElement) {
|
|
2710
|
+
existingElement?.remove();
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
if (!this.overriddenByAnimation() || UI.ViewManager.ViewManager.instance().isViewVisible('animations')) {
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
|
|
2717
|
+
const wrapper = document.createElement('span');
|
|
2718
|
+
wrapper.classList.add('animation-override-hint-wrapper', 'hint-wrapper');
|
|
2719
|
+
const hintIcon = new Icon();
|
|
2720
|
+
hintIcon.name = 'info';
|
|
2721
|
+
hintIcon.classList.add('hint', 'small');
|
|
2722
|
+
hintIcon.tabIndex = -1;
|
|
2723
|
+
|
|
2724
|
+
wrapper.append(hintIcon);
|
|
2725
|
+
this.listItemElement.append(wrapper);
|
|
2726
|
+
|
|
2727
|
+
const tooltipId = this.getTooltipId('animation-override-hint');
|
|
2728
|
+
hintIcon.setAttribute('aria-details', tooltipId);
|
|
2729
|
+
|
|
2730
|
+
const tooltip = new Tooltips.Tooltip.Tooltip({
|
|
2731
|
+
anchor: hintIcon,
|
|
2732
|
+
variant: 'rich',
|
|
2733
|
+
padding: 'large',
|
|
2734
|
+
id: tooltipId,
|
|
2735
|
+
jslogContext: 'elements.css-animation-hint'
|
|
2736
|
+
});
|
|
2737
|
+
const message = i18nString(UIStrings.overriddenByAnimation);
|
|
2738
|
+
const content = document.createElement('div');
|
|
2739
|
+
content.classList.add('animation-override-hint');
|
|
2740
|
+
content.textContent = message;
|
|
2741
|
+
|
|
2742
|
+
const link = document.createElement('devtools-link');
|
|
2743
|
+
link.textContent = i18nString(UIStrings.openAnimationsPanel);
|
|
2744
|
+
link.jslogContext = 'open-in-animations-panel';
|
|
2745
|
+
link.addEventListener('click', event => {
|
|
2746
|
+
event.preventDefault();
|
|
2747
|
+
void UI.ViewManager.ViewManager.instance().showView('animations');
|
|
2748
|
+
});
|
|
2749
|
+
|
|
2750
|
+
content.appendChild(document.createTextNode(' '));
|
|
2751
|
+
content.appendChild(link);
|
|
2752
|
+
tooltip.appendChild(content);
|
|
2753
|
+
|
|
2754
|
+
this.listItemElement.appendChild(tooltip);
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
private overriddenByAnimation(): boolean {
|
|
2758
|
+
return this.#matchedStyles.isPropertyOverriddenByAnimation(this.property);
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2698
2761
|
private mouseUp(event: MouseEvent): void {
|
|
2699
2762
|
const activeTreeElement = parentMap.get(this.#parentPane);
|
|
2700
2763
|
parentMap.delete(this.#parentPane);
|
|
@@ -237,6 +237,12 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
237
237
|
}
|
|
238
238
|
return null;
|
|
239
239
|
}, () => this.node());
|
|
240
|
+
|
|
241
|
+
UI.ViewManager.ViewManager.instance().addEventListener(UI.ViewManager.Events.VIEW_VISIBILITY_CHANGED, event => {
|
|
242
|
+
if (event.data.revealedViewId === 'animations' || event.data.hiddenViewId === 'animations') {
|
|
243
|
+
this.#scheduleResetUpdateIfNotEditing();
|
|
244
|
+
}
|
|
245
|
+
});
|
|
240
246
|
}
|
|
241
247
|
|
|
242
248
|
get webCustomData(): WebCustomData|undefined {
|
|
@@ -741,6 +747,10 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
741
747
|
return;
|
|
742
748
|
}
|
|
743
749
|
|
|
750
|
+
if (!UI.ViewManager.ViewManager.instance().isViewVisible('animations')) {
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
|
|
744
754
|
void this.computedStyleUpdateThrottler.schedule(async () => {
|
|
745
755
|
await this.#updateAnimatedStyles();
|
|
746
756
|
this.handledComputedStyleChangedForTest();
|
|
@@ -1078,7 +1088,14 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1078
1088
|
// We disable the layer widget initially. If we see a layer in
|
|
1079
1089
|
// the matched styles we reenable the button.
|
|
1080
1090
|
LayersWidget.ButtonProvider.instance().item().setVisible(false);
|
|
1091
|
+
const animationsPanelVisible = UI.ViewManager.ViewManager.instance().isViewVisible('animations');
|
|
1081
1092
|
for (const style of matchedStyles.nodeStyles()) {
|
|
1093
|
+
const isTransitionOrAnimationStyle = style.type === SDK.CSSStyleDeclaration.Type.Transition ||
|
|
1094
|
+
style.type === SDK.CSSStyleDeclaration.Type.Animation;
|
|
1095
|
+
if (isTransitionOrAnimationStyle && !animationsPanelVisible) {
|
|
1096
|
+
continue;
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1082
1099
|
const parentNode = matchedStyles.isInherited(style) ? matchedStyles.nodeForStyle(style) : null;
|
|
1083
1100
|
if (parentNode && parentNode !== lastParentNode) {
|
|
1084
1101
|
lastParentNode = parentNode;
|
|
@@ -1090,8 +1107,6 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1090
1107
|
addLayerSeparator(style);
|
|
1091
1108
|
|
|
1092
1109
|
const lastBlock = blocks[blocks.length - 1];
|
|
1093
|
-
const isTransitionOrAnimationStyle = style.type === SDK.CSSStyleDeclaration.Type.Transition ||
|
|
1094
|
-
style.type === SDK.CSSStyleDeclaration.Type.Animation;
|
|
1095
1110
|
if (lastBlock && (!isTransitionOrAnimationStyle || style.allProperties().length > 0)) {
|
|
1096
1111
|
this.idleCallbackManager.schedule(() => {
|
|
1097
1112
|
const section = new StylePropertiesSection(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import
|
|
8
|
+
import {Link} from '../../ui/kit/kit.js';
|
|
9
9
|
|
|
10
10
|
import {AffectedResourcesView} from './AffectedResourcesView.js';
|
|
11
11
|
|
|
@@ -46,8 +46,8 @@ export class AffectedMetadataAllowedSitesView extends AffectedResourcesView {
|
|
|
46
46
|
optOutTextElement.textContent = ' (opt-out: ' + issueData.details().optOutPercentage + '% - ';
|
|
47
47
|
textContentElement.appendChild(optOutTextElement);
|
|
48
48
|
|
|
49
|
-
const linkElement =
|
|
50
|
-
'https://developers.google.com/privacy-sandbox/blog/grace-period-opt-out', 'learn more');
|
|
49
|
+
const linkElement =
|
|
50
|
+
Link.create('https://developers.google.com/privacy-sandbox/blog/grace-period-opt-out', 'learn more');
|
|
51
51
|
textContentElement.appendChild(linkElement);
|
|
52
52
|
|
|
53
53
|
const endTextElement = document.createElement('span');
|
|
@@ -9,6 +9,7 @@ import type * as SDK from '../../core/sdk/sdk.js';
|
|
|
9
9
|
import type * as Protocol from '../../generated/protocol.js';
|
|
10
10
|
import * as Geometry from '../../models/geometry/geometry.js';
|
|
11
11
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
12
|
+
import {Link} from '../../ui/kit/kit.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
14
|
import * as Lit from '../../ui/lit/lit.js';
|
|
14
15
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -118,7 +119,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
118
119
|
uiI18n.getFormatLocalizedString(
|
|
119
120
|
str_, UIStrings.checkSForPossibleReasons,
|
|
120
121
|
{
|
|
121
|
-
PH1:
|
|
122
|
+
PH1: Link.create('about:gpu', undefined, undefined, 'about-gpu')
|
|
122
123
|
}
|
|
123
124
|
)
|
|
124
125
|
],
|
|
@@ -9,6 +9,7 @@ import type * as Common from '../../core/common/common.js';
|
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
10
|
import type * as Platform from '../../core/platform/platform.js';
|
|
11
11
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
12
|
+
import {Link} from '../../ui/kit/kit.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
14
|
|
|
14
15
|
import {type LighthouseController, type Preset, Presets, RuntimeSettings} from './LighthouseController.js';
|
|
@@ -87,8 +88,8 @@ export class StartView extends UI.Widget.Widget {
|
|
|
87
88
|
labelEl.textContent = label;
|
|
88
89
|
|
|
89
90
|
if (runtimeSetting.learnMore) {
|
|
90
|
-
const link =
|
|
91
|
-
runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more',
|
|
91
|
+
const link =
|
|
92
|
+
Link.create(runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more', 'learn-more');
|
|
92
93
|
labelEl.append(link);
|
|
93
94
|
}
|
|
94
95
|
parentElement.appendChild(labelEl);
|
|
@@ -111,8 +112,8 @@ export class StartView extends UI.Widget.Widget {
|
|
|
111
112
|
runtimeSetting.setting as Common.Settings.Setting<boolean>, runtimeSetting.description());
|
|
112
113
|
toolbar.appendToolbarItem(control);
|
|
113
114
|
if (runtimeSetting.learnMore) {
|
|
114
|
-
const link =
|
|
115
|
-
runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more',
|
|
115
|
+
const link =
|
|
116
|
+
Link.create(runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more', 'learn-more');
|
|
116
117
|
link.style.margin = '5px';
|
|
117
118
|
control.element.appendChild(link);
|
|
118
119
|
}
|
|
@@ -135,8 +136,8 @@ export class StartView extends UI.Widget.Widget {
|
|
|
135
136
|
control.setTitle(runtimeSetting.description());
|
|
136
137
|
toolbar.appendToolbarItem(control);
|
|
137
138
|
if (runtimeSetting.learnMore) {
|
|
138
|
-
const link =
|
|
139
|
-
runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more',
|
|
139
|
+
const link =
|
|
140
|
+
Link.create(runtimeSetting.learnMore, i18nString(UIStrings.learnMore), 'lighthouse-learn-more', 'learn-more');
|
|
140
141
|
link.style.marginLeft = '5px';
|
|
141
142
|
link.style.display = 'inline-flex';
|
|
142
143
|
link.style.height = 'revert';
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
import * as Common from '../../core/common/common.js';
|
|
7
7
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
8
|
import type * as Platform from '../../core/platform/platform.js';
|
|
9
|
+
import {Link} from '../../ui/kit/kit.js';
|
|
9
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
10
11
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
11
12
|
|
|
@@ -59,8 +60,8 @@ export class LinearMemoryInspectorPane extends Common.ObjectWrapper.eventMixin<E
|
|
|
59
60
|
|
|
60
61
|
const description = placeholder.createChild('div', 'empty-state-description');
|
|
61
62
|
description.createChild('span').textContent = i18nString(UIStrings.memoryInspectorExplanation);
|
|
62
|
-
const link =
|
|
63
|
-
MEMORY_INSPECTOR_EXPLANATION_URL, i18nString(UIStrings.learnMore), undefined,
|
|
63
|
+
const link =
|
|
64
|
+
Link.create(MEMORY_INSPECTOR_EXPLANATION_URL, i18nString(UIStrings.learnMore), undefined, 'learn-more');
|
|
64
65
|
description.appendChild(link);
|
|
65
66
|
|
|
66
67
|
return placeholder;
|
|
@@ -21,6 +21,7 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
21
21
|
import * as NetworkComponents from './components/components.js';
|
|
22
22
|
import {EventSourceMessagesView} from './EventSourceMessagesView.js';
|
|
23
23
|
import {RequestCookiesView} from './RequestCookiesView.js';
|
|
24
|
+
import {RequestDeviceBoundSessionsView} from './RequestDeviceBoundSessionsView.js';
|
|
24
25
|
import {RequestInitiatorView} from './RequestInitiatorView.js';
|
|
25
26
|
import {RequestPayloadView} from './RequestPayloadView.js';
|
|
26
27
|
import {RequestPreviewView} from './RequestPreviewView.js';
|
|
@@ -114,6 +115,17 @@ const UIStrings = {
|
|
|
114
115
|
* @description Text for web cookies
|
|
115
116
|
*/
|
|
116
117
|
cookies: 'Cookies',
|
|
118
|
+
/**
|
|
119
|
+
* @description Title of the Device Bound Sessions tab in the Network panel. A
|
|
120
|
+
* website may decide to create a session for a user, for example when the user
|
|
121
|
+
* logs in. They can use a protocol to make it a "device bound session". That
|
|
122
|
+
* means that when the session expires, it is only possible for it to be
|
|
123
|
+
* extended on the device it was created on. Thus the session is considered
|
|
124
|
+
* to be bound to that device. For more details on the protocol, see
|
|
125
|
+
* https://github.com/w3c/webappsec-dbsc/blob/main/README.md and
|
|
126
|
+
* https://w3c.github.io/webappsec-dbsc/.
|
|
127
|
+
*/
|
|
128
|
+
deviceBoundSessions: 'Device bound sessions',
|
|
117
129
|
/**
|
|
118
130
|
* @description Text in Network Item View of the Network panel
|
|
119
131
|
*/
|
|
@@ -140,6 +152,7 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
140
152
|
#payloadView: RequestPayloadView|null = null;
|
|
141
153
|
readonly #responseView: RequestResponseView|undefined;
|
|
142
154
|
#cookiesView: RequestCookiesView|null = null;
|
|
155
|
+
#deviceBoundSessionsView: RequestDeviceBoundSessionsView|null = null;
|
|
143
156
|
#initialTab?: NetworkForward.UIRequestLocation.UIRequestTabs;
|
|
144
157
|
readonly #firstTab: NetworkForward.UIRequestLocation.UIRequestTabs;
|
|
145
158
|
|
|
@@ -253,10 +266,10 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
253
266
|
super.wasShown();
|
|
254
267
|
this.#request.addEventListener(SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.requestHeadersChanged, this);
|
|
255
268
|
this.#request.addEventListener(
|
|
256
|
-
SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.
|
|
269
|
+
SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.maybeAppendCookieResponsePanels, this);
|
|
257
270
|
this.#request.addEventListener(
|
|
258
271
|
SDK.NetworkRequest.Events.TRUST_TOKEN_RESULT_ADDED, this.maybeShowErrorIconInTrustTokenTabHeader, this);
|
|
259
|
-
this.
|
|
272
|
+
this.maybeAppendCookieResponsePanels();
|
|
260
273
|
this.maybeShowErrorIconInTrustTokenTabHeader();
|
|
261
274
|
|
|
262
275
|
// Only select the initial tab the first time the view is shown after construction.
|
|
@@ -283,7 +296,7 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
283
296
|
this.#request.removeEventListener(
|
|
284
297
|
SDK.NetworkRequest.Events.REQUEST_HEADERS_CHANGED, this.requestHeadersChanged, this);
|
|
285
298
|
this.#request.removeEventListener(
|
|
286
|
-
SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.
|
|
299
|
+
SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.maybeAppendCookieResponsePanels, this);
|
|
287
300
|
this.#request.removeEventListener(
|
|
288
301
|
SDK.NetworkRequest.Events.TRUST_TOKEN_RESULT_ADDED, this.maybeShowErrorIconInTrustTokenTabHeader, this);
|
|
289
302
|
}
|
|
@@ -293,6 +306,11 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
293
306
|
void this.maybeAppendPayloadPanel();
|
|
294
307
|
}
|
|
295
308
|
|
|
309
|
+
private maybeAppendCookieResponsePanels(): void {
|
|
310
|
+
this.maybeAppendCookiesPanel();
|
|
311
|
+
this.maybeAppendDeviceBoundSessionsPanel();
|
|
312
|
+
}
|
|
313
|
+
|
|
296
314
|
private maybeAppendCookiesPanel(): void {
|
|
297
315
|
const cookiesPresent = this.#request.hasRequestCookies() || this.#request.responseCookies.length > 0;
|
|
298
316
|
console.assert(cookiesPresent || !this.#cookiesView, 'Cookies were introduced in headers and then removed!');
|
|
@@ -311,6 +329,17 @@ export class NetworkItemView extends UI.TabbedPane.TabbedPane {
|
|
|
311
329
|
}
|
|
312
330
|
}
|
|
313
331
|
|
|
332
|
+
private maybeAppendDeviceBoundSessionsPanel(): void {
|
|
333
|
+
const deviceBoundSessionsPresent = this.#request.getDeviceBoundSessionUsages().length > 0;
|
|
334
|
+
if (deviceBoundSessionsPresent && !this.#deviceBoundSessionsView) {
|
|
335
|
+
this.#deviceBoundSessionsView = new RequestDeviceBoundSessionsView(this.#request);
|
|
336
|
+
this.appendTab(
|
|
337
|
+
NetworkForward.UIRequestLocation.UIRequestTabs.DEVICE_BOUND_SESSIONS,
|
|
338
|
+
i18nString(UIStrings.deviceBoundSessions), this.#deviceBoundSessionsView,
|
|
339
|
+
i18nString(UIStrings.deviceBoundSessions));
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
314
343
|
private async maybeAppendPayloadPanel(): Promise<void> {
|
|
315
344
|
if (this.hasTab('payload')) {
|
|
316
345
|
return;
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
5
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
6
6
|
|
|
7
|
-
import '../../ui/kit/kit.js';
|
|
8
7
|
import '../../ui/legacy/legacy.js';
|
|
9
8
|
import '../../ui/components/tooltips/tooltips.js';
|
|
10
9
|
|
|
@@ -16,6 +15,7 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
|
16
15
|
import * as Logs from '../../models/logs/logs.js';
|
|
17
16
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
18
17
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
18
|
+
import {Link} from '../../ui/kit/kit.js';
|
|
19
19
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
20
20
|
import {Directives, html, type LitTemplate, nothing, render} from '../../ui/lit/lit.js';
|
|
21
21
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
@@ -575,8 +575,7 @@ export class RequestConditionsDrawer extends UI.Widget.VBox implements
|
|
|
575
575
|
const titles = content.createChild('div', 'blocked-url-edit-row');
|
|
576
576
|
const label = titles.createChild('label');
|
|
577
577
|
if (Root.Runtime.hostConfig.devToolsIndividualRequestThrottling?.enabled) {
|
|
578
|
-
const learnMore =
|
|
579
|
-
PATTERN_API_DOCS_URL, i18nString(UIStrings.learnMore), undefined, undefined, 'learn-more');
|
|
578
|
+
const learnMore = Link.create(PATTERN_API_DOCS_URL, i18nString(UIStrings.learnMore), undefined, 'learn-more');
|
|
580
579
|
learnMore.title = i18nString(UIStrings.learnMoreLabel);
|
|
581
580
|
titles.append('\xA0', learnMore);
|
|
582
581
|
label.textContent = i18nString(UIStrings.textEditPattern);
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import '../../ui/legacy/components/data_grid/data_grid.js';
|
|
6
|
+
|
|
7
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
|
+
import * as Protocol from '../../generated/protocol.js';
|
|
10
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
|
+
import {html, nothing, render} from '../../ui/lit/lit.js';
|
|
12
|
+
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
13
|
+
|
|
14
|
+
import requestDeviceBoundSessionsViewStyles from './requestDeviceBoundSessionsView.css.js';
|
|
15
|
+
|
|
16
|
+
const UIStrings = {
|
|
17
|
+
/**
|
|
18
|
+
* @description Heading for the ID of a session.
|
|
19
|
+
*/
|
|
20
|
+
sessionId: 'Session ID',
|
|
21
|
+
/**
|
|
22
|
+
* @description Heading for the decision on whether an HTTP request was deferred. (i.e. paused and
|
|
23
|
+
* later unpaused).
|
|
24
|
+
*/
|
|
25
|
+
deferralDecision: 'Deferral decision',
|
|
26
|
+
/**
|
|
27
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
28
|
+
* request was deferred (i.e. paused and later unpaused). The reasoning for the deferral
|
|
29
|
+
* is that there was a refresh.
|
|
30
|
+
*/
|
|
31
|
+
deferred: 'Deferred (Refresh)',
|
|
32
|
+
/**
|
|
33
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
34
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
35
|
+
* not being deferred is that there was a refresh attempted proactively.
|
|
36
|
+
*/
|
|
37
|
+
proactiveRefreshAttempted: 'Not deferred (Proactive refresh attempted)',
|
|
38
|
+
/**
|
|
39
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
40
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
41
|
+
* not being deferred is that while the HTTP request is in scope of a session, it was
|
|
42
|
+
* not possible to trigger a refresh proactively.
|
|
43
|
+
*/
|
|
44
|
+
proactiveRefreshNotPossible: 'Not deferred (Request is in scope of session but proactive refresh is not possible)',
|
|
45
|
+
/**
|
|
46
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
47
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
48
|
+
* not being deferred is that while the HTTP request is in scope of a session, the HTTP
|
|
49
|
+
* request's initiator is not allowed to trigger a refresh.
|
|
50
|
+
*/
|
|
51
|
+
inScopeRefreshNotAllowed:
|
|
52
|
+
'Not deferred (Request is in scope of session but initiator is not allowed to trigger refresh)',
|
|
53
|
+
/**
|
|
54
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
55
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
56
|
+
* not being deferred is that while the HTTP request is in scope of a session, the
|
|
57
|
+
* session's cookies are still present, so there is no need to trigger a refresh yet.
|
|
58
|
+
*/
|
|
59
|
+
inScopeRefreshNotYetNeeded: 'Not deferred (Request is in scope of session but cookies are still present)',
|
|
60
|
+
/**
|
|
61
|
+
* @description One of the HTTP request deferral decisions. This one notes that the
|
|
62
|
+
* request was not deferred (i.e. not paused and later unpaused). The reasoning for it
|
|
63
|
+
* not being deferred is that the HTTP request is not in scope of a session.
|
|
64
|
+
*/
|
|
65
|
+
notInScope: 'Not deferred (Request is not in scope of session)',
|
|
66
|
+
} as const;
|
|
67
|
+
|
|
68
|
+
const str_ = i18n.i18n.registerUIStrings('panels/network/RequestDeviceBoundSessionsView.ts', UIStrings);
|
|
69
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
70
|
+
|
|
71
|
+
interface ViewInput {
|
|
72
|
+
deviceBoundSessionUsages: Protocol.Network.DeviceBoundSessionWithUsage[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type ViewOutput = object;
|
|
76
|
+
|
|
77
|
+
export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTMLElement): void => {
|
|
78
|
+
const {deviceBoundSessionUsages} = input;
|
|
79
|
+
|
|
80
|
+
render(
|
|
81
|
+
html`
|
|
82
|
+
<style>${UI.inspectorCommonStyles}</style>
|
|
83
|
+
<style>${requestDeviceBoundSessionsViewStyles}</style>
|
|
84
|
+
<div class="request-device-bound-sessions-view">
|
|
85
|
+
${
|
|
86
|
+
deviceBoundSessionUsages.length > 0 ? html`
|
|
87
|
+
<div class="device-bound-session-grid-wrapper">
|
|
88
|
+
<devtools-data-grid striped inline>
|
|
89
|
+
<table>
|
|
90
|
+
<thead>
|
|
91
|
+
<tr>
|
|
92
|
+
<th id="session-id" sortable>${i18nString(UIStrings.sessionId)}</th>
|
|
93
|
+
<th id="deferral-decision" sortable>${i18nString(UIStrings.deferralDecision)}</th>
|
|
94
|
+
</tr>
|
|
95
|
+
</thead>
|
|
96
|
+
<tbody>
|
|
97
|
+
${deviceBoundSessionUsages.map(session => html`
|
|
98
|
+
<tr>
|
|
99
|
+
<td>${session.sessionKey.id}</td>
|
|
100
|
+
<td>${getDeferralDecision(session.usage)}</td>
|
|
101
|
+
</tr>
|
|
102
|
+
`)}
|
|
103
|
+
</tbody>
|
|
104
|
+
</table>
|
|
105
|
+
</devtools-data-grid>
|
|
106
|
+
</div>
|
|
107
|
+
` :
|
|
108
|
+
nothing}
|
|
109
|
+
</div>
|
|
110
|
+
`,
|
|
111
|
+
target);
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export class RequestDeviceBoundSessionsView extends UI.Widget.VBox {
|
|
115
|
+
#request: SDK.NetworkRequest.NetworkRequest;
|
|
116
|
+
#view: typeof DEFAULT_VIEW;
|
|
117
|
+
|
|
118
|
+
constructor(request: SDK.NetworkRequest.NetworkRequest, view: typeof DEFAULT_VIEW = DEFAULT_VIEW) {
|
|
119
|
+
super({jslog: `${VisualLogging.pane('device-bound-sessions-request')}`});
|
|
120
|
+
this.#request = request;
|
|
121
|
+
this.#view = view;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
override wasShown(): void {
|
|
125
|
+
super.wasShown();
|
|
126
|
+
this.#request.addEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.performUpdate, this);
|
|
127
|
+
this.performUpdate();
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
override willHide(): void {
|
|
131
|
+
super.willHide();
|
|
132
|
+
this.#request.removeEventListener(SDK.NetworkRequest.Events.RESPONSE_HEADERS_CHANGED, this.performUpdate, this);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
override performUpdate(): void {
|
|
136
|
+
if (!this.isShowing()) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
this.#view({deviceBoundSessionUsages: this.#request.getDeviceBoundSessionUsages()}, {}, this.contentElement);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function getDeferralDecision(usage: Protocol.Network.DeviceBoundSessionWithUsageUsage): string {
|
|
144
|
+
switch (usage) {
|
|
145
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.NotInScope:
|
|
146
|
+
return i18nString(UIStrings.notInScope);
|
|
147
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.InScopeRefreshNotYetNeeded:
|
|
148
|
+
return i18nString(UIStrings.inScopeRefreshNotYetNeeded);
|
|
149
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.InScopeRefreshNotAllowed:
|
|
150
|
+
return i18nString(UIStrings.inScopeRefreshNotAllowed);
|
|
151
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.ProactiveRefreshNotPossible:
|
|
152
|
+
return i18nString(UIStrings.proactiveRefreshNotPossible);
|
|
153
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.ProactiveRefreshAttempted:
|
|
154
|
+
return i18nString(UIStrings.proactiveRefreshAttempted);
|
|
155
|
+
case Protocol.Network.DeviceBoundSessionWithUsageUsage.Deferred:
|
|
156
|
+
return i18nString(UIStrings.deferred);
|
|
157
|
+
default:
|
|
158
|
+
return usage;
|
|
159
|
+
}
|
|
160
|
+
}
|