chrome-devtools-frontend 1.0.963415 → 1.0.963960
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/docs/resource_management.md +119 -0
- package/front_end/core/i18n/locales/en-US.json +2 -2
- package/front_end/core/i18n/locales/en-XL.json +2 -2
- package/front_end/core/sdk/DOMModel.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +8 -4
- package/front_end/generated/protocol-mapping.d.ts +12 -1
- package/front_end/generated/protocol-proxy-api.d.ts +11 -1
- package/front_end/generated/protocol.ts +27 -12
- package/front_end/panels/animation/AnimationUI.ts +2 -1
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +6 -4
- package/package.json +1 -1
- package/scripts/devtools_paths.js +3 -2
- package/scripts/whitespaces.txt +1 -0
@@ -0,0 +1,119 @@
|
|
1
|
+
# Resource management in DevTools
|
2
|
+
|
3
|
+
This document outlines how DevTools keeps track of resources like scripts and
|
4
|
+
HTML files, and how they interact with other features such as the Debugger.
|
5
|
+
The source code lives in the bindings/, persistence/ and workspace/ directories.
|
6
|
+
|
7
|
+
## Core concepts and classes
|
8
|
+
|
9
|
+
* **Project:** Interface to a collection of resources. DevTools supports
|
10
|
+
different project **types**. For example “filesystem”, for resources
|
11
|
+
originating from the developers local machine, and “network”, for actual page
|
12
|
+
resources. The **Project** interface abstracts away rudimentary file
|
13
|
+
operations. Depending on the **type**, a **Project** may be able to create,
|
14
|
+
rename or delete resources, or change the contents.
|
15
|
+
|
16
|
+
* **Workspace**: A collection of all the **Projects** currently in use.
|
17
|
+
Implemented as a singleton in WorkspaceImpl.ts.
|
18
|
+
|
19
|
+
* **UISourceCode:** An actual resource identified by its URL. Scripts and
|
20
|
+
stylesheets are prominent examples, but DevTools also uses more esoteric
|
21
|
+
**ResourceTypes** such as XHR, WebSocket or EventSource.
|
22
|
+
|
23
|
+
## Project types
|
24
|
+
|
25
|
+
A short overview over the different Project types and what **kind of resources**
|
26
|
+
they contain.
|
27
|
+
|
28
|
+
* **Network:** All resources loaded from the network are stored in network
|
29
|
+
projects. Different targets and/or **Resource** **types** may use different
|
30
|
+
projects. E.g. Each target has their own project containing only JavaScript
|
31
|
+
source maps.
|
32
|
+
|
33
|
+
* **Filesystem:** Resources stored on the developers local machine.
|
34
|
+
* Snippets are managed with a single Project just for snippets.
|
35
|
+
* Each local directory mapped into DevTools with the “Workspaces” feature has
|
36
|
+
its own project.
|
37
|
+
* Each directory used for the “Overrides” feature has a corresponding project
|
38
|
+
to manage the local files.
|
39
|
+
|
40
|
+
* **Formatter:** A single project of this type manages the formatted version of
|
41
|
+
script resources. That is the “pretty-print” feature for minified JS files.
|
42
|
+
|
43
|
+
* **ContentScripts**: Scripts from extensions running in the context of the page
|
44
|
+
itself. One project per target. Source maps for content scripts are managed by
|
45
|
+
separate, per target, projects. The source map projects also have the
|
46
|
+
**ContentScripts** type.
|
47
|
+
|
48
|
+
* **Service:** One project of this type per target. It holds placeholder
|
49
|
+
UISourceCodes for source maps while they are loaded. Once a source map
|
50
|
+
finishes loading, the placeholder is removed from the **Service** project.
|
51
|
+
|
52
|
+
* **Debugger:** One project of this type per target. Debugger projects store
|
53
|
+
parsed JS scripts (see next section).
|
54
|
+
|
55
|
+
## The “Debugger” project type
|
56
|
+
|
57
|
+
When V8 parses scripts, it sends out a
|
58
|
+
[“Debugger.ScriptParsed”](https://chromedevtools.github.io/devtools-protocol/tot/Debugger/#event-scriptParsed)
|
59
|
+
event with some details, including a unique script ID and the URL of the script.
|
60
|
+
For each “Debugger.ScriptParsed” event, DevTools creates a **Script** object and
|
61
|
+
an associated **UISourceCode** in the “debugger” project. It is important to
|
62
|
+
note that the URL of this “debugger” UISourceCode contains both the script ID as
|
63
|
+
well as the script name (not URL!) to uniquely identify it. This is because:
|
64
|
+
|
65
|
+
_The relationship between network/filesystem UISourceCodes and **Script**
|
66
|
+
**objects**/debugger UISourceCodes is 1:n._
|
67
|
+
|
68
|
+
For example if the same script is included twice on a page with <script>
|
69
|
+
elements, it will result in a single UISourceCode in the **Network** project but
|
70
|
+
**two Script** **objects** and two UISourceCodes in the **Debugger** project.
|
71
|
+
Similarly, every invocation of a Snippet will result in a separate **Script**
|
72
|
+
object per invocation while the Snippet itself is stored in a **Filesystem**
|
73
|
+
project.
|
74
|
+
|
75
|
+
## Mappings and bindings
|
76
|
+
|
77
|
+
As can be seen above, UISourceCodes in different projects can potentially be
|
78
|
+
related to one another. A minified script resource in a **scripts Network project**
|
79
|
+
might have a pretty-printed version in the **Formatter project** while the
|
80
|
+
source map for the minified script is stored in the **source map Network project**.
|
81
|
+
Once the minified script is parsed/executed by V8, it also has a corresponding
|
82
|
+
**Script object** and a UISourceCode in the **Debugger project**.
|
83
|
+
|
84
|
+
This brings us to mappings and bindings. The terminology is roughly:
|
85
|
+
|
86
|
+
* _A **binding** ties different UISourceCodes together and determines which
|
87
|
+
UISourceCodes relate to one another._
|
88
|
+
* _A **mapping** translates source positions between bound UISourceCodes._
|
89
|
+
|
90
|
+
## Binding implementations
|
91
|
+
|
92
|
+
There are a couple of classes tasked with establishing bindings between
|
93
|
+
UISourceCodes:
|
94
|
+
|
95
|
+
* **DebuggerWorkspaceBinding:** Responsible for scripts and source maps.
|
96
|
+
It ties together network/filesystem UISourceCodes with **Script** objects and
|
97
|
+
the debugger USourceCodes. Script source maps are also partially implemented
|
98
|
+
by this class.
|
99
|
+
|
100
|
+
* **CSSWorkspaceBinding:** Responsible for CSS and CSS source maps. DevTools can
|
101
|
+
handle source mapped CSS when it was authored in SASS and this class is
|
102
|
+
responsible for binding the corresponding UISourceCodes.
|
103
|
+
|
104
|
+
* **PersistenceBinding/PersistenceImpl/Automapping**: Responsible for the
|
105
|
+
[“Workspaces”](https://developer.chrome.com/docs/devtools/workspaces/)
|
106
|
+
feature. When a developer adds a local directory to DevTools that corresponds
|
107
|
+
to the pages sources, these classes establish and manage the binding between
|
108
|
+
the corresponding **Filesystem** and **Network** resources.
|
109
|
+
|
110
|
+
* **NetworkPersistenceManager**: Responsible for the
|
111
|
+
[“Local Overrides”](https://developer.chrome.com/blog/new-in-devtools-65/#overrides)
|
112
|
+
feature. It connects the **Network** resources with the corresponding
|
113
|
+
overwritten version in a **Filesystem** project. This class also handles
|
114
|
+
network request interceptions and determines whether to serve the original or
|
115
|
+
the overwritten UISourceCode.
|
116
|
+
|
117
|
+
Please keep in mind that many of these classes have gathered additional
|
118
|
+
responsibilities over the years, so the concepts presented above might not
|
119
|
+
always cleanly apply or be apparent in code.
|
@@ -4809,10 +4809,10 @@
|
|
4809
4809
|
"message": "Copy selector"
|
4810
4810
|
},
|
4811
4811
|
"panels/elements/StylesSidebarPane.ts | cssPropertyName": {
|
4812
|
-
"message": "CSS property name"
|
4812
|
+
"message": "CSS property name: {PH1}"
|
4813
4813
|
},
|
4814
4814
|
"panels/elements/StylesSidebarPane.ts | cssPropertyValue": {
|
4815
|
-
"message": "CSS property value"
|
4815
|
+
"message": "CSS property value: {PH1}"
|
4816
4816
|
},
|
4817
4817
|
"panels/elements/StylesSidebarPane.ts | cssSelector": {
|
4818
4818
|
"message": "CSS selector"
|
@@ -4809,10 +4809,10 @@
|
|
4809
4809
|
"message": "Ĉóp̂ý selector"
|
4810
4810
|
},
|
4811
4811
|
"panels/elements/StylesSidebarPane.ts | cssPropertyName": {
|
4812
|
-
"message": "CSS p̂ŕôṕêŕt̂ý n̂ám̂e
|
4812
|
+
"message": "CSS p̂ŕôṕêŕt̂ý n̂ám̂é: {PH1}"
|
4813
4813
|
},
|
4814
4814
|
"panels/elements/StylesSidebarPane.ts | cssPropertyValue": {
|
4815
|
-
"message": "CSS p̂ŕôṕêŕt̂ý v̂ál̂úe
|
4815
|
+
"message": "CSS p̂ŕôṕêŕt̂ý v̂ál̂úê: {PH1}"
|
4816
4816
|
},
|
4817
4817
|
"panels/elements/StylesSidebarPane.ts | cssSelector": {
|
4818
4818
|
"message": "CSS ŝél̂éĉt́ôŕ"
|
@@ -1038,7 +1038,7 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
1038
1038
|
this.#pendingDocumentRequestPromise = null;
|
1039
1039
|
|
1040
1040
|
if (!target.suspended()) {
|
1041
|
-
void this.agent.invoke_enable();
|
1041
|
+
void this.agent.invoke_enable({});
|
1042
1042
|
}
|
1043
1043
|
|
1044
1044
|
if (Root.Runtime.experiments.isEnabled('captureNodeCreationStacks')) {
|
@@ -1497,7 +1497,7 @@ export class DOMModel extends SDKModel<EventTypes> {
|
|
1497
1497
|
}
|
1498
1498
|
|
1499
1499
|
async resumeModel(): Promise<void> {
|
1500
|
-
await this.agent.invoke_enable();
|
1500
|
+
await this.agent.invoke_enable({});
|
1501
1501
|
}
|
1502
1502
|
|
1503
1503
|
dispose(): void {
|
@@ -295,7 +295,6 @@ export function registerCommands(inspectorBackend) {
|
|
295
295
|
AttributionReportingIssue: 'AttributionReportingIssue',
|
296
296
|
QuirksModeIssue: 'QuirksModeIssue',
|
297
297
|
NavigatorUserAgentIssue: 'NavigatorUserAgentIssue',
|
298
|
-
WasmCrossOriginModuleSharingIssue: 'WasmCrossOriginModuleSharingIssue',
|
299
298
|
GenericIssue: 'GenericIssue',
|
300
299
|
DeprecationIssue: 'DeprecationIssue',
|
301
300
|
ClientHintIssue: 'ClientHintIssue'
|
@@ -681,7 +680,9 @@ export function registerCommands(inspectorBackend) {
|
|
681
680
|
inspectorBackend.registerCommand('DOM.disable', [], []);
|
682
681
|
inspectorBackend.registerCommand(
|
683
682
|
'DOM.discardSearchResults', [{'name': 'searchId', 'type': 'string', 'optional': false}], []);
|
684
|
-
inspectorBackend.
|
683
|
+
inspectorBackend.registerEnum('DOM.EnableRequestIncludeWhitespace', {None: 'none', All: 'all'});
|
684
|
+
inspectorBackend.registerCommand(
|
685
|
+
'DOM.enable', [{'name': 'includeWhitespace', 'type': 'string', 'optional': true}], []);
|
685
686
|
inspectorBackend.registerCommand(
|
686
687
|
'DOM.focus',
|
687
688
|
[
|
@@ -2114,7 +2115,7 @@ export function registerCommands(inspectorBackend) {
|
|
2114
2115
|
inspectorBackend.registerEnum(
|
2115
2116
|
'Page.NavigationType', {Navigation: 'Navigation', BackForwardCacheRestore: 'BackForwardCacheRestore'});
|
2116
2117
|
inspectorBackend.registerEnum('Page.BackForwardCacheNotRestoredReason', {
|
2117
|
-
|
2118
|
+
NotPrimaryMainFrame: 'NotPrimaryMainFrame',
|
2118
2119
|
BackForwardCacheDisabled: 'BackForwardCacheDisabled',
|
2119
2120
|
RelatedActiveContentsExist: 'RelatedActiveContentsExist',
|
2120
2121
|
HTTPStatusNotOK: 'HTTPStatusNotOK',
|
@@ -2637,7 +2638,7 @@ export function registerCommands(inspectorBackend) {
|
|
2637
2638
|
inspectorBackend.registerEvent('Storage.cacheStorageListUpdated', ['origin']);
|
2638
2639
|
inspectorBackend.registerEvent('Storage.indexedDBContentUpdated', ['origin', 'databaseName', 'objectStoreName']);
|
2639
2640
|
inspectorBackend.registerEvent('Storage.indexedDBListUpdated', ['origin']);
|
2640
|
-
inspectorBackend.registerEvent('Storage.interestGroupAccessed', ['type', 'ownerOrigin', 'name']);
|
2641
|
+
inspectorBackend.registerEvent('Storage.interestGroupAccessed', ['accessTime', 'type', 'ownerOrigin', 'name']);
|
2641
2642
|
inspectorBackend.registerCommand(
|
2642
2643
|
'Storage.clearDataForOrigin',
|
2643
2644
|
[
|
@@ -3488,6 +3489,9 @@ export function registerCommands(inspectorBackend) {
|
|
3488
3489
|
[]);
|
3489
3490
|
inspectorBackend.registerCommand(
|
3490
3491
|
'Runtime.removeBinding', [{'name': 'name', 'type': 'string', 'optional': false}], []);
|
3492
|
+
inspectorBackend.registerCommand(
|
3493
|
+
'Runtime.getExceptionDetails', [{'name': 'errorObjectId', 'type': 'string', 'optional': false}],
|
3494
|
+
['exceptionDetails']);
|
3491
3495
|
|
3492
3496
|
// Schema.
|
3493
3497
|
inspectorBackend.registerCommand('Schema.getDomains', [], ['domains']);
|
@@ -1138,7 +1138,7 @@ export namespace ProtocolMapping {
|
|
1138
1138
|
/**
|
1139
1139
|
* Enables DOM agent for the given page.
|
1140
1140
|
*/
|
1141
|
-
'DOM.enable': {paramsType: []; returnType: void;};
|
1141
|
+
'DOM.enable': {paramsType: [Protocol.DOM.EnableRequest?]; returnType: void;};
|
1142
1142
|
/**
|
1143
1143
|
* Focuses the given element.
|
1144
1144
|
*/
|
@@ -3115,6 +3115,17 @@ export namespace ProtocolMapping {
|
|
3115
3115
|
* unsubscribes current runtime agent from Runtime.bindingCalled notifications.
|
3116
3116
|
*/
|
3117
3117
|
'Runtime.removeBinding': {paramsType: [Protocol.Runtime.RemoveBindingRequest]; returnType: void;};
|
3118
|
+
/**
|
3119
|
+
* This method tries to lookup and populate exception details for a
|
3120
|
+
* JavaScript Error object.
|
3121
|
+
* Note that the stackTrace portion of the resulting exceptionDetails will
|
3122
|
+
* only be populated if the Runtime domain was enabled at the time when the
|
3123
|
+
* Error was thrown.
|
3124
|
+
*/
|
3125
|
+
'Runtime.getExceptionDetails': {
|
3126
|
+
paramsType: [Protocol.Runtime.GetExceptionDetailsRequest];
|
3127
|
+
returnType: Protocol.Runtime.GetExceptionDetailsResponse;
|
3128
|
+
};
|
3118
3129
|
/**
|
3119
3130
|
* Returns supported domains.
|
3120
3131
|
*/
|
@@ -824,7 +824,7 @@ declare namespace ProtocolProxyApi {
|
|
824
824
|
/**
|
825
825
|
* Enables DOM agent for the given page.
|
826
826
|
*/
|
827
|
-
invoke_enable(): Promise<Protocol.ProtocolResponseWithError>;
|
827
|
+
invoke_enable(params: Protocol.DOM.EnableRequest): Promise<Protocol.ProtocolResponseWithError>;
|
828
828
|
|
829
829
|
/**
|
830
830
|
* Focuses the given element.
|
@@ -4050,6 +4050,16 @@ declare namespace ProtocolProxyApi {
|
|
4050
4050
|
* unsubscribes current runtime agent from Runtime.bindingCalled notifications.
|
4051
4051
|
*/
|
4052
4052
|
invoke_removeBinding(params: Protocol.Runtime.RemoveBindingRequest): Promise<Protocol.ProtocolResponseWithError>;
|
4053
|
+
|
4054
|
+
/**
|
4055
|
+
* This method tries to lookup and populate exception details for a
|
4056
|
+
* JavaScript Error object.
|
4057
|
+
* Note that the stackTrace portion of the resulting exceptionDetails will
|
4058
|
+
* only be populated if the Runtime domain was enabled at the time when the
|
4059
|
+
* Error was thrown.
|
4060
|
+
*/
|
4061
|
+
invoke_getExceptionDetails(params: Protocol.Runtime.GetExceptionDetailsRequest):
|
4062
|
+
Promise<Protocol.Runtime.GetExceptionDetailsResponse>;
|
4053
4063
|
}
|
4054
4064
|
export interface RuntimeDispatcher {
|
4055
4065
|
/**
|
@@ -1011,13 +1011,6 @@ export namespace Audits {
|
|
1011
1011
|
location?: SourceCodeLocation;
|
1012
1012
|
}
|
1013
1013
|
|
1014
|
-
export interface WasmCrossOriginModuleSharingIssueDetails {
|
1015
|
-
wasmModuleUrl: string;
|
1016
|
-
sourceOrigin: string;
|
1017
|
-
targetOrigin: string;
|
1018
|
-
isWarning: boolean;
|
1019
|
-
}
|
1020
|
-
|
1021
1014
|
export const enum GenericIssueErrorType {
|
1022
1015
|
CrossOriginPortalPostMessageError = 'CrossOriginPortalPostMessageError',
|
1023
1016
|
}
|
@@ -1086,7 +1079,6 @@ export namespace Audits {
|
|
1086
1079
|
AttributionReportingIssue = 'AttributionReportingIssue',
|
1087
1080
|
QuirksModeIssue = 'QuirksModeIssue',
|
1088
1081
|
NavigatorUserAgentIssue = 'NavigatorUserAgentIssue',
|
1089
|
-
WasmCrossOriginModuleSharingIssue = 'WasmCrossOriginModuleSharingIssue',
|
1090
1082
|
GenericIssue = 'GenericIssue',
|
1091
1083
|
DeprecationIssue = 'DeprecationIssue',
|
1092
1084
|
ClientHintIssue = 'ClientHintIssue',
|
@@ -1110,7 +1102,6 @@ export namespace Audits {
|
|
1110
1102
|
attributionReportingIssueDetails?: AttributionReportingIssueDetails;
|
1111
1103
|
quirksModeIssueDetails?: QuirksModeIssueDetails;
|
1112
1104
|
navigatorUserAgentIssueDetails?: NavigatorUserAgentIssueDetails;
|
1113
|
-
wasmCrossOriginModuleSharingIssue?: WasmCrossOriginModuleSharingIssueDetails;
|
1114
1105
|
genericIssueDetails?: GenericIssueDetails;
|
1115
1106
|
deprecationIssueDetails?: DeprecationIssueDetails;
|
1116
1107
|
clientHintIssueDetails?: ClientHintIssueDetails;
|
@@ -3245,6 +3236,18 @@ export namespace DOM {
|
|
3245
3236
|
searchId: string;
|
3246
3237
|
}
|
3247
3238
|
|
3239
|
+
export const enum EnableRequestIncludeWhitespace {
|
3240
|
+
None = 'none',
|
3241
|
+
All = 'all',
|
3242
|
+
}
|
3243
|
+
|
3244
|
+
export interface EnableRequest {
|
3245
|
+
/**
|
3246
|
+
* Whether to include whitespaces in the children array of returned Nodes.
|
3247
|
+
*/
|
3248
|
+
includeWhitespace?: EnableRequestIncludeWhitespace;
|
3249
|
+
}
|
3250
|
+
|
3248
3251
|
export interface FocusRequest {
|
3249
3252
|
/**
|
3250
3253
|
* Identifier of the node.
|
@@ -5927,7 +5930,7 @@ export namespace Input {
|
|
5927
5930
|
/**
|
5928
5931
|
* Editing commands to send with the key event (e.g., 'selectAll') (default: []).
|
5929
5932
|
* These are related to but not equal the command names used in `document.execCommand` and NSStandardKeyBindingResponding.
|
5930
|
-
* See https://source.chromium.org/chromium/chromium/src/+/
|
5933
|
+
* See https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/core/editing/commands/editor_command_names.h for valid command names.
|
5931
5934
|
*/
|
5932
5935
|
commands?: string[];
|
5933
5936
|
}
|
@@ -10597,7 +10600,7 @@ export namespace Page {
|
|
10597
10600
|
* List of not restored reasons for back-forward cache.
|
10598
10601
|
*/
|
10599
10602
|
export const enum BackForwardCacheNotRestoredReason {
|
10600
|
-
|
10603
|
+
NotPrimaryMainFrame = 'NotPrimaryMainFrame',
|
10601
10604
|
BackForwardCacheDisabled = 'BackForwardCacheDisabled',
|
10602
10605
|
RelatedActiveContentsExist = 'RelatedActiveContentsExist',
|
10603
10606
|
HTTPStatusNotOK = 'HTTPStatusNotOK',
|
@@ -12492,7 +12495,7 @@ export namespace Storage {
|
|
12492
12495
|
export interface InterestGroupDetails {
|
12493
12496
|
ownerOrigin: string;
|
12494
12497
|
name: string;
|
12495
|
-
expirationTime:
|
12498
|
+
expirationTime: Network.TimeSinceEpoch;
|
12496
12499
|
joiningOrigin: string;
|
12497
12500
|
biddingUrl?: string;
|
12498
12501
|
biddingWasmHelperUrl?: string;
|
@@ -12702,6 +12705,7 @@ export namespace Storage {
|
|
12702
12705
|
* One of the interest groups was accessed by the associated page.
|
12703
12706
|
*/
|
12704
12707
|
export interface InterestGroupAccessedEvent {
|
12708
|
+
accessTime: Network.TimeSinceEpoch;
|
12705
12709
|
type: InterestGroupAccessType;
|
12706
12710
|
ownerOrigin: string;
|
12707
12711
|
name: string;
|
@@ -16618,6 +16622,17 @@ export namespace Runtime {
|
|
16618
16622
|
name: string;
|
16619
16623
|
}
|
16620
16624
|
|
16625
|
+
export interface GetExceptionDetailsRequest {
|
16626
|
+
/**
|
16627
|
+
* The error object for which to resolve the exception details.
|
16628
|
+
*/
|
16629
|
+
errorObjectId: RemoteObjectId;
|
16630
|
+
}
|
16631
|
+
|
16632
|
+
export interface GetExceptionDetailsResponse extends ProtocolResponseWithError {
|
16633
|
+
exceptionDetails?: ExceptionDetails;
|
16634
|
+
}
|
16635
|
+
|
16621
16636
|
/**
|
16622
16637
|
* Notification is issued every time when binding is called.
|
16623
16638
|
*/
|
@@ -279,7 +279,8 @@ export class AnimationUI {
|
|
279
279
|
const iterationWidth = this.duration() * this.#timeline.pixelMsRatio();
|
280
280
|
let iteration;
|
281
281
|
for (iteration = 1; iteration < this.#animationInternal.source().iterations() &&
|
282
|
-
iterationWidth * (iteration - 1) < this.#timeline.width()
|
282
|
+
iterationWidth * (iteration - 1) < this.#timeline.width() &&
|
283
|
+
(iterationWidth > 0 || this.#animationInternal.source().iterations() !== Infinity);
|
283
284
|
iteration++) {
|
284
285
|
this.renderIteration(this.#tailGroup, iteration);
|
285
286
|
}
|
@@ -508,7 +508,7 @@ const str_ = i18n.i18n.registerUIStrings('panels/application/components/BackForw
|
|
508
508
|
const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
|
509
509
|
|
510
510
|
export const NotRestoredReasonDescription = {
|
511
|
-
'
|
511
|
+
'NotPrimaryMainFrame': {name: i18nLazyString(UIStrings.notMainFrame)},
|
512
512
|
'BackForwardCacheDisabled': {name: i18nLazyString(UIStrings.backForwardCacheDisabled)},
|
513
513
|
'RelatedActiveContentsExist': {name: i18nLazyString(UIStrings.relatedActiveContentsExist)},
|
514
514
|
'HTTPStatusNotOK': {name: i18nLazyString(UIStrings.HTTPStatusNotOK)},
|
@@ -165,12 +165,14 @@ const UIStrings = {
|
|
165
165
|
newStyleRule: 'New Style Rule',
|
166
166
|
/**
|
167
167
|
*@description Text that is announced by the screen reader when the user focuses on an input field for entering the name of a CSS property in the Styles panel
|
168
|
+
*@example {margin} PH1
|
168
169
|
*/
|
169
|
-
cssPropertyName: '`CSS` property name',
|
170
|
+
cssPropertyName: '`CSS` property name: {PH1}',
|
170
171
|
/**
|
171
172
|
*@description Text that is announced by the screen reader when the user focuses on an input field for entering the value of a CSS property in the Styles panel
|
173
|
+
*@example {10px} PH1
|
172
174
|
*/
|
173
|
-
cssPropertyValue: '`CSS` property value',
|
175
|
+
cssPropertyValue: '`CSS` property value: {PH1}',
|
174
176
|
/**
|
175
177
|
*@description Text that is announced by the screen reader when the user focuses on an input field for editing the name of a CSS selector in the Styles panel
|
176
178
|
*/
|
@@ -3091,7 +3093,7 @@ export class StylesSidebarPropertyRenderer {
|
|
3091
3093
|
|
3092
3094
|
renderName(): Element {
|
3093
3095
|
const nameElement = document.createElement('span');
|
3094
|
-
UI.ARIAUtils.setAccessibleName(nameElement, i18nString(UIStrings.cssPropertyName));
|
3096
|
+
UI.ARIAUtils.setAccessibleName(nameElement, i18nString(UIStrings.cssPropertyName, {PH1: this.propertyName}));
|
3095
3097
|
nameElement.className = 'webkit-css-property';
|
3096
3098
|
nameElement.textContent = this.propertyName;
|
3097
3099
|
nameElement.normalize();
|
@@ -3100,7 +3102,7 @@ export class StylesSidebarPropertyRenderer {
|
|
3100
3102
|
|
3101
3103
|
renderValue(): Element {
|
3102
3104
|
const valueElement = document.createElement('span');
|
3103
|
-
UI.ARIAUtils.setAccessibleName(valueElement, i18nString(UIStrings.cssPropertyValue));
|
3105
|
+
UI.ARIAUtils.setAccessibleName(valueElement, i18nString(UIStrings.cssPropertyValue, {PH1: this.propertyValue}));
|
3104
3106
|
valueElement.className = 'value';
|
3105
3107
|
if (!this.propertyValue) {
|
3106
3108
|
return valueElement;
|
package/package.json
CHANGED
@@ -59,8 +59,9 @@ function isInChromiumDirectory() {
|
|
59
59
|
}
|
60
60
|
|
61
61
|
const normalizedPath = PATH_TO_EXECUTED_FILE.split(path.sep).join('/');
|
62
|
-
const
|
63
|
-
const
|
62
|
+
const devtoolsPath = 'src/third_party/devtools-frontend';
|
63
|
+
const isInChromium = normalizedPath.includes(devtoolsPath);
|
64
|
+
const potentialChromiumDir = PATH_TO_EXECUTED_FILE.substring(0, PATH_TO_EXECUTED_FILE.indexOf(devtoolsPath));
|
64
65
|
const result = {isInChromium, chromiumDirectory: potentialChromiumDir};
|
65
66
|
_lookUpCaches.set('chromium', result);
|
66
67
|
return result;
|
package/scripts/whitespaces.txt
CHANGED