chrome-devtools-frontend 1.0.920568 → 1.0.922044
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/config/gni/all_devtools_files.gni +1 -1
- package/config/gni/devtools_grd_files.gni +5 -0
- package/config/typescript/tsconfig.base.json +1 -0
- package/extension-api/ExtensionAPI.d.ts +1 -1
- package/front_end/core/common/ColorUtils.ts +2 -1
- package/front_end/core/common/Object.ts +36 -1
- package/front_end/core/common/WasmDisassembly.ts +6 -14
- package/front_end/core/common/common.ts +2 -1
- package/front_end/core/i18n/locales/af.json +53 -32
- package/front_end/core/i18n/locales/am.json +56 -35
- package/front_end/core/i18n/locales/ar.json +53 -32
- package/front_end/core/i18n/locales/as.json +63 -42
- package/front_end/core/i18n/locales/az.json +53 -32
- package/front_end/core/i18n/locales/be.json +52 -31
- package/front_end/core/i18n/locales/bg.json +51 -30
- package/front_end/core/i18n/locales/bn.json +63 -42
- package/front_end/core/i18n/locales/bs.json +57 -36
- package/front_end/core/i18n/locales/ca.json +55 -34
- package/front_end/core/i18n/locales/cs.json +51 -30
- package/front_end/core/i18n/locales/cy.json +63 -42
- package/front_end/core/i18n/locales/da.json +55 -34
- package/front_end/core/i18n/locales/de.json +52 -31
- package/front_end/core/i18n/locales/el.json +58 -37
- package/front_end/core/i18n/locales/en-GB.json +51 -30
- package/front_end/core/i18n/locales/en-US.json +67 -34
- package/front_end/core/i18n/locales/en-XL.json +67 -34
- package/front_end/core/i18n/locales/es-419.json +53 -32
- package/front_end/core/i18n/locales/es.json +52 -31
- package/front_end/core/i18n/locales/et.json +54 -33
- package/front_end/core/i18n/locales/eu.json +71 -50
- package/front_end/core/i18n/locales/fa.json +54 -33
- package/front_end/core/i18n/locales/fi.json +55 -34
- package/front_end/core/i18n/locales/fil.json +59 -38
- package/front_end/core/i18n/locales/fr-CA.json +52 -31
- package/front_end/core/i18n/locales/fr.json +54 -33
- package/front_end/core/i18n/locales/gl.json +57 -36
- package/front_end/core/i18n/locales/gu.json +65 -44
- package/front_end/core/i18n/locales/he.json +56 -35
- package/front_end/core/i18n/locales/hi.json +61 -40
- package/front_end/core/i18n/locales/hr.json +55 -34
- package/front_end/core/i18n/locales/hu.json +53 -32
- package/front_end/core/i18n/locales/hy.json +54 -33
- package/front_end/core/i18n/locales/id.json +59 -38
- package/front_end/core/i18n/locales/is.json +51 -30
- package/front_end/core/i18n/locales/it.json +51 -30
- package/front_end/core/i18n/locales/ja.json +52 -31
- package/front_end/core/i18n/locales/ka.json +51 -30
- package/front_end/core/i18n/locales/kk.json +56 -35
- package/front_end/core/i18n/locales/km.json +59 -38
- package/front_end/core/i18n/locales/kn.json +63 -42
- package/front_end/core/i18n/locales/ko.json +59 -38
- package/front_end/core/i18n/locales/ky.json +54 -33
- package/front_end/core/i18n/locales/lo.json +59 -38
- package/front_end/core/i18n/locales/lt.json +52 -31
- package/front_end/core/i18n/locales/lv.json +60 -39
- package/front_end/core/i18n/locales/mk.json +51 -30
- package/front_end/core/i18n/locales/ml.json +65 -44
- package/front_end/core/i18n/locales/mn.json +59 -38
- package/front_end/core/i18n/locales/mr.json +61 -40
- package/front_end/core/i18n/locales/ms.json +59 -38
- package/front_end/core/i18n/locales/my.json +59 -38
- package/front_end/core/i18n/locales/ne.json +63 -42
- package/front_end/core/i18n/locales/nl.json +55 -34
- package/front_end/core/i18n/locales/no.json +54 -33
- package/front_end/core/i18n/locales/or.json +63 -42
- package/front_end/core/i18n/locales/pa.json +61 -40
- package/front_end/core/i18n/locales/pl.json +51 -30
- package/front_end/core/i18n/locales/pt-PT.json +52 -31
- package/front_end/core/i18n/locales/pt.json +59 -38
- package/front_end/core/i18n/locales/ro.json +52 -31
- package/front_end/core/i18n/locales/ru.json +52 -31
- package/front_end/core/i18n/locales/si.json +59 -38
- package/front_end/core/i18n/locales/sk.json +52 -31
- package/front_end/core/i18n/locales/sl.json +52 -31
- package/front_end/core/i18n/locales/sq.json +51 -30
- package/front_end/core/i18n/locales/sr-Latn.json +52 -31
- package/front_end/core/i18n/locales/sr.json +52 -31
- package/front_end/core/i18n/locales/sv.json +52 -31
- package/front_end/core/i18n/locales/sw.json +60 -39
- package/front_end/core/i18n/locales/ta.json +67 -46
- package/front_end/core/i18n/locales/te.json +62 -41
- package/front_end/core/i18n/locales/th.json +52 -31
- package/front_end/core/i18n/locales/tr.json +55 -34
- package/front_end/core/i18n/locales/uk.json +55 -34
- package/front_end/core/i18n/locales/ur.json +60 -39
- package/front_end/core/i18n/locales/uz.json +52 -31
- package/front_end/core/i18n/locales/vi.json +54 -33
- package/front_end/core/i18n/locales/zh-HK.json +52 -31
- package/front_end/core/i18n/locales/zh-TW.json +57 -36
- package/front_end/core/i18n/locales/zh.json +56 -35
- package/front_end/core/i18n/locales/zu.json +59 -38
- package/front_end/core/sdk/RemoteObject.ts +43 -20
- package/front_end/core/sdk/TracingModel.ts +1 -1
- package/front_end/generated/SupportedCSSProperties.js +4 -4
- package/front_end/legacy/legacy-defs.d.ts +24 -0
- package/front_end/models/extensions/ExtensionAPI.ts +9 -4
- package/front_end/models/extensions/ExtensionServer.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +4 -1
- package/front_end/models/issues_manager/SameSiteCookieIssue.ts +12 -3
- package/front_end/models/issues_manager/descriptions/SameSiteSamePartyCrossPartyContextSet.md +10 -0
- package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md +4 -0
- package/front_end/models/timeline_model/TimelineModel.ts +5 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +2 -2
- package/front_end/panels/application/DatabaseQueryView.ts +7 -1
- package/front_end/panels/changes/ChangesSidebar.ts +6 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +8 -1
- package/front_end/panels/elements/ElementsPanel.ts +25 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -2
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +13 -1
- package/front_end/panels/elements/layoutPane.css +1 -0
- package/front_end/panels/emulation/AdvancedApp.ts +2 -12
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +14 -1
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +10 -0
- package/front_end/panels/issues/IssueAggregator.ts +2 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +7 -1
- package/front_end/panels/layer_viewer/Layers3DView.ts +7 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +7 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +6 -7
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +8 -4
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -0
- package/front_end/panels/network/NetworkItemView.ts +24 -4
- package/front_end/panels/network/NetworkLogView.ts +14 -5
- package/front_end/panels/network/NetworkPanel.ts +7 -6
- package/front_end/panels/network/RequestHeadersView.ts +0 -345
- package/front_end/panels/network/RequestPayloadView.ts +529 -0
- package/front_end/panels/network/RequestTimingView.ts +3 -1
- package/front_end/panels/network/forward/UIRequestLocation.ts +1 -0
- package/front_end/panels/network/module.json +0 -3
- package/front_end/panels/network/network-legacy.ts +5 -0
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/network/requestPayloadTree.css +130 -0
- package/front_end/panels/network/requestPayloadView.css +16 -0
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +3 -3
- package/front_end/panels/profiler/ProfileLauncherView.ts +6 -1
- package/front_end/panels/profiler/ProfileView.ts +1 -1
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +5 -5
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +5 -6
- package/front_end/panels/sources/SourcesPanel.ts +4 -5
- package/front_end/panels/sources/SourcesView.ts +16 -3
- package/front_end/panels/sources/UISourceCodeFrame.ts +7 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -7
- package/front_end/panels/timeline/TimelineFlameChartView.ts +4 -4
- package/front_end/panels/timeline/TimelineLayersView.ts +7 -7
- package/front_end/panels/timeline/TimelinePanel.ts +5 -4
- package/front_end/ui/legacy/ARIAUtils.ts +12 -0
- package/front_end/ui/legacy/Fragment.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +17 -0
- package/front_end/ui/legacy/SplitWidget.ts +6 -1
- package/front_end/ui/legacy/TabbedPane.ts +4 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +5 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +16 -66
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +9 -1
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +11 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +6 -3
- package/front_end/ui/legacy/utils/focus-changed.ts +1 -1
- package/inspector_overlay/common.ts +3 -3
- package/inspector_overlay/tool_viewport_size.ts +1 -1
- package/package.json +1 -1
|
@@ -149,7 +149,7 @@ export namespace PrivateAPI {
|
|
|
149
149
|
evaluateOptions?: EvaluateOptions,
|
|
150
150
|
};
|
|
151
151
|
type SetSidebarPageRequest = {command: Commands.SetSidebarPage, id: string, page: string};
|
|
152
|
-
type OpenResourceRequest = {command: Commands.OpenResource, url: string, lineNumber: number};
|
|
152
|
+
type OpenResourceRequest = {command: Commands.OpenResource, url: string, lineNumber: number, columnNumber: number};
|
|
153
153
|
type SetOpenResourceHandlerRequest = {command: Commands.SetOpenResourceHandler, handlerPresent: boolean};
|
|
154
154
|
type ReloadRequest = {
|
|
155
155
|
command: Commands.Reload,
|
|
@@ -545,7 +545,7 @@ self.injectedExtensionAPI = function(
|
|
|
545
545
|
const id = 'extension-panel-' + extensionServer.nextObjectId();
|
|
546
546
|
extensionServer.sendRequest(
|
|
547
547
|
{command: PrivateAPI.Commands.CreatePanel, id, title, page},
|
|
548
|
-
callback && callback.
|
|
548
|
+
callback && ((): unknown => callback.call(this, new (Constructor(ExtensionPanel))(id))));
|
|
549
549
|
},
|
|
550
550
|
|
|
551
551
|
setOpenResourceHandler: function(
|
|
@@ -576,8 +576,13 @@ self.injectedExtensionAPI = function(
|
|
|
576
576
|
}
|
|
577
577
|
},
|
|
578
578
|
|
|
579
|
-
openResource: function(
|
|
580
|
-
|
|
579
|
+
openResource: function(
|
|
580
|
+
url: string, lineNumber: number, columnNumber?: number, _callback?: (response: unknown) => unknown): void {
|
|
581
|
+
const callbackArg = extractCallbackArgument(arguments);
|
|
582
|
+
// Handle older API:
|
|
583
|
+
const columnNumberArg = typeof columnNumber === 'number' ? columnNumber : 0;
|
|
584
|
+
extensionServer.sendRequest(
|
|
585
|
+
{command: PrivateAPI.Commands.OpenResource, url, lineNumber, columnNumber: columnNumberArg}, callbackArg);
|
|
581
586
|
},
|
|
582
587
|
|
|
583
588
|
get SearchAction(): {[key: string]: string} {
|
|
@@ -493,7 +493,7 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
493
493
|
}
|
|
494
494
|
const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(message.url);
|
|
495
495
|
if (uiSourceCode) {
|
|
496
|
-
Common.Revealer.reveal(uiSourceCode.uiLocation(message.lineNumber,
|
|
496
|
+
Common.Revealer.reveal(uiSourceCode.uiLocation(message.lineNumber, message.columnNumber));
|
|
497
497
|
return this.status.OK();
|
|
498
498
|
}
|
|
499
499
|
|
|
@@ -104,7 +104,10 @@ export class AttributionReportingIssue extends Issue<IssueCode> {
|
|
|
104
104
|
links: [],
|
|
105
105
|
};
|
|
106
106
|
case IssueCode.AttributionEventSourceTriggerDataTooLarge:
|
|
107
|
-
return
|
|
107
|
+
return {
|
|
108
|
+
file: 'arAttributionEventSourceTriggerDataTooLarge.md',
|
|
109
|
+
links: [],
|
|
110
|
+
};
|
|
108
111
|
}
|
|
109
112
|
}
|
|
110
113
|
|
|
@@ -30,9 +30,9 @@ const UIStrings = {
|
|
|
30
30
|
*/
|
|
31
31
|
anInsecure: 'an insecure', // eslint-disable-line rulesdir/l10n_no_unused_message
|
|
32
32
|
/**
|
|
33
|
-
* @description Label for a link for SameParty Issues.
|
|
33
|
+
* @description Label for a link for SameParty Issues. 'Attribute' refers to a cookie attribute.
|
|
34
34
|
*/
|
|
35
|
-
firstPartySetsExplained: '`First-Party Sets`
|
|
35
|
+
firstPartySetsExplained: '`First-Party Sets` and the `SameParty` attribute',
|
|
36
36
|
};
|
|
37
37
|
const str_ = i18n.i18n.registerUIStrings('models/issues_manager/SameSiteCookieIssue.ts', UIStrings);
|
|
38
38
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
|
@@ -418,7 +418,15 @@ function sameSiteExcludeContextDowngradeSet(isSecure: boolean): LazyMarkdownIssu
|
|
|
418
418
|
const sameSiteInvalidSameParty: LazyMarkdownIssueDescription = {
|
|
419
419
|
file: 'SameSiteInvalidSameParty.md',
|
|
420
420
|
links: [{
|
|
421
|
-
link: 'https://developer.chrome.com/
|
|
421
|
+
link: 'https://developer.chrome.com/blog/first-party-sets-sameparty/',
|
|
422
|
+
linkTitle: i18nLazyString(UIStrings.firstPartySetsExplained),
|
|
423
|
+
}],
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
const samePartyCrossPartyContextSet: LazyMarkdownIssueDescription = {
|
|
427
|
+
file: 'SameSiteSamePartyCrossPartyContextSet.md',
|
|
428
|
+
links: [{
|
|
429
|
+
link: 'https://developer.chrome.com/blog/first-party-sets-sameparty/',
|
|
422
430
|
linkTitle: i18nLazyString(UIStrings.firstPartySetsExplained),
|
|
423
431
|
}],
|
|
424
432
|
};
|
|
@@ -451,4 +459,5 @@ const issueDescriptions: Map<string, LazyMarkdownIssueDescription> = new Map([
|
|
|
451
459
|
['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Secure', sameSiteExcludeContextDowngradeSet(true)],
|
|
452
460
|
['SameSiteCookieIssue::ExcludeContextDowngrade::SetCookie::Insecure', sameSiteExcludeContextDowngradeSet(false)],
|
|
453
461
|
['SameSiteCookieIssue::ExcludeInvalidSameParty::SetCookie', sameSiteInvalidSameParty],
|
|
462
|
+
['SameSiteCookieIssue::ExcludeSamePartyCrossPartyContext::SetCookie', samePartyCrossPartyContextSet],
|
|
454
463
|
]);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Make sure a cookie is using the SameParty attribute correctly
|
|
2
|
+
|
|
3
|
+
Setting cross-site cookies with the `SameParty` attribute is only possible if
|
|
4
|
+
both domains are a part of the same First-Party Set.
|
|
5
|
+
|
|
6
|
+
To allow setting cross-site cookies, try one of the following:
|
|
7
|
+
* If the domains satisfy the First-Party Set criteria, add them to the same First-Party Set.
|
|
8
|
+
* If the domains don't satisfy the First-Party Set criteria, remove the `SameParty` attribute and specify `SameSite=None`.
|
|
9
|
+
|
|
10
|
+
If you don't have the option to do any of the above, cookies are not intended to be set in cross-site contexts.
|
package/front_end/models/issues_manager/descriptions/arAttributionEventSourceTriggerDataTooLarge.md
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
# Ensure the event source trigger data doesn't exceed the 1-bit limit
|
|
2
|
+
|
|
3
|
+
The `event-source-trigger-data` query parameter of an attribution redirect was truncated to the lowest 1 bit, because it was exceeding the limit.
|
|
4
|
+
Replace the `event-source-trigger-data` parameter with an integer that respects the 1-bit limit, that is a number between 0 and 1.
|
|
@@ -1075,7 +1075,11 @@ export class TimelineModelImpl {
|
|
|
1075
1075
|
|
|
1076
1076
|
case RecordType.Paint: {
|
|
1077
1077
|
this.invalidationTracker.didPaint = true;
|
|
1078
|
-
|
|
1078
|
+
// With CompositeAfterPaint enabled, paint events are no longer
|
|
1079
|
+
// associated with a Node, and nodeId will not be present.
|
|
1080
|
+
if ('nodeId' in eventData) {
|
|
1081
|
+
timelineData.backendNodeIds.push(eventData['nodeId']);
|
|
1082
|
+
}
|
|
1079
1083
|
// Only keep layer paint events, skip paints for subframes that get painted to the same layer as parent.
|
|
1080
1084
|
if (!eventData['layerId']) {
|
|
1081
1085
|
break;
|
|
@@ -692,8 +692,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
692
692
|
this.panel.showView(view);
|
|
693
693
|
}
|
|
694
694
|
|
|
695
|
-
private async updateDatabaseTables(event: Common.EventTarget.EventTargetEvent): Promise<void> {
|
|
696
|
-
const database =
|
|
695
|
+
private async updateDatabaseTables(event: Common.EventTarget.EventTargetEvent<DatabaseModelDatabase>): Promise<void> {
|
|
696
|
+
const database = event.data;
|
|
697
697
|
|
|
698
698
|
if (!database) {
|
|
699
699
|
return;
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
28
28
|
*/
|
|
29
29
|
|
|
30
|
+
import * as Common from '../../core/common/common.js';
|
|
30
31
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
31
32
|
import * as DataGrid from '../../ui/legacy/components/data_grid/data_grid.js';
|
|
32
33
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -46,7 +47,8 @@ const UIStrings = {
|
|
|
46
47
|
};
|
|
47
48
|
const str_ = i18n.i18n.registerUIStrings('panels/application/DatabaseQueryView.ts', UIStrings);
|
|
48
49
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
49
|
-
export class DatabaseQueryView extends UI.Widget.VBox
|
|
50
|
+
export class DatabaseQueryView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
51
|
+
UI.Widget.VBox) {
|
|
50
52
|
database: Database;
|
|
51
53
|
private queryWrapper: HTMLElement;
|
|
52
54
|
private readonly promptContainer: HTMLElement;
|
|
@@ -316,6 +318,10 @@ export enum Events {
|
|
|
316
318
|
SchemaUpdated = 'SchemaUpdated',
|
|
317
319
|
}
|
|
318
320
|
|
|
321
|
+
export type EventTypes = {
|
|
322
|
+
[Events.SchemaUpdated]: Database,
|
|
323
|
+
};
|
|
324
|
+
|
|
319
325
|
export const SQL_BUILT_INS = [
|
|
320
326
|
'SELECT ',
|
|
321
327
|
'FROM ',
|
|
@@ -22,7 +22,8 @@ const UIStrings = {
|
|
|
22
22
|
const str_ = i18n.i18n.registerUIStrings('panels/changes/ChangesSidebar.ts', UIStrings);
|
|
23
23
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
24
24
|
|
|
25
|
-
export class ChangesSidebar extends UI.Widget.Widget
|
|
25
|
+
export class ChangesSidebar extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
|
26
|
+
UI.Widget.Widget) {
|
|
26
27
|
private treeoutline: UI.TreeOutline.TreeOutlineInShadow;
|
|
27
28
|
private readonly treeElements: Map<Workspace.UISourceCode.UISourceCode, UISourceCodeTreeElement>;
|
|
28
29
|
private readonly workspaceDiff: WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl;
|
|
@@ -110,6 +111,10 @@ export const enum Events {
|
|
|
110
111
|
SelectedUISourceCodeChanged = 'SelectedUISourceCodeChanged',
|
|
111
112
|
}
|
|
112
113
|
|
|
114
|
+
export type EventTypes = {
|
|
115
|
+
[Events.SelectedUISourceCodeChanged]: void,
|
|
116
|
+
};
|
|
117
|
+
|
|
113
118
|
export class UISourceCodeTreeElement extends UI.TreeOutline.TreeElement {
|
|
114
119
|
uiSourceCode: Workspace.UISourceCode.UISourceCode;
|
|
115
120
|
private readonly eventListeners: Common.EventTarget.EventDescriptor[];
|
|
@@ -22,7 +22,8 @@ const UIStrings = {
|
|
|
22
22
|
};
|
|
23
23
|
const str_ = i18n.i18n.registerUIStrings('panels/console/ConsolePrompt.ts', UIStrings);
|
|
24
24
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
25
|
-
export class ConsolePrompt extends UI.Widget.Widget
|
|
25
|
+
export class ConsolePrompt extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
|
26
|
+
UI.Widget.Widget) {
|
|
26
27
|
private addCompletionsFromHistory: boolean;
|
|
27
28
|
private historyInternal: ConsoleHistoryManager;
|
|
28
29
|
private initialText: string;
|
|
@@ -455,3 +456,7 @@ export class ConsoleHistoryManager {
|
|
|
455
456
|
export const enum Events {
|
|
456
457
|
TextChanged = 'TextChanged',
|
|
457
458
|
}
|
|
459
|
+
|
|
460
|
+
export type EventTypes = {
|
|
461
|
+
[Events.TextChanged]: void,
|
|
462
|
+
};
|
|
@@ -300,8 +300,8 @@ export class CSSOverviewCompletedView extends UI.Panel.PanelWithSidebar {
|
|
|
300
300
|
// TODO(paullewis): update the links in the panels in case source has been .
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
private sideBarItemSelected(event: Common.EventTarget.EventTargetEvent): void {
|
|
304
|
-
const data =
|
|
303
|
+
private sideBarItemSelected(event: Common.EventTarget.EventTargetEvent<string>): void {
|
|
304
|
+
const {data} = event;
|
|
305
305
|
const section = (this.fragment as UI.Fragment.Fragment).$(data);
|
|
306
306
|
if (!section) {
|
|
307
307
|
return;
|
|
@@ -2,6 +2,7 @@
|
|
|
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 * as Common from '../../core/common/common.js';
|
|
5
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
8
|
|
|
@@ -16,7 +17,8 @@ const UIStrings = {
|
|
|
16
17
|
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewSidebarPanel.ts', UIStrings);
|
|
17
18
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
18
19
|
|
|
19
|
-
export class CSSOverviewSidebarPanel extends UI.Widget.VBox
|
|
20
|
+
export class CSSOverviewSidebarPanel extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
21
|
+
UI.Widget.VBox) {
|
|
20
22
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
21
23
|
static get ITEM_CLASS_NAME(): string {
|
|
22
24
|
return 'overview-sidebar-panel-item';
|
|
@@ -97,3 +99,8 @@ export const enum SidebarEvents {
|
|
|
97
99
|
ItemSelected = 'ItemSelected',
|
|
98
100
|
Reset = 'Reset',
|
|
99
101
|
}
|
|
102
|
+
|
|
103
|
+
export type EventTypes = {
|
|
104
|
+
[SidebarEvents.ItemSelected]: string,
|
|
105
|
+
[SidebarEvents.Reset]: void,
|
|
106
|
+
};
|
|
@@ -56,6 +56,7 @@ import {ElementsTreeOutline} from './ElementsTreeOutline.js';
|
|
|
56
56
|
import type {MarkerDecorator} from './MarkerDecorator.js';
|
|
57
57
|
import {MetricsSidebarPane} from './MetricsSidebarPane.js';
|
|
58
58
|
import {Events as StylesSidebarPaneEvents, StylesSidebarPane} from './StylesSidebarPane.js';
|
|
59
|
+
import type {StylesUpdateCompletedEvent} from './StylesSidebarPane.js';
|
|
59
60
|
|
|
60
61
|
const UIStrings = {
|
|
61
62
|
/**
|
|
@@ -124,6 +125,18 @@ const UIStrings = {
|
|
|
124
125
|
* @example {::after, ::before} PH1
|
|
125
126
|
*/
|
|
126
127
|
elementStateS: 'Element state: {PH1}',
|
|
128
|
+
/**
|
|
129
|
+
* @description Accessible name for side panel toolbar.
|
|
130
|
+
*/
|
|
131
|
+
sidePanelToolbar: 'Side panel toolbar',
|
|
132
|
+
/**
|
|
133
|
+
* @description Accessible name for side panel contents.
|
|
134
|
+
*/
|
|
135
|
+
sidePanelContent: 'Side panel content',
|
|
136
|
+
/**
|
|
137
|
+
* @description Accessible name for the DOM tree explorer view.
|
|
138
|
+
*/
|
|
139
|
+
domTreeExplorer: 'DOM tree explorer',
|
|
127
140
|
};
|
|
128
141
|
|
|
129
142
|
const str_ = i18n.i18n.registerUIStrings('panels/elements/ElementsPanel.ts', UIStrings);
|
|
@@ -205,6 +218,9 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
205
218
|
stackElement.appendChild(this.contentElementInternal);
|
|
206
219
|
stackElement.appendChild(crumbsContainer);
|
|
207
220
|
|
|
221
|
+
UI.ARIAUtils.markAsMain(this.contentElementInternal);
|
|
222
|
+
UI.ARIAUtils.setAccessibleName(this.contentElementInternal, i18nString(UIStrings.domTreeExplorer));
|
|
223
|
+
|
|
208
224
|
this.splitWidget.setMainWidget(this.searchableViewInternal);
|
|
209
225
|
this.splitMode = null;
|
|
210
226
|
|
|
@@ -957,7 +973,7 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
957
973
|
|
|
958
974
|
let skippedInitialTabSelectedEvent = false;
|
|
959
975
|
|
|
960
|
-
const toggleMetricsWidget = (event: Common.EventTarget.EventTargetEvent): void => {
|
|
976
|
+
const toggleMetricsWidget = (event: Common.EventTarget.EventTargetEvent<StylesUpdateCompletedEvent>): void => {
|
|
961
977
|
this.metricsWidget.toggleVisibility(event.data.hasMatchedStyles);
|
|
962
978
|
};
|
|
963
979
|
|
|
@@ -987,6 +1003,14 @@ export class ElementsPanel extends UI.Panel.Panel implements UI.SearchableView.S
|
|
|
987
1003
|
this.splitWidget.installResizer(tabbedPane.headerElement());
|
|
988
1004
|
}
|
|
989
1005
|
|
|
1006
|
+
const headerElement = tabbedPane.headerElement();
|
|
1007
|
+
UI.ARIAUtils.markAsNavigation(headerElement);
|
|
1008
|
+
UI.ARIAUtils.setAccessibleName(headerElement, i18nString(UIStrings.sidePanelToolbar));
|
|
1009
|
+
|
|
1010
|
+
const contentElement = tabbedPane.tabbedPaneContentElement();
|
|
1011
|
+
UI.ARIAUtils.markAsComplementary(contentElement);
|
|
1012
|
+
UI.ARIAUtils.setAccessibleName(contentElement, i18nString(UIStrings.sidePanelContent));
|
|
1013
|
+
|
|
990
1014
|
const stylesView = new UI.View.SimpleView(i18nString(UIStrings.styles));
|
|
991
1015
|
this.sidebarPaneView.appendView(stylesView);
|
|
992
1016
|
stylesView.element.classList.add('flex-auto');
|
|
@@ -192,7 +192,8 @@ let _stylesSidebarPaneInstance: StylesSidebarPane;
|
|
|
192
192
|
const STYLE_TAG = '<' +
|
|
193
193
|
'style>';
|
|
194
194
|
|
|
195
|
-
export class StylesSidebarPane extends ElementsSidebarPane
|
|
195
|
+
export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventTypes, typeof ElementsSidebarPane>(
|
|
196
|
+
ElementsSidebarPane) {
|
|
196
197
|
private currentToolbarPane: UI.Widget.Widget|null;
|
|
197
198
|
private animatedToolbarPane: UI.Widget.Widget|null;
|
|
198
199
|
private pendingWidget: UI.Widget.Widget|null;
|
|
@@ -800,7 +801,7 @@ export class StylesSidebarPane extends ElementsSidebarPane {
|
|
|
800
801
|
// Record the elements tool load time after the sidepane has loaded.
|
|
801
802
|
Host.userMetrics.panelLoaded('elements', 'DevTools.Launch.Elements');
|
|
802
803
|
|
|
803
|
-
this.dispatchEventToListeners(Events.StylesUpdateCompleted, {
|
|
804
|
+
this.dispatchEventToListeners(Events.StylesUpdateCompleted, {hasMatchedStyles: false});
|
|
804
805
|
}
|
|
805
806
|
|
|
806
807
|
private nodeStylesUpdatedForTest(_node: SDK.DOMModel.DOMNode, _rebuild: boolean): void {
|
|
@@ -1060,6 +1061,15 @@ export const enum Events {
|
|
|
1060
1061
|
StylesUpdateCompleted = 'StylesUpdateCompleted',
|
|
1061
1062
|
}
|
|
1062
1063
|
|
|
1064
|
+
export interface StylesUpdateCompletedEvent {
|
|
1065
|
+
hasMatchedStyles: boolean;
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
export type EventTypes = {
|
|
1069
|
+
[Events.InitialUpdateCompleted]: void,
|
|
1070
|
+
[Events.StylesUpdateCompleted]: StylesUpdateCompletedEvent,
|
|
1071
|
+
};
|
|
1072
|
+
|
|
1063
1073
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
1064
1074
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
1065
1075
|
export const _maxLinkLength = 23;
|
|
@@ -2,9 +2,11 @@
|
|
|
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 * as i18n from '../../../core/i18n/i18n.js';
|
|
5
6
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
6
7
|
import * as Coordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
|
7
8
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
9
|
+
|
|
8
10
|
import elementsBreadcrumbsStyles from './elementsBreadcrumbs.css.js';
|
|
9
11
|
|
|
10
12
|
import type {UserScrollPosition} from './ElementsBreadcrumbsUtils.js';
|
|
@@ -15,6 +17,16 @@ import type {DOMNode} from './Helper.js';
|
|
|
15
17
|
import {NodeText} from './NodeText.js';
|
|
16
18
|
import type {NodeTextData} from './NodeText.js';
|
|
17
19
|
|
|
20
|
+
const UIStrings = {
|
|
21
|
+
/**
|
|
22
|
+
* @description Accessible name for DOM tree breadcrumb navigation.
|
|
23
|
+
*/
|
|
24
|
+
breadcrumbs: 'DOM tree breadcrumbs',
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
const str_ = i18n.i18n.registerUIStrings('panels/elements/components/ElementsBreadcrumbs.ts', UIStrings);
|
|
28
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
29
|
+
|
|
18
30
|
export class NodeSelectedEvent extends Event {
|
|
19
31
|
static readonly eventName = 'breadcrumbsnodeselected';
|
|
20
32
|
legacyDomNode: SDK.DOMModel.DOMNode;
|
|
@@ -264,7 +276,7 @@ export class ElementsBreadcrumbs extends HTMLElement {
|
|
|
264
276
|
// Disabled until https://crbug.com/1079231 is fixed.
|
|
265
277
|
// clang-format off
|
|
266
278
|
LitHtml.render(LitHtml.html`
|
|
267
|
-
<nav class="crumbs">
|
|
279
|
+
<nav class="crumbs" aria-label="${i18nString(UIStrings.breadcrumbs)}">
|
|
268
280
|
${this.renderOverflowButton('left', this.userScrollPosition === 'start')}
|
|
269
281
|
|
|
270
282
|
<div class="crumbs-window" @scroll=${this.onCrumbsWindowScroll}>
|
|
@@ -7,21 +7,11 @@ import * as Host from '../../core/host/host.js';
|
|
|
7
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
8
|
|
|
9
9
|
import {DeviceModeWrapper} from './DeviceModeWrapper.js';
|
|
10
|
+
import type {Bounds} from './InspectedPagePlaceholder.js';
|
|
10
11
|
import {Events, InspectedPagePlaceholder} from './InspectedPagePlaceholder.js';
|
|
11
12
|
|
|
12
13
|
let appInstance: AdvancedApp;
|
|
13
14
|
|
|
14
|
-
interface Event {
|
|
15
|
-
data: {
|
|
16
|
-
to: UI.DockController.DockState,
|
|
17
|
-
from: UI.DockController.DockState|undefined,
|
|
18
|
-
x: number,
|
|
19
|
-
y: number,
|
|
20
|
-
width: number,
|
|
21
|
-
height: number,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
15
|
export class AdvancedApp implements Common.App.App {
|
|
26
16
|
private rootSplitWidget!: UI.SplitWidget.SplitWidget;
|
|
27
17
|
private deviceModeView!: DeviceModeWrapper;
|
|
@@ -170,7 +160,7 @@ export class AdvancedApp implements Common.App.App {
|
|
|
170
160
|
return UI.DockController.DockController.instance().dockSide() !== UI.DockController.DockState.UNDOCKED;
|
|
171
161
|
}
|
|
172
162
|
|
|
173
|
-
private onSetInspectedPageBounds(event:
|
|
163
|
+
private onSetInspectedPageBounds(event: Common.EventTarget.EventTargetEvent<Bounds>): void {
|
|
174
164
|
if (this.changingDockSide) {
|
|
175
165
|
return;
|
|
176
166
|
}
|
|
@@ -2,11 +2,13 @@
|
|
|
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 * as Common from '../../core/common/common.js';
|
|
5
6
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
6
7
|
|
|
7
8
|
let inspectedPagePlaceholderInstance: InspectedPagePlaceholder;
|
|
8
9
|
|
|
9
|
-
export class InspectedPagePlaceholder extends UI.Widget.Widget
|
|
10
|
+
export class InspectedPagePlaceholder extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.Widget>(
|
|
11
|
+
UI.Widget.Widget) {
|
|
10
12
|
private updateId?: number;
|
|
11
13
|
constructor() {
|
|
12
14
|
super(true);
|
|
@@ -81,3 +83,14 @@ export class InspectedPagePlaceholder extends UI.Widget.Widget {
|
|
|
81
83
|
export const enum Events {
|
|
82
84
|
Update = 'Update',
|
|
83
85
|
}
|
|
86
|
+
|
|
87
|
+
export interface Bounds {
|
|
88
|
+
x: number;
|
|
89
|
+
y: number;
|
|
90
|
+
height: number;
|
|
91
|
+
width: number;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export type EventTypes = {
|
|
95
|
+
[Events.Update]: Bounds,
|
|
96
|
+
};
|