chrome-devtools-frontend 1.0.1681091 → 1.0.1682249
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/eslint.config.mjs +8 -3
- package/front_end/core/sdk/ConsoleModel.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +8 -0
- package/front_end/core/sdk/NetworkManager.ts +9 -4
- package/front_end/core/sdk/OverlayModel.ts +3 -2
- package/front_end/core/sdk/PreloadingModel.ts +44 -22
- package/front_end/core/sdk/RemoteObject.ts +4 -1
- package/front_end/core/sdk/RuntimeModel.ts +5 -5
- package/front_end/core/sdk/SDKSettings.ts +19 -0
- package/front_end/core/sdk/sdk.ts +2 -0
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +1 -1
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +3 -1
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -5
- package/front_end/entrypoints/main/MainImpl.ts +9 -10
- package/front_end/entrypoints/main/main-meta.ts +82 -0
- package/front_end/entrypoints/shell/shell.ts +0 -5
- package/front_end/entrypoints/trace_app/trace_app.ts +0 -5
- package/front_end/generated/InspectorBackendCommands.ts +2 -0
- package/front_end/generated/protocol-mapping.d.ts +16 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +12 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +11 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +2 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +8 -8
- package/front_end/models/ai_code_completion/debug.ts +6 -3
- package/front_end/models/ai_code_generation/debug.ts +6 -3
- package/front_end/models/badges/UserBadges.ts +9 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +16 -27
- package/front_end/models/emulation/EmulatedDevices.ts +30 -125
- package/front_end/models/extensions/ExtensionAPI.ts +34 -23
- package/front_end/models/formatter/ScriptFormatter.ts +1 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +4 -4
- package/front_end/models/logs/NetworkLog.ts +11 -4
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +4 -2
- package/front_end/models/persistence/NetworkPersistenceManager.ts +7 -1
- package/front_end/models/stack_trace/StackTraceImpl.ts +1 -0
- package/front_end/models/trace/Name.ts +5 -5
- package/front_end/models/trace/Styles.ts +115 -115
- package/front_end/models/trace/extras/TraceTree.ts +2 -1
- package/front_end/models/trace/helpers/Network.ts +4 -1
- package/front_end/models/trace/insights/CLSCulprits.ts +4 -2
- package/front_end/models/trace/insights/CharacterSet.ts +3 -3
- package/front_end/models/trace/insights/DOMSize.ts +1 -1
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +6 -2
- package/front_end/models/trace/insights/FontDisplay.ts +9 -3
- package/front_end/models/trace/insights/ForcedReflow.ts +4 -4
- package/front_end/models/trace/insights/INPBreakdown.ts +3 -4
- package/front_end/models/trace/insights/ImageDelivery.ts +2 -2
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +5 -5
- package/front_end/models/trace/insights/LegacyJavaScript.ts +7 -3
- package/front_end/models/trace/insights/ModernHTTP.ts +3 -3
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +13 -9
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/SlowCSSSelector.ts +29 -25
- package/front_end/models/trace/insights/ThirdParties.ts +13 -5
- package/front_end/models/trace/insights/Viewport.ts +4 -2
- package/front_end/models/workspace/IgnoreListManager.ts +53 -17
- package/front_end/panels/accessibility/ARIAAttributesView.ts +11 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +67 -53
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -2
- package/front_end/panels/ai_assistance/components/StylingAgentMarkdownRenderer.ts +2 -2
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +5 -5
- package/front_end/panels/animation/AnimationTimeline.ts +2 -0
- package/front_end/panels/application/ServiceWorkersView.ts +1 -1
- package/front_end/panels/application/StorageView.ts +2 -0
- package/front_end/panels/application/preloading/PreloadingView.ts +9 -3
- package/front_end/panels/application/preloading/components/components.ts +2 -0
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +10 -11
- package/front_end/panels/changes/CombinedDiffView.ts +1 -1
- package/front_end/panels/common/BadgeNotification.ts +1 -1
- package/front_end/panels/common/ExtensionPanel.ts +12 -7
- package/front_end/panels/common/ExtensionServer.ts +85 -26
- package/front_end/panels/common/GdpSignUpDialog.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +3 -2
- package/front_end/panels/console/console-meta.ts +9 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +9 -4
- package/front_end/panels/elements/CSSRuleValidator.ts +12 -12
- package/front_end/panels/elements/CSSSpecificityBreakdown.ts +1 -1
- package/front_end/panels/elements/ClassesPaneWidget.ts +6 -6
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +4 -5
- package/front_end/panels/elements/DOMTreeContextMenu.ts +3 -6
- package/front_end/panels/elements/ElementIssueUtils.ts +20 -20
- package/front_end/panels/elements/ElementStatePaneWidget.ts +9 -6
- package/front_end/panels/elements/ElementsPanel.ts +10 -10
- package/front_end/panels/elements/ElementsTreeElement.ts +35 -29
- package/front_end/panels/elements/ElementsTreeOutline.ts +5 -20
- package/front_end/panels/elements/EventListenersWidget.ts +18 -19
- package/front_end/panels/elements/LayersWidget.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +11 -11
- package/front_end/panels/elements/MarkerDecorator.ts +3 -3
- package/front_end/panels/elements/PlatformFontsWidget.ts +8 -8
- package/front_end/panels/elements/PropertiesWidget.ts +4 -4
- package/front_end/panels/elements/PropertyRenderer.ts +2 -2
- package/front_end/panels/elements/ShortcutTreeElement.ts +1 -1
- package/front_end/panels/elements/StylePropertiesSection.ts +14 -14
- package/front_end/panels/elements/StylePropertyTreeElement.ts +21 -21
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -13
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +1 -1
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +1 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +3 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +2 -2
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/elements-meta.ts +13 -13
- package/front_end/panels/issues/AffectedCookiesView.ts +2 -0
- package/front_end/panels/issues/AffectedElementsView.ts +5 -0
- package/front_end/panels/issues/IssueView.ts +12 -8
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +11 -7
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +2 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -1
- package/front_end/panels/media/PlayerPropertiesView.ts +309 -416
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -2
- package/front_end/panels/network/NetworkOverview.ts +11 -5
- package/front_end/panels/network/NetworkPanel.ts +4 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +16 -3
- package/front_end/panels/network/RequestHeadersView.ts +4 -4
- package/front_end/panels/network/components/ResponseHeaderSection.ts +7 -4
- package/front_end/panels/network/network-meta.ts +63 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +2 -1
- package/front_end/panels/recorder/RecordingView.ts +89 -73
- package/front_end/panels/recorder/ReplaySection.ts +59 -40
- package/front_end/panels/recorder/injected/injected.ts +4 -0
- package/front_end/panels/security/SecurityPanel.ts +5 -6
- package/front_end/panels/security/SecurityPanelSidebar.ts +244 -204
- package/front_end/panels/security/security.ts +0 -4
- package/front_end/panels/settings/EditFileSystemView.ts +8 -7
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -14
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +0 -3
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +10 -11
- package/front_end/panels/sources/NavigatorView.ts +6 -2
- package/front_end/panels/sources/SourcesNavigator.ts +8 -4
- package/front_end/panels/sources/SourcesPanel.ts +4 -2
- package/front_end/panels/sources/SourcesSearchScope.ts +3 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +2 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +3 -3
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +5 -5
- package/front_end/panels/timeline/components/CWVMetrics.ts +1 -2
- package/front_end/panels/timeline/components/IgnoreListSetting.ts +5 -5
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +2 -3
- package/front_end/panels/timeline/components/LiveMetricsView.ts +2 -2
- package/front_end/panels/timeline/components/Sidebar.ts +3 -3
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +3 -1
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +1 -2
- package/front_end/panels/timeline/components/insights/Cache.ts +1 -2
- package/front_end/panels/timeline/components/insights/CharacterSet.ts +1 -2
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -2
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +2 -2
- package/front_end/panels/timeline/components/insights/DuplicatedJavaScript.ts +2 -2
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +1 -2
- package/front_end/panels/timeline/components/insights/ForcedReflow.ts +1 -2
- package/front_end/panels/timeline/components/insights/INPBreakdown.ts +1 -2
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LCPBreakdown.ts +13 -13
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +1 -2
- package/front_end/panels/timeline/components/insights/LegacyJavaScript.ts +4 -4
- package/front_end/panels/timeline/components/insights/ModernHTTP.ts +1 -2
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +10 -8
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +2 -2
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +3 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +1 -2
- package/front_end/panels/timeline/components/insights/Viewport.ts +1 -2
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +1 -2
- package/front_end/panels/timeline/timeline.ts +0 -2
- package/front_end/panels/web_audio/WebAudioView.ts +14 -6
- package/front_end/panels/webauthn/WebauthnPane.ts +9 -9
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/web-vitals/rebuild.sh +1 -1
- package/front_end/ui/components/diff_view/DiffView.ts +2 -1
- package/front_end/ui/components/report_view/ReportView.docs.ts +2 -2
- package/front_end/ui/components/text_editor/javascript.ts +12 -13
- package/front_end/ui/legacy/GlassPane.ts +38 -14
- package/front_end/ui/legacy/Treeoutline.ts +14 -3
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +11 -11
- package/front_end/ui/legacy/components/color_picker/FormatPickerContextMenu.ts +1 -1
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +19 -20
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/JavaScriptREPL.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +185 -355
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +3 -8
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +15 -16
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +4 -4
- package/front_end/ui/legacy/components/utils/Linkifier.ts +8 -10
- package/front_end/ui/settings/InspectorMainSettings.ts +12 -0
- package/front_end/ui/settings/settings.ts +2 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +32 -0
- package/mcp/mcp.ts +0 -9
- package/package.json +1 -1
- package/front_end/core/sdk/sdk-meta.ts +0 -40
- package/front_end/models/badges/badges-meta.ts +0 -27
- package/front_end/models/logs/logs-meta.ts +0 -84
- package/front_end/models/persistence/persistence-meta.ts +0 -69
- package/front_end/models/workspace/workspace-meta.ts +0 -40
- package/front_end/panels/security/OriginTreeElement.ts +0 -60
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +0 -30
|
@@ -738,7 +738,7 @@ export const DEFAULT_SECTION_VIEW: SectionView =
|
|
|
738
738
|
<span style="flex: 1 1 auto">${input.title}</span>
|
|
739
739
|
${renderHeaderButtons(input)}
|
|
740
740
|
</devtools-report-section-header>
|
|
741
|
-
<div class="service-worker-section">
|
|
741
|
+
<div class="service-worker-section" jslog=${VisualLogging.section('service-worker')}>
|
|
742
742
|
${renderSourceField(input, input.activeVersion ?? input.redundantVersion)}
|
|
743
743
|
${renderStatusField(input, input.activeVersion, input.waitingVersion, input.installingVersion, input.redundantVersion)}
|
|
744
744
|
${renderClientsField(input, input.activeVersion ?? input.redundantVersion)}
|
|
@@ -274,6 +274,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
274
274
|
quota.element.setAttribute('jslog', `${VisualLogging.section('usage')}`);
|
|
275
275
|
this.quotaRow = quota.appendSelectableRow();
|
|
276
276
|
this.quotaRow.classList.add('quota-usage-row');
|
|
277
|
+
this.quotaRow.setAttribute('jslog', `${VisualLogging.item('storage-usage')}`);
|
|
277
278
|
const learnMoreRow = quota.appendRow();
|
|
278
279
|
const learnMore = Link.create(
|
|
279
280
|
'https://developer.chrome.com/docs/devtools/progressive-web-apps#opaque-responses',
|
|
@@ -286,6 +287,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
286
287
|
this.populatePieChart(0, []);
|
|
287
288
|
const usageBreakdownRow = quota.appendRow();
|
|
288
289
|
usageBreakdownRow.classList.add('usage-breakdown-row');
|
|
290
|
+
usageBreakdownRow.setAttribute('jslog', `${VisualLogging.item('usage-breakdown')}`);
|
|
289
291
|
usageBreakdownRow.appendChild(this.pieChart);
|
|
290
292
|
|
|
291
293
|
this.previousOverrideFieldValue = '';
|
|
@@ -22,7 +22,6 @@ import {Directives, html, render} from '../../../ui/lit/lit.js';
|
|
|
22
22
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
23
23
|
|
|
24
24
|
import * as PreloadingComponents from './components/components.js';
|
|
25
|
-
import {capitalizedAction, ruleSetTagOrLocationShort} from './components/PreloadingString.js';
|
|
26
25
|
import * as PreloadingHelper from './helper/helper.js';
|
|
27
26
|
import preloadingViewStyles from './preloadingView.css.js';
|
|
28
27
|
import preloadingViewDropDownStyles from './preloadingViewDropDown.css.js';
|
|
@@ -404,7 +403,11 @@ export function applyFilterText(filterText: string, rows: PreloadingComponents.P
|
|
|
404
403
|
return rows.filter(row => {
|
|
405
404
|
const attempt = row.pipeline.getOriginallyTriggered();
|
|
406
405
|
const url = attempt.key.url.toLowerCase();
|
|
407
|
-
const action =
|
|
406
|
+
const action = PreloadingComponents.PreloadingString
|
|
407
|
+
.capitalizedAction(
|
|
408
|
+
attempt.action,
|
|
409
|
+
)
|
|
410
|
+
.toLowerCase();
|
|
408
411
|
const status = PreloadingUIUtils.status(attempt.status).toLowerCase();
|
|
409
412
|
|
|
410
413
|
// Each term must match (AND logic between terms)
|
|
@@ -845,7 +848,10 @@ class PreloadingRuleSetSelector implements
|
|
|
845
848
|
return i18n.i18n.lockedString('Internal error');
|
|
846
849
|
}
|
|
847
850
|
|
|
848
|
-
return ruleSetTagOrLocationShort(
|
|
851
|
+
return PreloadingComponents.PreloadingString.ruleSetTagOrLocationShort(
|
|
852
|
+
ruleSet,
|
|
853
|
+
pageURL(),
|
|
854
|
+
);
|
|
849
855
|
}
|
|
850
856
|
|
|
851
857
|
subtitleFor(id: Protocol.Preload.RuleSetId|typeof AllRuleSetRootId): string {
|
|
@@ -6,6 +6,7 @@ import * as MismatchedPreloadingGrid from './MismatchedPreloadingGrid.js';
|
|
|
6
6
|
import * as PreloadingDetailsReportView from './PreloadingDetailsReportView.js';
|
|
7
7
|
import * as PreloadingDisabledInfobar from './PreloadingDisabledInfobar.js';
|
|
8
8
|
import * as PreloadingGrid from './PreloadingGrid.js';
|
|
9
|
+
import * as PreloadingString from './PreloadingString.js';
|
|
9
10
|
import * as RuleSetDetailsView from './RuleSetDetailsView.js';
|
|
10
11
|
import * as RuleSetGrid from './RuleSetGrid.js';
|
|
11
12
|
import * as UsedPreloadingView from './UsedPreloadingView.js';
|
|
@@ -15,6 +16,7 @@ export {
|
|
|
15
16
|
PreloadingDetailsReportView,
|
|
16
17
|
PreloadingDisabledInfobar,
|
|
17
18
|
PreloadingGrid,
|
|
19
|
+
PreloadingString,
|
|
18
20
|
RuleSetDetailsView,
|
|
19
21
|
RuleSetGrid,
|
|
20
22
|
UsedPreloadingView,
|
|
@@ -43,17 +43,16 @@ export class ObjectEventListenersSidebarPane extends UI.Widget.VBox implements U
|
|
|
43
43
|
const executionContext = UI.Context.Context.instance().flavor(SDK.RuntimeModel.ExecutionContext);
|
|
44
44
|
if (executionContext) {
|
|
45
45
|
this.#lastRequestedContext = executionContext;
|
|
46
|
-
const result = await executionContext.
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/* awaitPromise */ false);
|
|
46
|
+
const result = await executionContext.evaluateWithSelectedFrameFallback({
|
|
47
|
+
expression: 'self',
|
|
48
|
+
objectGroup: objectGroupName,
|
|
49
|
+
includeCommandLineAPI: false,
|
|
50
|
+
silent: true,
|
|
51
|
+
returnByValue: false,
|
|
52
|
+
generatePreview: false,
|
|
53
|
+
},
|
|
54
|
+
/* userGesture */ false,
|
|
55
|
+
/* awaitPromise */ false);
|
|
57
56
|
if (!('error' in result) && !result.exceptionDetails) {
|
|
58
57
|
windowObjects.push(result.object);
|
|
59
58
|
}
|
|
@@ -71,7 +71,7 @@ function renderSingleDiffView(singleDiffViewInput: SingleDiffViewInput): Lit.Tem
|
|
|
71
71
|
|
|
72
72
|
// clang-format off
|
|
73
73
|
return html`
|
|
74
|
-
<details open class=${classes}>
|
|
74
|
+
<details open class=${classes} jslog=${VisualLogging.section('diff-view')}>
|
|
75
75
|
<summary>
|
|
76
76
|
<div class="summary-left">
|
|
77
77
|
<devtools-icon class="drop-down-icon" name="arrow-drop-down"></devtools-icon>
|
|
@@ -139,7 +139,7 @@ const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement)
|
|
|
139
139
|
type View = typeof DEFAULT_VIEW;
|
|
140
140
|
|
|
141
141
|
function revealBadgeSettings(): void {
|
|
142
|
-
void Common.Revealer.reveal(Common.Settings.Settings.instance().
|
|
142
|
+
void Common.Revealer.reveal(Common.Settings.Settings.instance().resolve(Badges.receiveGdpBadgesSettingDescriptor));
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
export class BadgeNotification extends UI.Widget.Widget {
|
|
@@ -200,14 +200,19 @@ export class ExtensionSidebarPane extends UI.View.SimpleView {
|
|
|
200
200
|
callback('operation cancelled');
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
|
-
objectPropertiesView.
|
|
204
|
-
const section = new ObjectUI.ObjectPropertiesSection.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
203
|
+
objectPropertiesView.detachChildWidgets();
|
|
204
|
+
const section = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSectionWidget();
|
|
205
|
+
section.objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(object, {
|
|
206
|
+
readOnly: true,
|
|
207
|
+
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
208
|
+
});
|
|
209
|
+
section.objectTree.expanded = true;
|
|
210
|
+
if (title) {
|
|
211
|
+
const span = document.createElement('span');
|
|
212
|
+
span.textContent = title;
|
|
213
|
+
section.title = span;
|
|
208
214
|
}
|
|
209
|
-
section.
|
|
210
|
-
objectPropertiesView.element.appendChild(section.element);
|
|
215
|
+
section.show(objectPropertiesView.element);
|
|
211
216
|
callback();
|
|
212
217
|
}
|
|
213
218
|
}
|
|
@@ -1349,15 +1349,76 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1349
1349
|
return this.status.E_BADARG(
|
|
1350
1350
|
'command', `expected ${Extensions.ExtensionAPI.PrivateAPI.Commands.ForwardKeyboardEvent}`);
|
|
1351
1351
|
}
|
|
1352
|
-
message.entries
|
|
1352
|
+
if (!Array.isArray(message.entries)) {
|
|
1353
|
+
return this.status.E_BADARG('entries', 'expected array');
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
const globalShortcutKeys = new Set(UI.ShortcutRegistry.ShortcutRegistry.instance().globalShortcutKeys());
|
|
1357
|
+
const validEvents: Array<{event: KeyboardEvent, keyCode: number}> = [];
|
|
1358
|
+
|
|
1359
|
+
for (const entry of message.entries) {
|
|
1360
|
+
if (!entry || typeof entry !== 'object') {
|
|
1361
|
+
return this.status.E_BADARG('entries', 'expected object');
|
|
1362
|
+
}
|
|
1363
|
+
if (entry.eventType !== 'keydown') {
|
|
1364
|
+
return this.status.E_BADARG('eventType', 'expected "keydown"');
|
|
1365
|
+
}
|
|
1366
|
+
if (typeof entry.key !== 'string') {
|
|
1367
|
+
return this.status.E_BADARGTYPE('key', typeof entry.key, 'string');
|
|
1368
|
+
}
|
|
1369
|
+
if (typeof entry.code !== 'string') {
|
|
1370
|
+
return this.status.E_BADARGTYPE('code', typeof entry.code, 'string');
|
|
1371
|
+
}
|
|
1372
|
+
if (typeof entry.keyCode !== 'number' || !Number.isFinite(entry.keyCode)) {
|
|
1373
|
+
return this.status.E_BADARGTYPE('keyCode', typeof entry.keyCode, 'number');
|
|
1374
|
+
}
|
|
1375
|
+
if (typeof entry.location !== 'number' || !Number.isFinite(entry.location)) {
|
|
1376
|
+
return this.status.E_BADARGTYPE('location', typeof entry.location, 'number');
|
|
1377
|
+
}
|
|
1378
|
+
if (typeof entry.ctrlKey !== 'boolean') {
|
|
1379
|
+
return this.status.E_BADARGTYPE('ctrlKey', typeof entry.ctrlKey, 'boolean');
|
|
1380
|
+
}
|
|
1381
|
+
if (typeof entry.altKey !== 'boolean') {
|
|
1382
|
+
return this.status.E_BADARGTYPE('altKey', typeof entry.altKey, 'boolean');
|
|
1383
|
+
}
|
|
1384
|
+
if (typeof entry.shiftKey !== 'boolean') {
|
|
1385
|
+
return this.status.E_BADARGTYPE('shiftKey', typeof entry.shiftKey, 'boolean');
|
|
1386
|
+
}
|
|
1387
|
+
if (typeof entry.metaKey !== 'boolean') {
|
|
1388
|
+
return this.status.E_BADARGTYPE('metaKey', typeof entry.metaKey, 'boolean');
|
|
1389
|
+
}
|
|
1390
|
+
|
|
1391
|
+
let keyCode = entry.keyCode;
|
|
1392
|
+
if (!keyCode && entry.key === Platform.KeyboardUtilities.ESCAPE_KEY) {
|
|
1393
|
+
keyCode = 27;
|
|
1394
|
+
}
|
|
1395
|
+
if (!Number.isInteger(keyCode) || keyCode < 0 || keyCode > 255) {
|
|
1396
|
+
return this.status.E_BADARG('keyCode', 'invalid keyCode');
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
let modifiers = 0;
|
|
1400
|
+
if (entry.shiftKey) {
|
|
1401
|
+
modifiers |= UI.KeyboardShortcut.Modifiers.Shift.value;
|
|
1402
|
+
}
|
|
1403
|
+
if (entry.ctrlKey) {
|
|
1404
|
+
modifiers |= UI.KeyboardShortcut.Modifiers.Ctrl.value;
|
|
1405
|
+
}
|
|
1406
|
+
if (entry.altKey) {
|
|
1407
|
+
modifiers |= UI.KeyboardShortcut.Modifiers.Alt.value;
|
|
1408
|
+
}
|
|
1409
|
+
if (entry.metaKey) {
|
|
1410
|
+
modifiers |= UI.KeyboardShortcut.Modifiers.Meta.value;
|
|
1411
|
+
}
|
|
1412
|
+
|
|
1413
|
+
const keyCombination = (keyCode & 255) | (modifiers << 8);
|
|
1414
|
+
if (!globalShortcutKeys.has(keyCombination)) {
|
|
1415
|
+
return this.status.E_BADARG('entries', 'unexpected shortcut key');
|
|
1416
|
+
}
|
|
1353
1417
|
|
|
1354
|
-
function handleEventEntry(entry: KeyboardEventInit&{eventType: string}): void {
|
|
1355
|
-
// Fool around closure compiler -- it has its own notion of both KeyboardEvent constructor
|
|
1356
|
-
// and initKeyboardEvent methods and overriding these in externs.js does not have effect.
|
|
1357
1418
|
const event = new window.KeyboardEvent(entry.eventType, {
|
|
1358
1419
|
key: entry.key,
|
|
1359
1420
|
code: entry.code,
|
|
1360
|
-
keyCode
|
|
1421
|
+
keyCode,
|
|
1361
1422
|
location: entry.location,
|
|
1362
1423
|
ctrlKey: entry.ctrlKey,
|
|
1363
1424
|
altKey: entry.altKey,
|
|
@@ -1365,24 +1426,23 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1365
1426
|
metaKey: entry.metaKey,
|
|
1366
1427
|
});
|
|
1367
1428
|
|
|
1429
|
+
validEvents.push({event, keyCode});
|
|
1430
|
+
}
|
|
1431
|
+
|
|
1432
|
+
for (const {event, keyCode} of validEvents) {
|
|
1368
1433
|
// @ts-expect-error
|
|
1369
|
-
event.__keyCode =
|
|
1434
|
+
event.__keyCode = keyCode;
|
|
1370
1435
|
document.dispatchEvent(event);
|
|
1371
1436
|
}
|
|
1372
1437
|
|
|
1373
|
-
function keyCodeForEntry(entry: KeyboardEventInit): unknown {
|
|
1374
|
-
let keyCode = entry.keyCode;
|
|
1375
|
-
if (!keyCode) {
|
|
1376
|
-
// This is required only for synthetic events (e.g. dispatched in tests).
|
|
1377
|
-
if (entry.key === Platform.KeyboardUtilities.ESCAPE_KEY) {
|
|
1378
|
-
keyCode = 27;
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
return keyCode || 0;
|
|
1382
|
-
}
|
|
1383
1438
|
return undefined;
|
|
1384
1439
|
}
|
|
1385
1440
|
|
|
1441
|
+
onForwardKeyboardEventForTest(message: Extensions.ExtensionAPI.PrivateAPI.ExtensionServerRequestMessage): Record
|
|
1442
|
+
|undefined {
|
|
1443
|
+
return this.onForwardKeyboardEvent(message);
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1386
1446
|
private dispatchCallback(requestId: unknown, port: MessagePort, result: unknown): void {
|
|
1387
1447
|
if (requestId) {
|
|
1388
1448
|
port.postMessage({command: 'callback', requestId, result});
|
|
@@ -1735,16 +1795,15 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
1735
1795
|
}
|
|
1736
1796
|
|
|
1737
1797
|
void context
|
|
1738
|
-
.evaluate(
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
/* userGesture */ false, /* awaitPromise */ false)
|
|
1798
|
+
.evaluate({
|
|
1799
|
+
expression,
|
|
1800
|
+
objectGroup: 'extension',
|
|
1801
|
+
includeCommandLineAPI: exposeCommandLineAPI,
|
|
1802
|
+
silent: true,
|
|
1803
|
+
returnByValue,
|
|
1804
|
+
generatePreview: false,
|
|
1805
|
+
},
|
|
1806
|
+
/* userGesture */ false, /* awaitPromise */ false)
|
|
1748
1807
|
.then(onEvaluate);
|
|
1749
1808
|
|
|
1750
1809
|
function onEvaluate(result: SDK.RuntimeModel.EvaluationResult): void {
|
|
@@ -222,7 +222,7 @@ export class GdpSignUpDialog extends UI.Widget.VBox {
|
|
|
222
222
|
this.#keepMeUpdated ? Host.GdpClient.EmailPreference.ENABLED : Host.GdpClient.EmailPreference.DISABLED;
|
|
223
223
|
const result = await Host.GdpClient.GdpClient.instance().createProfile({user, emailPreference});
|
|
224
224
|
if (result) {
|
|
225
|
-
Common.Settings.Settings.instance().
|
|
225
|
+
Common.Settings.Settings.instance().resolve(Badges.receiveGdpBadgesSettingDescriptor).set(true);
|
|
226
226
|
await Badges.UserBadges.instance().initialize();
|
|
227
227
|
Badges.UserBadges.instance().recordAction(Badges.BadgeAction.GDP_SIGN_UP_COMPLETE);
|
|
228
228
|
this.#onSuccess?.();
|
|
@@ -481,7 +481,8 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
481
481
|
toolbar.appendToolbarItem(this.filterStatusText);
|
|
482
482
|
toolbar.appendToolbarItem(this.showSettingsPaneButton);
|
|
483
483
|
|
|
484
|
-
const monitoringXHREnabledSetting =
|
|
484
|
+
const monitoringXHREnabledSetting =
|
|
485
|
+
Common.Settings.Settings.instance().resolve(SDK.SDKSettings.monitoringXHREnabledSettingDescriptor);
|
|
485
486
|
this.timestampsSetting = Common.Settings.Settings.instance().moduleSetting('console-timestamps-enabled');
|
|
486
487
|
this.consoleHistoryAutocompleteSetting =
|
|
487
488
|
Common.Settings.Settings.instance().moduleSetting('console-history-autocomplete');
|
|
@@ -895,8 +895,9 @@ export class ConsoleViewMessage implements ConsoleViewportElement {
|
|
|
895
895
|
if (obj.preview) {
|
|
896
896
|
titleElement.classList.add('console-object-preview');
|
|
897
897
|
|
|
898
|
-
render(this.previewFormatter.renderObjectPreview(obj.preview, includeNullOrUndefined)
|
|
899
|
-
|
|
898
|
+
render(html`${this.previewFormatter.renderObjectPreview(obj.preview, includeNullOrUndefined)}${
|
|
899
|
+
ObjectUI.ObjectPropertiesSection.getMemoryIcon(obj)}`,
|
|
900
|
+
titleElement);
|
|
900
901
|
}
|
|
901
902
|
};
|
|
902
903
|
|
|
@@ -23,6 +23,10 @@ const UIStrings = {
|
|
|
23
23
|
* @description Title of a setting under the Console category in Settings.
|
|
24
24
|
*/
|
|
25
25
|
customFormatters: 'Custom formatters',
|
|
26
|
+
/**
|
|
27
|
+
* @description Title of a setting under the Console category in Settings.
|
|
28
|
+
*/
|
|
29
|
+
logXmlhttprequests: 'Log XMLHttpRequests',
|
|
26
30
|
/**
|
|
27
31
|
* @description Title of the Console tool.
|
|
28
32
|
*/
|
|
@@ -479,6 +483,11 @@ SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.customFormattersSettin
|
|
|
479
483
|
title: i18nLazyString(UIStrings.customFormatters),
|
|
480
484
|
});
|
|
481
485
|
|
|
486
|
+
SettingsUI.SettingUIRegistration.register(SDK.SDKSettings.monitoringXHREnabledSettingDescriptor, {
|
|
487
|
+
category: Common.Settings.SettingCategory.CONSOLE,
|
|
488
|
+
title: i18nLazyString(UIStrings.logXmlhttprequests),
|
|
489
|
+
});
|
|
490
|
+
|
|
482
491
|
Common.Revealer.registerRevealer({
|
|
483
492
|
contextTypes() {
|
|
484
493
|
return [
|
|
@@ -299,26 +299,31 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
299
299
|
<!-- Dupe the styles into the main container because of the shadow root will prevent outer styles. -->
|
|
300
300
|
<style>${cssOverviewCompletedViewStyles}</style>
|
|
301
301
|
<div class="results-section horizontally-padded summary"
|
|
302
|
+
jslog=${VisualLogging.section('summary')}
|
|
302
303
|
${ref(e => { output.revealSection.set('summary', revealSection.bind(null, e));})}>
|
|
303
304
|
<h1>${i18nString(UIStrings.overviewSummary)}</h1>
|
|
304
305
|
${renderSummary(input.elementCount, input.globalStyleStats, input.mediaQueries)}
|
|
305
306
|
</div>
|
|
306
307
|
<div class="results-section horizontally-padded colors"
|
|
308
|
+
jslog=${VisualLogging.section('colors')}
|
|
307
309
|
${ref(e => { output.revealSection.set('colors', revealSection.bind(null, e));})}>
|
|
308
310
|
<h1>${i18nString(UIStrings.colors)}</h1>
|
|
309
311
|
${renderColors(input.backgroundColors, input.textColors, input.textColorContrastIssues, input.fillColors, input.borderColors)}
|
|
310
312
|
</div>
|
|
311
313
|
<div class="results-section font-info"
|
|
314
|
+
jslog=${VisualLogging.section('font-info')}
|
|
312
315
|
${ref(e => { output.revealSection.set('font-info', revealSection.bind(null, e));})}>
|
|
313
316
|
<h1>${i18nString(UIStrings.fontInfo)}</h1>
|
|
314
317
|
${renderFontInfo(input.fontInfo)}
|
|
315
318
|
</div>
|
|
316
319
|
<div class="results-section unused-declarations"
|
|
320
|
+
jslog=${VisualLogging.section('unused-declarations')}
|
|
317
321
|
${ref(e => { output.revealSection.set('unused-declarations', revealSection.bind(null, e));})}>
|
|
318
322
|
<h1>${i18nString(UIStrings.unusedDeclarations)}</h1>
|
|
319
323
|
${renderUnusedDeclarations(input.unusedDeclarations)}
|
|
320
324
|
</div>
|
|
321
325
|
<div class="results-section media-queries"
|
|
326
|
+
jslog=${VisualLogging.section('media-queries')}
|
|
322
327
|
${ref(e => { output.revealSection.set('media-queries', revealSection.bind(null, e));})}>
|
|
323
328
|
<h1>${i18nString(UIStrings.mediaQueries)}</h1>
|
|
324
329
|
${renderMediaQueries(input.mediaQueries)}
|
|
@@ -355,7 +360,7 @@ function renderSummary(
|
|
|
355
360
|
elementCount: number, globalStyleStats: GlobalStyleStats,
|
|
356
361
|
mediaQueries: Array<{title: string, nodes: Protocol.CSS.CSSMedia[]}>): TemplateResult {
|
|
357
362
|
const renderSummaryItem = (label: string, value: number): TemplateResult => html`
|
|
358
|
-
<li>
|
|
363
|
+
<li jslog=${VisualLogging.item('summary-item')}>
|
|
359
364
|
<div class="label">${label}</div>
|
|
360
365
|
<div class="value">${formatter.format(value)}</div>
|
|
361
366
|
</li>`;
|
|
@@ -440,7 +445,7 @@ function renderGroup(
|
|
|
440
445
|
const width = 100 * nodes.length / total;
|
|
441
446
|
const itemLabel = i18nString(UIStrings.nOccurrences, {n: nodes.length});
|
|
442
447
|
|
|
443
|
-
return html`<li>
|
|
448
|
+
return html`<li jslog=${VisualLogging.item('css-overview.group-item')}>
|
|
444
449
|
<div class="title">${title}</div>
|
|
445
450
|
<button data-type=${type} data-path=${path} data-label=${title}
|
|
446
451
|
jslog=${VisualLogging.action().track({click: true}).context(`css-overview.${type}`)}
|
|
@@ -492,7 +497,7 @@ function renderContrastIssue(key: string, issues: ContrastIssue[]): TemplateResu
|
|
|
492
497
|
const border = getBorderString(minContrastIssue.backgroundColor.asLegacyColor());
|
|
493
498
|
|
|
494
499
|
// clang-format off
|
|
495
|
-
return html`<li>
|
|
500
|
+
return html`<li jslog=${VisualLogging.item('contrast-issue')}>
|
|
496
501
|
<button
|
|
497
502
|
title=${title} aria-label=${title}
|
|
498
503
|
data-type="contrast" data-key=${key} data-section="contrast" class="block"
|
|
@@ -525,7 +530,7 @@ function renderColor(section: string, color: string): LitTemplate {
|
|
|
525
530
|
return nothing;
|
|
526
531
|
}
|
|
527
532
|
// clang-format off
|
|
528
|
-
return html`<li>
|
|
533
|
+
return html`<li jslog=${VisualLogging.item('color-item')}>
|
|
529
534
|
<button title=${color} data-type="color" data-color=${color}
|
|
530
535
|
data-section=${section} class="block"
|
|
531
536
|
style=${styleMap({backgroundColor: color, border: getBorderString(borderColor)})}
|
|
@@ -22,41 +22,41 @@ import {
|
|
|
22
22
|
|
|
23
23
|
const UIStrings = {
|
|
24
24
|
/**
|
|
25
|
-
* @description The message shown in the
|
|
25
|
+
* @description The message shown in the Styles tab when the user hovers over a property that has no effect due to some other property.
|
|
26
26
|
* @example {flex-wrap: nowrap} REASON_PROPERTY_DECLARATION_CODE
|
|
27
27
|
* @example {align-content} AFFECTED_PROPERTY_DECLARATION_CODE
|
|
28
28
|
*/
|
|
29
29
|
ruleViolatedBySameElementRuleReason:
|
|
30
30
|
'The {REASON_PROPERTY_DECLARATION_CODE} property prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect.',
|
|
31
31
|
/**
|
|
32
|
-
* @description The message shown in the
|
|
32
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect due to some other property.
|
|
33
33
|
* @example {flex-wrap} PROPERTY_NAME
|
|
34
34
|
* @example {nowrap} PROPERTY_VALUE
|
|
35
35
|
*/
|
|
36
36
|
ruleViolatedBySameElementRuleFix: 'Try setting {PROPERTY_NAME} to something other than {PROPERTY_VALUE}.',
|
|
37
37
|
/**
|
|
38
|
-
* @description The message shown in the
|
|
38
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect due to not being a flex or grid container.
|
|
39
39
|
* @example {display: grid} DISPLAY_GRID_RULE
|
|
40
40
|
* @example {display: flex} DISPLAY_FLEX_RULE
|
|
41
41
|
*/
|
|
42
42
|
ruleViolatedBySameElementRuleChangeFlexOrGrid:
|
|
43
43
|
'Try adding {DISPLAY_GRID_RULE} or {DISPLAY_FLEX_RULE} to make this element into a container.',
|
|
44
44
|
/**
|
|
45
|
-
* @description The message shown in the
|
|
45
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect due to the current property value.
|
|
46
46
|
* @example {display: block} EXISTING_PROPERTY_DECLARATION
|
|
47
47
|
* @example {display: flex} TARGET_PROPERTY_DECLARATION
|
|
48
48
|
*/
|
|
49
49
|
ruleViolatedBySameElementRuleChangeSuggestion:
|
|
50
50
|
'Try setting the {EXISTING_PROPERTY_DECLARATION} property to {TARGET_PROPERTY_DECLARATION}.',
|
|
51
51
|
/**
|
|
52
|
-
* @description The message shown in the
|
|
52
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect due to properties of the parent element.
|
|
53
53
|
* @example {display: block} REASON_PROPERTY_DECLARATION_CODE
|
|
54
54
|
* @example {flex} AFFECTED_PROPERTY_DECLARATION_CODE
|
|
55
55
|
*/
|
|
56
56
|
ruleViolatedByParentElementRuleReason:
|
|
57
57
|
'The {REASON_PROPERTY_DECLARATION_CODE} property on the parent element prevents {AFFECTED_PROPERTY_DECLARATION_CODE} from having an effect.',
|
|
58
58
|
/**
|
|
59
|
-
* @description The message shown in the
|
|
59
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect due to the properties of the parent element.
|
|
60
60
|
* @example {display: block} EXISTING_PARENT_ELEMENT_RULE
|
|
61
61
|
* @example {display: flex} TARGET_PARENT_ELEMENT_RULE
|
|
62
62
|
*/
|
|
@@ -64,7 +64,7 @@ const UIStrings = {
|
|
|
64
64
|
'Try setting the {EXISTING_PARENT_ELEMENT_RULE} property on the parent to {TARGET_PARENT_ELEMENT_RULE}.',
|
|
65
65
|
|
|
66
66
|
/**
|
|
67
|
-
* @description The warning text shown in Elements panel when font-variation-settings don't match allowed values
|
|
67
|
+
* @description The warning text shown in the Elements panel when font-variation-settings don't match allowed values.
|
|
68
68
|
* @example {wdth} PH1
|
|
69
69
|
* @example {100} PH2
|
|
70
70
|
* @example {10} PH3
|
|
@@ -74,31 +74,31 @@ const UIStrings = {
|
|
|
74
74
|
fontVariationSettingsWarning:
|
|
75
75
|
'Value for setting "{PH1}" {PH2} is outside the supported range [{PH3}, {PH4}] for font-family "{PH5}".',
|
|
76
76
|
/**
|
|
77
|
-
* @description The message shown in the
|
|
77
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect on flex or grid child items.
|
|
78
78
|
* @example {flex} CONTAINER_DISPLAY_NAME
|
|
79
79
|
* @example {align-contents} PROPERTY_NAME
|
|
80
80
|
*/
|
|
81
81
|
flexGridContainerPropertyRuleReason:
|
|
82
82
|
'This element is a {CONTAINER_DISPLAY_NAME} item, i.e. a child of a {CONTAINER_DISPLAY_NAME} container, but {PROPERTY_NAME} only applies to containers.',
|
|
83
83
|
/**
|
|
84
|
-
* @description The message shown in the
|
|
84
|
+
* @description The message shown in the Styles tab when the user hovers over a property declaration that has no effect on flex or grid child items.
|
|
85
85
|
* @example {align-contents} PROPERTY_NAME
|
|
86
86
|
* @example {align-self} ALTERNATIVE_PROPERTY_NAME
|
|
87
87
|
*/
|
|
88
88
|
flexGridContainerPropertyRuleFix:
|
|
89
89
|
'Try setting the {PROPERTY_NAME} on the container element or use {ALTERNATIVE_PROPERTY_NAME} instead.',
|
|
90
90
|
/**
|
|
91
|
-
* @description The
|
|
91
|
+
* @description The message shown in the Styles tab when the user hovers over a position-anchor declaration that has no effect on a non-anchor-positioned element.
|
|
92
92
|
* @example {relative} POSITION
|
|
93
93
|
*/
|
|
94
94
|
invalidAnchorPositioning:
|
|
95
95
|
'An anchor was defined but the element was not anchor-positioned but positioned "{POSITION}".',
|
|
96
96
|
/**
|
|
97
|
-
* @description The
|
|
97
|
+
* @description The message shown in the Styles tab when the user hovers over a position-anchor declaration that has no effect on a non-anchor-positioned element.
|
|
98
98
|
*/
|
|
99
99
|
invalidAnchorPositioningFix: 'Set position to either "fixed" or "absolute".',
|
|
100
100
|
/**
|
|
101
|
-
* @description The
|
|
101
|
+
* @description The message shown in the Styles tab when the user hovers over a position-anchor declaration that has no effect on a hidden element.
|
|
102
102
|
*/
|
|
103
103
|
unusedAnchorPositioning: 'An anchor was defined but the element is hidden.',
|
|
104
104
|
} as const;
|
|
@@ -7,7 +7,7 @@ import type * as Protocol from '../../generated/protocol.js';
|
|
|
7
7
|
|
|
8
8
|
const UIStrings = {
|
|
9
9
|
/**
|
|
10
|
-
* @description Summary line in a tooltip explaining
|
|
10
|
+
* @description Summary line in a tooltip explaining CSS selector specificity.
|
|
11
11
|
* @example {1} PH1
|
|
12
12
|
* @example {2} PH2
|
|
13
13
|
* @example {3} PH3
|
|
@@ -15,25 +15,25 @@ import {ElementsPanel} from './ElementsPanel.js';
|
|
|
15
15
|
|
|
16
16
|
const UIStrings = {
|
|
17
17
|
/**
|
|
18
|
-
* @description Prompt text for a text field in the
|
|
18
|
+
* @description Prompt text for a text field to add CSS classes to the selected element in the Styles tab of the Elements panel.
|
|
19
19
|
* Class refers to a CSS class.
|
|
20
20
|
*/
|
|
21
21
|
addNewClass: 'Add new class',
|
|
22
22
|
/**
|
|
23
|
-
* @description Screen reader announcement string when adding
|
|
23
|
+
* @description Screen reader announcement string when adding CSS classes to the selected element in the Styles tab of the Elements panel.
|
|
24
24
|
* @example {vbox flex-auto} PH1
|
|
25
25
|
*/
|
|
26
26
|
classesSAdded: 'Classes {PH1} added',
|
|
27
27
|
/**
|
|
28
|
-
* @description Screen reader announcement string when adding a class
|
|
28
|
+
* @description Screen reader announcement string when adding a CSS class to the selected element in the Styles tab of the Elements panel.
|
|
29
29
|
* @example {title-container} PH1
|
|
30
30
|
*/
|
|
31
31
|
classSAdded: 'Class {PH1} added',
|
|
32
32
|
/**
|
|
33
|
-
* @description Accessible title read by screen readers for the
|
|
34
|
-
* panel. Element is
|
|
33
|
+
* @description Accessible title read by screen readers for the element classes widget in the Styles tab of the Elements
|
|
34
|
+
* panel. Element is an HTML DOM element and classes refers to CSS classes.
|
|
35
35
|
*/
|
|
36
|
-
elementClasses: 'Element
|
|
36
|
+
elementClasses: 'Element classes',
|
|
37
37
|
} as const;
|
|
38
38
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/ClassesPaneWidget.ts', UIStrings);
|
|
39
39
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -20,7 +20,7 @@ const UIStrings = {
|
|
|
20
20
|
*/
|
|
21
21
|
openCubicBezierEditor: 'Open cubic bezier editor',
|
|
22
22
|
/**
|
|
23
|
-
* @description Tooltip text for an icon that opens shadow editor. The shadow editor is a tool
|
|
23
|
+
* @description Tooltip text for an icon that opens the shadow editor. The shadow editor is a tool
|
|
24
24
|
* which allows the user to edit CSS shadow properties.
|
|
25
25
|
*/
|
|
26
26
|
openShadowEditor: 'Open shadow editor',
|
|
@@ -58,17 +58,16 @@ const {bindToSetting} = UI.UIUtils;
|
|
|
58
58
|
const UIStrings = {
|
|
59
59
|
/**
|
|
60
60
|
* @description Text for a checkbox setting that controls whether the user-supplied filter text
|
|
61
|
-
* excludes all CSS
|
|
62
|
-
*
|
|
61
|
+
* excludes all CSS properties which are filtered out, or just grays them out. In the Computed styles
|
|
62
|
+
* tab of the Elements panel.
|
|
63
63
|
*/
|
|
64
64
|
showAll: 'Show all',
|
|
65
65
|
/**
|
|
66
66
|
* @description Text for a checkbox setting that controls whether similar CSS properties should be
|
|
67
|
-
* grouped together or not. In Computed
|
|
67
|
+
* grouped together or not. In the Computed styles tab of the Elements panel.
|
|
68
68
|
*/
|
|
69
69
|
group: 'Group',
|
|
70
70
|
/**
|
|
71
|
-
* [
|
|
72
71
|
* @description Text shown to the user when a filter is applied to the computed CSS properties, but
|
|
73
72
|
* no properties matched the filter and thus no results were returned.
|
|
74
73
|
*/
|
|
@@ -88,7 +87,7 @@ const UIStrings = {
|
|
|
88
87
|
* @example {example} PH1
|
|
89
88
|
* @example {5} PH2
|
|
90
89
|
*/
|
|
91
|
-
filterUpdateAriaText:
|
|
90
|
+
filterUpdateAriaText: 'Filter applied: {PH1}. Total results: {PH2}',
|
|
92
91
|
} as const;
|
|
93
92
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/ComputedStyleWidget.ts', UIStrings);
|
|
94
93
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -440,7 +440,6 @@ export async function populateNodeContextMenu(contextMenu: UI.ContextMenu.Contex
|
|
|
440
440
|
export async function showContextMenu(
|
|
441
441
|
treeElement: ElementsTreeElement,
|
|
442
442
|
event: Event,
|
|
443
|
-
onSaveNodeToTempVariable?: (node: SDK.DOMModel.DOMNode) => void,
|
|
444
443
|
): Promise<UI.ContextMenu.ContextMenu|undefined> {
|
|
445
444
|
if (UI.UIUtils.isEditing()) {
|
|
446
445
|
return;
|
|
@@ -472,11 +471,9 @@ export async function showContextMenu(
|
|
|
472
471
|
textNode = null;
|
|
473
472
|
}
|
|
474
473
|
const commentNode = (node as Element).enclosingNodeOrSelfWithClass?.('webkit-html-comment');
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
{jslogContext: 'store-as-global-variable'});
|
|
479
|
-
}
|
|
474
|
+
contextMenu.saveSection().appendItem(i18nString(UIStrings.storeAsGlobalVariable),
|
|
475
|
+
() => void domNode.saveNodeToTempVariable(),
|
|
476
|
+
{jslogContext: 'store-as-global-variable'});
|
|
480
477
|
if (textNode) {
|
|
481
478
|
if (!treeElement.isEditing) {
|
|
482
479
|
contextMenu.editSection().appendItem(i18nString(UIStrings.editText),
|