chrome-devtools-frontend 1.0.1555430 → 1.0.1558690
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/common/Object.ts +5 -1
- package/front_end/core/host/ResourceLoader.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +3 -1
- package/front_end/core/sdk/DOMModel.ts +7 -0
- package/front_end/core/sdk/NetworkManager.ts +0 -7
- package/front_end/core/sdk/SourceMap.ts +16 -2
- package/front_end/core/sdk/SourceMapManager.ts +1 -1
- package/front_end/core/sdk/SourceMapScopesInfo.ts +11 -4
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +3 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +119 -8
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/main/GlobalAiButton.ts +5 -1
- package/front_end/generated/Deprecation.ts +0 -7
- package/front_end/generated/InspectorBackendCommands.ts +4 -4
- package/front_end/generated/protocol.ts +9 -1
- package/front_end/models/ai_assistance/AiConversation.ts +71 -10
- package/front_end/models/ai_assistance/ArtifactsManager.ts +67 -0
- package/front_end/models/ai_assistance/ConversationHandler.ts +3 -2
- package/front_end/models/ai_assistance/agents/AiAgent.ts +17 -27
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +151 -3
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +1 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +0 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +3 -3
- package/front_end/models/annotations/AnnotationRepository.ts +2 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +7 -6
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +4 -4
- package/front_end/models/greendev/Prototypes.ts +56 -0
- package/front_end/models/greendev/README.md +5 -0
- package/front_end/models/greendev/greendev.ts +5 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +2 -2
- package/front_end/models/stack_trace/StackTraceImpl.ts +5 -3
- package/front_end/models/stack_trace/StackTraceModel.ts +53 -40
- package/front_end/models/trace/EventsSerializer.ts +8 -2
- package/front_end/models/trace/extras/TraceTree.ts +4 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +2 -2
- package/front_end/models/trace/insights/LCPDiscovery.ts +0 -2
- package/front_end/models/trace/types/TraceEvents.ts +0 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +96 -91
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +16 -0
- package/front_end/panels/ai_assistance/components/ArtifactsViewer.ts +109 -7
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/CollapsibleAssistanceContentWidget.ts +7 -8
- package/front_end/panels/ai_assistance/components/PerformanceAgentFlameChart.ts +15 -8
- package/front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.ts +9 -9
- package/front_end/panels/ai_assistance/components/artifactsViewer.css +6 -1
- package/front_end/panels/ai_assistance/components/collapsibleAssistanceContentWidget.css +5 -6
- package/front_end/panels/application/AppManifestView.ts +360 -391
- package/front_end/panels/application/ApplicationPanelSidebar.ts +24 -57
- package/front_end/panels/application/CookieItemsView.ts +1 -0
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -0
- package/front_end/panels/application/ServiceWorkersView.ts +2 -0
- package/front_end/panels/application/SharedStorageTreeElement.ts +3 -0
- package/front_end/panels/application/StorageView.ts +1 -0
- package/front_end/panels/application/appManifestView.css +49 -1
- package/front_end/panels/application/components/ProtocolHandlersView.ts +2 -2
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -3
- package/front_end/panels/elements/ElementsTreeElement.ts +30 -1
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +7 -1
- package/front_end/panels/elements/components/AdornerManager.ts +8 -0
- package/front_end/panels/emulation/DeviceModeToolbar.ts +3 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +0 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +10 -0
- package/front_end/panels/lighthouse/lighthousePanel.css +46 -3
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +4 -8
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +148 -97
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +37 -35
- package/front_end/panels/network/NetworkLogViewColumns.ts +9 -9
- package/front_end/panels/network/RequestCookiesView.ts +125 -141
- package/front_end/panels/network/components/RequestHeadersView.ts +2 -2
- package/front_end/panels/network/requestCookiesView.css +22 -20
- package/front_end/panels/recorder/components/RecordingView.ts +3 -3
- package/front_end/panels/recorder/components/StepView.ts +2 -1
- package/front_end/panels/settings/SettingsScreen.ts +133 -1
- package/front_end/panels/settings/keybindsSettingsTab.css +4 -0
- package/front_end/panels/settings/settings-meta.ts +24 -0
- package/front_end/panels/settings/settingsScreen.css +4 -0
- package/front_end/panels/sources/CallStackSidebarPane.ts +7 -3
- package/front_end/panels/sources/DebuggerPausedMessage.ts +125 -90
- package/front_end/panels/sources/SourcesPanel.ts +10 -7
- package/front_end/panels/sources/UISourceCodeFrame.ts +3 -17
- package/front_end/panels/sources/debuggerPausedMessage.css +8 -0
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +2 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +2 -0
- package/front_end/third_party/acorn/estree-legacy.d.ts +4 -0
- 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/api/Browser.d.ts +12 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/CDPSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +14 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +10 -14
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +14 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +12 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +21 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.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/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +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.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +86 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +12 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/CDPSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +14 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js +6 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts +0 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +11 -15
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +14 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +12 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.js +22 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/EmulationManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +9 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +21 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.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/lib/types.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +18 -0
- package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +18 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +13 -0
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +0 -33
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +14 -28
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +19 -0
- package/front_end/third_party/puppeteer/package/src/bidi/core/Connection.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +19 -0
- package/front_end/third_party/puppeteer/package/src/cdp/EmulationManager.ts +30 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +15 -6
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +29 -10
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/icon_button/iconButton.css +3 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +37 -0
- package/front_end/ui/components/report_view/ReportView.ts +12 -6
- package/front_end/ui/components/report_view/report.css +16 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +135 -7
- package/front_end/ui/components/text_editor/config.ts +6 -6
- package/front_end/ui/legacy/ContextMenu.ts +11 -2
- package/front_end/ui/legacy/Floaty.ts +5 -9
- package/front_end/ui/legacy/InspectorView.ts +2 -1
- package/front_end/ui/legacy/ReportView.ts +5 -4
- package/front_end/ui/legacy/TextPrompt.ts +1 -1
- package/front_end/ui/legacy/Toolbar.ts +4 -0
- package/front_end/ui/legacy/UIUtils.ts +0 -2
- package/front_end/ui/legacy/Widget.ts +7 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +18 -3
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +6 -0
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +0 -1
- package/front_end/ui/legacy/reportView.css +0 -24
- package/front_end/ui/visual_logging/KnownContextValues.ts +7 -0
- package/package.json +1 -1
|
@@ -1165,71 +1165,38 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
|
|
|
1165
1165
|
generateChildren(): void {
|
|
1166
1166
|
const staticSections = this.view.getStaticSections();
|
|
1167
1167
|
for (const section of staticSections) {
|
|
1168
|
-
const
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
this.
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
onInvoke(): void {
|
|
1178
|
-
this.view.getManifestElement().scrollIntoView();
|
|
1179
|
-
UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.onInvokeAlert, {PH1: this.listItemElement.title}));
|
|
1180
|
-
}
|
|
1168
|
+
const childTitle = section.title;
|
|
1169
|
+
const child = new ApplicationPanelTreeElement(this.resourcesPanel, childTitle, false, section.jslogContext || '');
|
|
1170
|
+
child.onselect = (selectedByUser?: boolean): boolean => {
|
|
1171
|
+
if (selectedByUser) {
|
|
1172
|
+
this.showView(this.view);
|
|
1173
|
+
this.view.scrollToSection(childTitle);
|
|
1174
|
+
}
|
|
1175
|
+
return true;
|
|
1176
|
+
};
|
|
1181
1177
|
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1178
|
+
const icon = createIcon('document');
|
|
1179
|
+
child.setLeadingIcons([icon]);
|
|
1186
1180
|
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
storagePanel: ResourcesPanel, element: Element, childTitle: string, fieldElement: HTMLElement,
|
|
1192
|
-
jslogContext: string) {
|
|
1193
|
-
super(storagePanel, childTitle, false, jslogContext);
|
|
1194
|
-
const icon = createIcon('document');
|
|
1195
|
-
this.setLeadingIcons([icon]);
|
|
1196
|
-
this.#sectionElement = element;
|
|
1197
|
-
this.#sectionFieldElement = fieldElement;
|
|
1198
|
-
self.onInvokeElement(this.listItemElement, this.onInvoke.bind(this));
|
|
1199
|
-
this.listItemElement.addEventListener('keydown', this.onInvokeElementKeydown.bind(this));
|
|
1200
|
-
UI.ARIAUtils.setLabel(
|
|
1201
|
-
this.listItemElement, i18nString(UIStrings.beforeInvokeAlert, {PH1: this.listItemElement.title}));
|
|
1202
|
-
}
|
|
1181
|
+
child.listItemElement.addEventListener('keydown', (event: Event) => {
|
|
1182
|
+
if ((event as KeyboardEvent).key !== 'Tab' || (event as KeyboardEvent).shiftKey) {
|
|
1183
|
+
return;
|
|
1184
|
+
}
|
|
1203
1185
|
|
|
1204
|
-
|
|
1205
|
-
|
|
1186
|
+
if (this.view.focusOnSection(childTitle)) {
|
|
1187
|
+
event.consume(true);
|
|
1188
|
+
}
|
|
1189
|
+
});
|
|
1190
|
+
UI.ARIAUtils.setLabel(
|
|
1191
|
+
child.listItemElement, i18nString(UIStrings.beforeInvokeAlert, {PH1: child.listItemElement.title}));
|
|
1192
|
+
this.appendChild(child);
|
|
1193
|
+
}
|
|
1206
1194
|
}
|
|
1207
1195
|
|
|
1208
1196
|
onInvoke(): void {
|
|
1209
|
-
|
|
1210
|
-
this.#sectionElement.scrollIntoView();
|
|
1197
|
+
this.view.getManifestElement().scrollIntoView();
|
|
1211
1198
|
UI.ARIAUtils.LiveAnnouncer.alert(i18nString(UIStrings.onInvokeAlert, {PH1: this.listItemElement.title}));
|
|
1212
1199
|
}
|
|
1213
|
-
// direct focus to the corresponding element
|
|
1214
|
-
onInvokeElementKeydown(event: KeyboardEvent): void {
|
|
1215
|
-
if (event.key !== 'Tab' || event.shiftKey) {
|
|
1216
|
-
return;
|
|
1217
|
-
}
|
|
1218
|
-
const checkBoxElement = this.#sectionFieldElement.querySelector('.mask-checkbox');
|
|
1219
|
-
let focusableElement: HTMLElement|null = this.#sectionFieldElement.querySelector('[tabindex="0"]');
|
|
1220
|
-
if (checkBoxElement?.shadowRoot) {
|
|
1221
|
-
focusableElement = checkBoxElement.shadowRoot.querySelector('input') || null;
|
|
1222
|
-
} else if (!focusableElement) {
|
|
1223
|
-
// special case for protocol handler section since it is a custom Element and has different structure than the others
|
|
1224
|
-
focusableElement = this.#sectionFieldElement.querySelector('devtools-protocol-handlers-view')
|
|
1225
|
-
?.shadowRoot?.querySelector('[tabindex="0"]') ||
|
|
1226
|
-
null;
|
|
1227
|
-
}
|
|
1228
|
-
if (focusableElement) {
|
|
1229
|
-
focusableElement?.focus();
|
|
1230
|
-
event.consume(true);
|
|
1231
|
-
}
|
|
1232
|
-
}
|
|
1233
1200
|
}
|
|
1234
1201
|
|
|
1235
1202
|
export class ClearStorageTreeElement extends ApplicationPanelTreeElement {
|
|
@@ -184,6 +184,7 @@ export class CookieItemsView extends UI.Widget.VBox {
|
|
|
184
184
|
this.#toolbar.show(this.element);
|
|
185
185
|
|
|
186
186
|
this.cookiesTable = new CookieTable.CookiesTable.CookiesTable(
|
|
187
|
+
undefined,
|
|
187
188
|
/* renderInline */ false, this.saveCookie.bind(this), this.refreshItems.bind(this),
|
|
188
189
|
this.handleCookieSelected.bind(this), this.deleteCookie.bind(this));
|
|
189
190
|
|
|
@@ -153,6 +153,7 @@ export class OpenedWindowDetailsView extends UI.Widget.VBox {
|
|
|
153
153
|
this.isWindowClosed = isWindowClosed;
|
|
154
154
|
|
|
155
155
|
this.contentElement.classList.add('frame-details-container');
|
|
156
|
+
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
156
157
|
this.reportView = new UI.ReportView.ReportView(this.buildTitle());
|
|
157
158
|
|
|
158
159
|
this.reportView.show(this.contentElement);
|
|
@@ -220,6 +221,7 @@ export class WorkerDetailsView extends UI.Widget.VBox {
|
|
|
220
221
|
this.targetInfo = targetInfo;
|
|
221
222
|
|
|
222
223
|
this.contentElement.classList.add('frame-details-container');
|
|
224
|
+
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
223
225
|
this.reportView =
|
|
224
226
|
new UI.ReportView.ReportView(this.targetInfo.title || this.targetInfo.url || i18nString(UIStrings.worker));
|
|
225
227
|
|
|
@@ -202,6 +202,7 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
|
|
|
202
202
|
});
|
|
203
203
|
this.registerRequiredCSS(serviceWorkersViewStyles);
|
|
204
204
|
|
|
205
|
+
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
205
206
|
this.currentWorkersView = new UI.ReportView.ReportView(i18n.i18n.lockedString('Service workers'));
|
|
206
207
|
this.currentWorkersView.setBodyScrollable(false);
|
|
207
208
|
this.contentElement.classList.add('service-worker-list');
|
|
@@ -220,6 +221,7 @@ export class ServiceWorkersView extends UI.Widget.VBox implements
|
|
|
220
221
|
|
|
221
222
|
const othersDiv = this.contentElement.createChild('div', 'service-workers-other-origin');
|
|
222
223
|
othersDiv.setAttribute('jslog', `${VisualLogging.section('other-origin')}`);
|
|
224
|
+
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
223
225
|
const othersView = new UI.ReportView.ReportView();
|
|
224
226
|
othersView.setHeaderVisible(false);
|
|
225
227
|
othersView.show(othersDiv);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import type * as Platform from '../../core/platform/platform.js';
|
|
6
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
6
7
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
7
8
|
|
|
8
9
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
|
@@ -22,6 +23,8 @@ export class SharedStorageTreeElement extends ApplicationPanelTreeElement {
|
|
|
22
23
|
const treeElement = new SharedStorageTreeElement(resourcesPanel, sharedStorage);
|
|
23
24
|
treeElement.view = await SharedStorageItemsView.createView(sharedStorage);
|
|
24
25
|
treeElement.view.element.setAttribute('jslog', `${VisualLogging.pane('shared-storage-data')}`);
|
|
26
|
+
const sharedStorageIcon = createIcon('database');
|
|
27
|
+
treeElement.setLeadingIcons([sharedStorageIcon]);
|
|
25
28
|
return treeElement;
|
|
26
29
|
}
|
|
27
30
|
|
|
@@ -181,6 +181,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
181
181
|
[Protocol.Storage.StorageType.Service_workers, 'rgb(255, 167, 36)'], // orange
|
|
182
182
|
]);
|
|
183
183
|
|
|
184
|
+
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
184
185
|
this.reportView = new UI.ReportView.ReportView(i18nString(UIStrings.storageTitle));
|
|
185
186
|
this.reportView.registerRequiredCSS(storageViewStyles);
|
|
186
187
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
flex-grow: 0;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
:host {
|
|
17
17
|
overflow: auto;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -39,3 +39,51 @@ select {
|
|
|
39
39
|
.inline-button {
|
|
40
40
|
vertical-align: sub;
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
devtools-report .report-row {
|
|
44
|
+
margin: var(--sys-size-3) 0 var(--sys-size-3) var(--sys-size-9);
|
|
45
|
+
grid-column: 1 / 3;
|
|
46
|
+
|
|
47
|
+
> devtools-checkbox:first-child {
|
|
48
|
+
margin-left: calc(var(--sys-size-4) * -1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
> devtools-icon:first-child {
|
|
52
|
+
/* We have inline icons that would otherwise be mis-aligned */
|
|
53
|
+
margin-inline-start: 0;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
devtools-report .report-section {
|
|
58
|
+
display: grid;
|
|
59
|
+
grid-column: 1 / 3;
|
|
60
|
+
grid-template-columns: subgrid;
|
|
61
|
+
padding-bottom: var(--sys-size-5);
|
|
62
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
63
|
+
margin-bottom: var(--sys-size-5);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.image-wrapper,
|
|
67
|
+
.image-wrapper img {
|
|
68
|
+
max-width: 200px;
|
|
69
|
+
max-height: 200px;
|
|
70
|
+
display: block;
|
|
71
|
+
object-fit: contain;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.image-wrapper {
|
|
75
|
+
display: inline-block;
|
|
76
|
+
height: fit-content;
|
|
77
|
+
margin-right: 8px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.show-mask img {
|
|
81
|
+
/* The safe zone is a centrally positioned circle, with radius 2/5
|
|
82
|
+
* (40%) of the minimum of the icon's width and height.
|
|
83
|
+
* https://w3c.github.io/manifest/#icon-masks */
|
|
84
|
+
clip-path: circle(40% at 50% 50%);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.show-mask .image-wrapper {
|
|
88
|
+
background: var(--image-file-checker);
|
|
89
|
+
}
|
|
@@ -144,7 +144,7 @@ const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
144
144
|
${renderStatusMessage(input.protocolHandler, input.manifestLink)}
|
|
145
145
|
<div class="protocol-handlers-row">
|
|
146
146
|
${i18nTemplate(UIStrings.needHelpReadOur, {PH1: html`
|
|
147
|
-
<x-link href=${PROTOCOL_DOCUMENT_URL} tabindex=0 class="devtools-link" jslog=${
|
|
147
|
+
<x-link href=${PROTOCOL_DOCUMENT_URL} tabindex=0 class="devtools-link" autofocus jslog=${
|
|
148
148
|
VisualLogging.link('learn-more').track({click: true, keydown: 'Enter|Space'})}>
|
|
149
149
|
${i18nString(UIStrings.protocolHandlerRegistrations)}
|
|
150
150
|
</x-link>`})}
|
|
@@ -173,7 +173,7 @@ export class ProtocolHandlersView extends UI.Widget.Widget {
|
|
|
173
173
|
#view: View;
|
|
174
174
|
|
|
175
175
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
176
|
-
super(element, {useShadowDom: false});
|
|
176
|
+
super(element, {useShadowDom: false, classes: ['vbox']});
|
|
177
177
|
this.#view = view;
|
|
178
178
|
}
|
|
179
179
|
|
|
@@ -982,10 +982,11 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
982
982
|
const renderResult = await UI.UIUtils.Renderer.render(node);
|
|
983
983
|
if (renderResult) {
|
|
984
984
|
this.selectableChildren.push(renderResult);
|
|
985
|
-
|
|
985
|
+
// FIXME: this should not be needed once ConsoleViewMessage is rendering
|
|
986
|
+
// declaratively and the tree outline auto-resizes itself.
|
|
987
|
+
renderResult.element.addEventListener('dimensionschanged', () => {
|
|
986
988
|
this.messageResized({data: renderResult.element});
|
|
987
989
|
});
|
|
988
|
-
resizeObserver.observe(renderResult.element);
|
|
989
990
|
result.appendChild(renderResult.element);
|
|
990
991
|
} else {
|
|
991
992
|
result.appendChild(this.formatParameterAsObject(remoteObject, false));
|
|
@@ -1185,7 +1186,7 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
1185
1186
|
}
|
|
1186
1187
|
|
|
1187
1188
|
matchesFilterText(filter: string): boolean {
|
|
1188
|
-
const text = this.contentElement().deepTextContent();
|
|
1189
|
+
const text = this.contentElement().deepTextContent() + this.message.messageText;
|
|
1189
1190
|
return text.toLowerCase().includes(filter.toLowerCase());
|
|
1190
1191
|
}
|
|
1191
1192
|
|
|
@@ -44,6 +44,7 @@ import * as Badges from '../../models/badges/badges.js';
|
|
|
44
44
|
import type * as Elements from '../../models/elements/elements.js';
|
|
45
45
|
import type * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
46
46
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
|
47
|
+
import * as Workspace from '../../models/workspace/workspace.js';
|
|
47
48
|
import * as CodeMirror from '../../third_party/codemirror.next/codemirror.next.js';
|
|
48
49
|
import type {DirectiveResult} from '../../third_party/lit/lib/directive.js';
|
|
49
50
|
import * as Adorners from '../../ui/components/adorners/adorners.js';
|
|
@@ -275,6 +276,10 @@ const UIStrings = {
|
|
|
275
276
|
*/
|
|
276
277
|
startAChat: 'Start a chat',
|
|
277
278
|
/**
|
|
279
|
+
* @description Label of an adorner next to the html node in the Elements panel.
|
|
280
|
+
*/
|
|
281
|
+
viewSourceCode: 'View source code',
|
|
282
|
+
/**
|
|
278
283
|
* @description Context menu item in Elements panel to assess visibility of an element via AI.
|
|
279
284
|
*/
|
|
280
285
|
assessVisibility: 'Assess visibility',
|
|
@@ -386,6 +391,7 @@ export interface ViewInput {
|
|
|
386
391
|
showTopLayerAdorner: boolean;
|
|
387
392
|
isSubgrid: boolean;
|
|
388
393
|
|
|
394
|
+
showViewSourceAdorner: boolean;
|
|
389
395
|
adorners?: Set<Adorners.Adorner.Adorner>;
|
|
390
396
|
nodeInfo?: DocumentFragment;
|
|
391
397
|
topLayerIndex: number;
|
|
@@ -399,6 +405,7 @@ export interface ViewInput {
|
|
|
399
405
|
onMediaAdornerClick: (e: Event) => void;
|
|
400
406
|
onPopoverAdornerClick: (e: Event) => void;
|
|
401
407
|
onTopLayerAdornerClick: (e: Event) => void;
|
|
408
|
+
onViewSourceAdornerClick: () => void;
|
|
402
409
|
}
|
|
403
410
|
|
|
404
411
|
export interface ViewOutput {
|
|
@@ -429,6 +436,8 @@ function adornerRef(input: ViewInput): DirectiveResult<typeof Lit.Directives.Ref
|
|
|
429
436
|
export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLElement): void => {
|
|
430
437
|
const adAdornerConfig =
|
|
431
438
|
ElementsComponents.AdornerManager.getRegisteredAdorner(ElementsComponents.AdornerManager.RegisteredAdorners.AD);
|
|
439
|
+
const viewSourceAdornerConfig = ElementsComponents.AdornerManager.getRegisteredAdorner(
|
|
440
|
+
ElementsComponents.AdornerManager.RegisteredAdorners.VIEW_SOURCE);
|
|
432
441
|
const containerAdornerConfig = ElementsComponents.AdornerManager.getRegisteredAdorner(
|
|
433
442
|
ElementsComponents.AdornerManager.RegisteredAdorners.CONTAINER);
|
|
434
443
|
const flexAdornerConfig =
|
|
@@ -447,7 +456,7 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
447
456
|
ElementsComponents.AdornerManager.RegisteredAdorners.TOP_LAYER);
|
|
448
457
|
const hasAdorners = input.adorners?.size || input.showAdAdorner || input.showContainerAdorner ||
|
|
449
458
|
input.showFlexAdorner || input.showGridAdorner || input.showGridLanesAdorner || input.showMediaAdorner ||
|
|
450
|
-
input.showPopoverAdorner || input.showTopLayerAdorner;
|
|
459
|
+
input.showPopoverAdorner || input.showTopLayerAdorner || input.showViewSourceAdorner;
|
|
451
460
|
// clang-format off
|
|
452
461
|
render(html`
|
|
453
462
|
<div ${ref(el => { output.contentElement = el as HTMLElement; })}>
|
|
@@ -463,6 +472,13 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
463
472
|
${adornerRef(input)}>
|
|
464
473
|
<span>${adAdornerConfig.name}</span>
|
|
465
474
|
</devtools-adorner>` : nothing}
|
|
475
|
+
${input.showViewSourceAdorner ? html`<devtools-adorner
|
|
476
|
+
.data=${{name: viewSourceAdornerConfig.name, jslogContext: viewSourceAdornerConfig.name}}
|
|
477
|
+
aria-label=${i18nString(UIStrings.viewSourceCode)}
|
|
478
|
+
@click=${input.onViewSourceAdornerClick}
|
|
479
|
+
${adornerRef(input)}>
|
|
480
|
+
<span>${viewSourceAdornerConfig.name}</span>
|
|
481
|
+
</devtools-adorner>` : nothing}
|
|
466
482
|
${input.showContainerAdorner ? html`<devtools-adorner
|
|
467
483
|
class=clickable
|
|
468
484
|
role=button
|
|
@@ -800,8 +816,10 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
800
816
|
gridAdornerActive: this.#gridAdornerActive,
|
|
801
817
|
popoverAdornerActive: this.#popoverAdornerActive,
|
|
802
818
|
isSubgrid: Boolean(this.#layout?.isSubgrid),
|
|
819
|
+
showViewSourceAdorner: this.nodeInternal.isRootNode() && isOpeningTag(this.tagTypeContext),
|
|
803
820
|
nodeInfo: this.#nodeInfo,
|
|
804
821
|
topLayerIndex: this.node().topLayerIndex(),
|
|
822
|
+
onViewSourceAdornerClick: this.revealHTMLInSources.bind(this),
|
|
805
823
|
onGutterClick: this.showContextMenu.bind(this),
|
|
806
824
|
onAdornerAdded: adorner => {
|
|
807
825
|
ElementsPanel.instance().registerAdorner(adorner);
|
|
@@ -1291,6 +1309,17 @@ export class ElementsTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1291
1309
|
this.treeOutline && void this.treeOutline.showContextMenu(this, event);
|
|
1292
1310
|
}
|
|
1293
1311
|
|
|
1312
|
+
private revealHTMLInSources(): void {
|
|
1313
|
+
const frameOwnerId = this.nodeInternal.frameOwnerFrameId();
|
|
1314
|
+
if (frameOwnerId) {
|
|
1315
|
+
const frame = SDK.FrameManager.FrameManager.instance().getFrame(frameOwnerId);
|
|
1316
|
+
if (frame) {
|
|
1317
|
+
const sourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(frame.url);
|
|
1318
|
+
void Common.Revealer.reveal(sourceCode);
|
|
1319
|
+
}
|
|
1320
|
+
}
|
|
1321
|
+
}
|
|
1322
|
+
|
|
1294
1323
|
async populateTagContextMenu(contextMenu: UI.ContextMenu.ContextMenu, event: Event): Promise<void> {
|
|
1295
1324
|
// Add attribute-related actions.
|
|
1296
1325
|
const treeElement =
|
|
@@ -2000,7 +2000,7 @@ export class ElementsTreeOutline extends
|
|
|
2000
2000
|
this.insertChildElement(treeElement, node, treeElement.childCount(), true);
|
|
2001
2001
|
}
|
|
2002
2002
|
|
|
2003
|
-
if (node instanceof SDK.DOMModel.DOMDocument) {
|
|
2003
|
+
if (node instanceof SDK.DOMModel.DOMDocument && !this.isXMLMimeType) {
|
|
2004
2004
|
let topLayerContainer = this.#topLayerContainerByDocument.get(node);
|
|
2005
2005
|
if (!topLayerContainer) {
|
|
2006
2006
|
topLayerContainer = new TopLayerContainer(this, node);
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
*/
|
|
34
34
|
|
|
35
35
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
36
|
-
import
|
|
36
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
37
37
|
|
|
38
38
|
import {ElementsTreeOutline} from './ElementsTreeOutline.js';
|
|
39
39
|
|
|
@@ -75,6 +75,12 @@ export class Renderer implements UI.UIUtils.Renderer {
|
|
|
75
75
|
if (options?.expand) {
|
|
76
76
|
treeOutline.firstChild()?.expand();
|
|
77
77
|
}
|
|
78
|
+
const dispatchDimensionChange = (): void => {
|
|
79
|
+
treeOutline.element.dispatchEvent(new CustomEvent('dimensionschanged'));
|
|
80
|
+
};
|
|
81
|
+
treeOutline.addEventListener(UI.TreeOutline.Events.ElementAttached, dispatchDimensionChange);
|
|
82
|
+
treeOutline.addEventListener(UI.TreeOutline.Events.ElementExpanded, dispatchDimensionChange);
|
|
83
|
+
treeOutline.addEventListener(UI.TreeOutline.Events.ElementCollapsed, dispatchDimensionChange);
|
|
78
84
|
return {
|
|
79
85
|
element: treeOutline.element,
|
|
80
86
|
forceSelect: treeOutline.forceSelect.bind(treeOutline),
|
|
@@ -33,6 +33,7 @@ export enum RegisteredAdorners {
|
|
|
33
33
|
SCROLL = 'scroll',
|
|
34
34
|
SCROLL_SNAP = 'scroll-snap',
|
|
35
35
|
SLOT = 'slot',
|
|
36
|
+
VIEW_SOURCE = 'view-source',
|
|
36
37
|
STARTING_STYLE = 'starting-style',
|
|
37
38
|
SUBGRID = 'subgrid',
|
|
38
39
|
TOP_LAYER = 'top-layer',
|
|
@@ -129,6 +130,13 @@ export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorn
|
|
|
129
130
|
enabledByDefault: true,
|
|
130
131
|
};
|
|
131
132
|
}
|
|
133
|
+
case RegisteredAdorners.VIEW_SOURCE: {
|
|
134
|
+
return {
|
|
135
|
+
name: 'view-source',
|
|
136
|
+
category: AdornerCategories.DEFAULT,
|
|
137
|
+
enabledByDefault: true,
|
|
138
|
+
};
|
|
139
|
+
}
|
|
132
140
|
}
|
|
133
141
|
}
|
|
134
142
|
|
|
@@ -351,7 +351,9 @@ export class DeviceModeToolbar {
|
|
|
351
351
|
MobileThrottling.ThrottlingManager.throttlingManager().createMobileThrottlingButton();
|
|
352
352
|
this.throttlingConditionsItem.turnShrinkable();
|
|
353
353
|
toolbar.appendToolbarItem(this.throttlingConditionsItem);
|
|
354
|
-
|
|
354
|
+
const saveDataItem = MobileThrottling.ThrottlingManager.throttlingManager().createSaveDataOverrideSelector();
|
|
355
|
+
saveDataItem.turnShrinkable();
|
|
356
|
+
toolbar.appendToolbarItem(saveDataItem);
|
|
355
357
|
}
|
|
356
358
|
|
|
357
359
|
private appendDevicePositionItems(toolbar: UI.Toolbar.Toolbar): void {
|
|
@@ -254,7 +254,6 @@ export abstract class AffectedResourcesView extends UI.TreeOutline.TreeElement {
|
|
|
254
254
|
sourceCodeLocation.classList.add('affected-source-location');
|
|
255
255
|
if (sourceLocation) {
|
|
256
256
|
const maxLengthForDisplayedURLs = 40; // Same as console messages.
|
|
257
|
-
// TODO(crbug.com/1108503): Add some mechanism to be able to add telemetry to this element.
|
|
258
257
|
const linkifier = new Components.Linkifier.Linkifier(maxLengthForDisplayedURLs);
|
|
259
258
|
const sourceAnchor = linkifier.linkifyScriptLocation(
|
|
260
259
|
target || null, sourceLocation.scriptId || null, sourceLocation.url as Platform.DevToolsPath.UrlString,
|
|
@@ -104,6 +104,7 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
|
104
104
|
|
|
105
105
|
this.renderToolbar();
|
|
106
106
|
this.auditResultsElement = this.contentElement.createChild('div', 'lighthouse-results-container');
|
|
107
|
+
this.auditResultsElement.addEventListener('keydown', this.onKeyDown.bind(this));
|
|
107
108
|
this.renderStartView();
|
|
108
109
|
|
|
109
110
|
this.controller.recomputePageAuditability();
|
|
@@ -365,4 +366,13 @@ export class LighthousePanel extends UI.Panel.Panel {
|
|
|
365
366
|
}
|
|
366
367
|
return els;
|
|
367
368
|
}
|
|
369
|
+
|
|
370
|
+
private onKeyDown(event: KeyboardEvent): void {
|
|
371
|
+
// The LHR's tool button is a toggle. When the user hits escape, the default behavior
|
|
372
|
+
// is to close the tool drawer. We want to prevent this behavior and instead let the
|
|
373
|
+
// LHR's tool button handle the event and close the tool's dropdown.
|
|
374
|
+
if (event.key === 'Escape' && this.auditResultsElement.querySelector('.lh-tools__button.lh-active')) {
|
|
375
|
+
event.handled = true;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
368
378
|
}
|
|
@@ -19,9 +19,6 @@ button.view-trace {
|
|
|
19
19
|
margin: 10px;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
.lighthouse-results-container {
|
|
23
|
-
position: relative;
|
|
24
|
-
}
|
|
25
22
|
/** `window.opener` is null for windows opened from DevTools. This breaks
|
|
26
23
|
the LH viewer app, so disable this feature. */
|
|
27
24
|
|
|
@@ -63,3 +60,49 @@ select.lighthouse-report {
|
|
|
63
60
|
.lh-devtools .lh-element-screenshot__overlay {
|
|
64
61
|
position: absolute;
|
|
65
62
|
}
|
|
63
|
+
|
|
64
|
+
.lighthouse-results-container {
|
|
65
|
+
position: relative;
|
|
66
|
+
|
|
67
|
+
:focus-visible {
|
|
68
|
+
outline: -webkit-focus-ring-color auto 1px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.lh-tools__button {
|
|
72
|
+
height: var(--sys-size-9);
|
|
73
|
+
width: var(--sys-size-9);
|
|
74
|
+
min-width: var(--sys-size-9);
|
|
75
|
+
|
|
76
|
+
&:focus-visible {
|
|
77
|
+
border-radius: var(--sys-shape-corner-full);
|
|
78
|
+
outline: var(--sys-size-2) solid var(--sys-color-state-focus-ring);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.lh-active + .lh-tools__dropdown {
|
|
82
|
+
clip: rect(-8px, 204px, 270px, -10px); /* stylelint-disable-line property-no-deprecated */
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.lh-tools__dropdown {
|
|
87
|
+
padding: var(--sys-size-5) 0;
|
|
88
|
+
border-radius: var(--sys-shape-corner-small);
|
|
89
|
+
box-shadow: var(--sys-elevation-level3);
|
|
90
|
+
top: 24px;
|
|
91
|
+
|
|
92
|
+
&:hover a:focus {
|
|
93
|
+
background-color: transparent;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
a {
|
|
97
|
+
height: var(--sys-size-11);
|
|
98
|
+
padding: 0 var(--sys-size-8);
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
align-items: center;
|
|
101
|
+
|
|
102
|
+
&::before {
|
|
103
|
+
content: none;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
}
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import './LinearMemoryValueInterpreter.js';
|
|
6
5
|
import './LinearMemoryViewer.js';
|
|
7
6
|
|
|
8
7
|
import * as Common from '../../../core/common/common.js';
|
|
@@ -20,6 +19,7 @@ import {
|
|
|
20
19
|
Navigation,
|
|
21
20
|
type PageNavigationEvent,
|
|
22
21
|
} from './LinearMemoryNavigator.js';
|
|
22
|
+
import {LinearMemoryValueInterpreter} from './LinearMemoryValueInterpreter.js';
|
|
23
23
|
import type {ByteSelectedEvent, ResizeEvent} from './LinearMemoryViewer.js';
|
|
24
24
|
import type {HighlightInfo} from './LinearMemoryViewerUtils.js';
|
|
25
25
|
import {
|
|
@@ -186,10 +186,8 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: Record<string, unknown>,
|
|
|
186
186
|
${
|
|
187
187
|
input.hideValueInspector ? nothing : html`
|
|
188
188
|
<div class="value-interpreter">
|
|
189
|
-
<devtools-
|
|
190
|
-
|
|
191
|
-
{
|
|
192
|
-
value: input.memory
|
|
189
|
+
<devtools-widget .widgetConfig=${widgetConfig(LinearMemoryValueInterpreter, {
|
|
190
|
+
buffer: input.memory
|
|
193
191
|
.slice(
|
|
194
192
|
input.address - input.memoryOffset,
|
|
195
193
|
input.address + VALUE_INTEPRETER_MAX_NUM_BYTES,
|
|
@@ -203,9 +201,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: Record<string, unknown>,
|
|
|
203
201
|
onJumpToAddressClicked: input.onJumpToAddress,
|
|
204
202
|
onValueTypeToggled: input.onValueTypeToggled,
|
|
205
203
|
onEndiannessChanged: input.onEndiannessChanged,
|
|
206
|
-
|
|
207
|
-
>
|
|
208
|
-
</devtools-linear-memory-inspector-interpreter>
|
|
204
|
+
})}></devtools-widget>
|
|
209
205
|
</div>`}
|
|
210
206
|
`,
|
|
211
207
|
target);
|