chrome-devtools-frontend 1.0.939066 → 1.0.940255
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.stylelintrc.json +1 -7
- package/config/gni/all_devtools_files.gni +0 -1
- package/config/gni/devtools_grd_files.gni +2 -0
- package/docs/triage_guidelines.md +13 -11
- package/front_end/Tests.js +33 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -0
- package/front_end/core/host/UserMetrics.ts +72 -0
- package/front_end/core/i18n/locales/en-US.json +22 -7
- package/front_end/core/i18n/locales/en-XL.json +22 -7
- package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
- package/front_end/core/root/Runtime.ts +4 -0
- package/front_end/core/sdk/CSSModel.ts +64 -50
- package/front_end/core/sdk/CategorizedBreakpoint.ts +35 -0
- package/front_end/core/sdk/DOMDebuggerModel.ts +10 -41
- package/front_end/core/sdk/EventBreakpointsModel.ts +178 -0
- package/front_end/core/sdk/Target.ts +2 -1
- package/front_end/core/sdk/sdk.ts +4 -0
- package/front_end/devtools_compatibility.js +5 -0
- package/front_end/entrypoints/main/MainImpl.ts +6 -3
- package/front_end/entrypoints/main/main-meta.ts +1 -2
- package/front_end/entrypoints/shell/shell.js +1 -0
- package/front_end/entrypoints/shell/shell.json +0 -1
- package/front_end/models/logs/LogManager.ts +1 -0
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
- package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
- package/front_end/panels/application/BackForwardCacheView.ts +24 -24
- package/front_end/panels/browser_debugger/CSPViolationBreakpointsSidebarPane.ts +2 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +7 -7
- package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +14 -6
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +6 -8
- package/front_end/panels/css_overview/components/cssOverviewStartView.css +7 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +10 -33
- package/front_end/panels/lighthouse/LighthousePanel.ts +2 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -1
- package/front_end/panels/network/NetworkLogView.ts +13 -0
- package/front_end/panels/network/RequestPayloadView.ts +2 -0
- package/front_end/panels/network/requestPayloadTree.css +5 -0
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
- package/front_end/panels/settings/components/SyncSection.ts +25 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +14 -7
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +1 -1
- package/front_end/ui/components/buttons/Button.ts +11 -0
- package/front_end/ui/components/buttons/button.css +4 -0
- package/front_end/ui/components/docs/button/basic.ts +10 -0
- package/package.json +2 -2
- package/scripts/eslint_rules/lib/check_component_naming.js +1 -1
- package/scripts/eslint_rules/lib/enforce_custom_event_names.js +1 -1
- package/scripts/eslint_rules/lib/l10n_no_i18nString_calls_module_instantiation.js +1 -1
- package/scripts/eslint_rules/lib/no_underscored_properties.js +1 -1
- package/front_end/entrypoints/main/module.json +0 -5
|
@@ -30,6 +30,7 @@ interface ButtonState {
|
|
|
30
30
|
variant?: Variant;
|
|
31
31
|
size?: Size;
|
|
32
32
|
disabled: boolean;
|
|
33
|
+
active: boolean;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
export type ButtonData = {
|
|
@@ -37,11 +38,13 @@ export type ButtonData = {
|
|
|
37
38
|
iconUrl: string,
|
|
38
39
|
size?: Size,
|
|
39
40
|
disabled?: boolean,
|
|
41
|
+
active?: boolean,
|
|
40
42
|
}|{
|
|
41
43
|
variant: Variant.PRIMARY | Variant.SECONDARY,
|
|
42
44
|
iconUrl?: string,
|
|
43
45
|
size?: Size,
|
|
44
46
|
disabled?: boolean,
|
|
47
|
+
active?: boolean,
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
export class Button extends HTMLElement {
|
|
@@ -52,6 +55,7 @@ export class Button extends HTMLElement {
|
|
|
52
55
|
private readonly props: ButtonState = {
|
|
53
56
|
size: Size.MEDIUM,
|
|
54
57
|
disabled: false,
|
|
58
|
+
active: false,
|
|
55
59
|
};
|
|
56
60
|
private isEmpty = true;
|
|
57
61
|
|
|
@@ -69,6 +73,7 @@ export class Button extends HTMLElement {
|
|
|
69
73
|
this.props.variant = data.variant;
|
|
70
74
|
this.props.iconUrl = data.iconUrl;
|
|
71
75
|
this.props.size = data.size || Size.MEDIUM;
|
|
76
|
+
this.props.active = Boolean(data.active);
|
|
72
77
|
this.setDisabledProperty(data.disabled || false);
|
|
73
78
|
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
74
79
|
}
|
|
@@ -93,6 +98,11 @@ export class Button extends HTMLElement {
|
|
|
93
98
|
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
94
99
|
}
|
|
95
100
|
|
|
101
|
+
set active(active: boolean) {
|
|
102
|
+
this.props.active = active;
|
|
103
|
+
ComponentHelpers.ScheduledRender.scheduleRender(this, this.boundRender);
|
|
104
|
+
}
|
|
105
|
+
|
|
96
106
|
private setDisabledProperty(disabled: boolean): void {
|
|
97
107
|
this.props.disabled = disabled;
|
|
98
108
|
this.toggleAttribute('disabled', disabled);
|
|
@@ -140,6 +150,7 @@ export class Button extends HTMLElement {
|
|
|
140
150
|
'text-with-icon': Boolean(this.props.iconUrl) && !this.isEmpty,
|
|
141
151
|
'only-icon': Boolean(this.props.iconUrl) && this.isEmpty,
|
|
142
152
|
small: Boolean(this.props.size === Size.SMALL),
|
|
153
|
+
active: this.props.active,
|
|
143
154
|
};
|
|
144
155
|
// clang-format off
|
|
145
156
|
LitHtml.render(
|
|
@@ -80,6 +80,7 @@ button.primary:hover {
|
|
|
80
80
|
border: 1px solid var(--color-button-primary-background-hovering);
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
button.primary.active,
|
|
83
84
|
button.primary:active {
|
|
84
85
|
background: var(--color-button-primary-background-pressed);
|
|
85
86
|
border: 1px solid var(--color-button-primary-background-pressed);
|
|
@@ -103,6 +104,7 @@ button.secondary:hover {
|
|
|
103
104
|
background: var(--color-button-secondary-background-hovering);
|
|
104
105
|
}
|
|
105
106
|
|
|
107
|
+
button.secondary.active,
|
|
106
108
|
button.secondary:active {
|
|
107
109
|
background: var(--color-button-secondary-background-pressed);
|
|
108
110
|
border: 1px solid var(--color-button-secondary-background-pressed);
|
|
@@ -120,6 +122,7 @@ button.secondary:disabled:hover {
|
|
|
120
122
|
cursor: not-allowed;
|
|
121
123
|
}
|
|
122
124
|
|
|
125
|
+
button.secondary.active:focus-visible,
|
|
123
126
|
button.secondary:active:focus-visible {
|
|
124
127
|
border: 1px solid var(--color-button-secondary-background-pressed);
|
|
125
128
|
}
|
|
@@ -128,6 +131,7 @@ button.toolbar:hover {
|
|
|
128
131
|
background-color: var(--color-button-secondary-background-hovering);
|
|
129
132
|
}
|
|
130
133
|
|
|
134
|
+
button.toolbar.active,
|
|
131
135
|
button.toolbar:active {
|
|
132
136
|
background-color: var(--color-button-secondary-background-pressed);
|
|
133
137
|
}
|
|
@@ -32,6 +32,16 @@ primaryButton.innerText = 'Click me';
|
|
|
32
32
|
primaryButton.onclick = () => alert('clicked');
|
|
33
33
|
appendButton(primaryButton);
|
|
34
34
|
|
|
35
|
+
// Primary (forced active)
|
|
36
|
+
const forcedActive = new Buttons.Button.Button();
|
|
37
|
+
forcedActive.data = {
|
|
38
|
+
variant: Buttons.Button.Variant.PRIMARY,
|
|
39
|
+
active: true,
|
|
40
|
+
};
|
|
41
|
+
forcedActive.innerText = 'Forced active';
|
|
42
|
+
forcedActive.onclick = () => alert('clicked');
|
|
43
|
+
appendButton(forcedActive);
|
|
44
|
+
|
|
35
45
|
// Secondary
|
|
36
46
|
const secondaryButton = new Buttons.Button.Button();
|
|
37
47
|
secondaryButton.innerText = 'Click me';
|
package/package.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"check-external-links": "third_party/node/node.py --output scripts/check_external_links.js",
|
|
32
32
|
"check-gn": "third_party/node/node.py --output scripts/check_gn.js",
|
|
33
33
|
"check-json": "third_party/node/node.py --output scripts/json_validator/validate_module_json.js",
|
|
34
|
-
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.
|
|
34
|
+
"check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.mjs && third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
35
35
|
"check-lint-css": "third_party/node/node.py --output scripts/test/run_lint_check_css.js",
|
|
36
36
|
"collect-strings": "third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
|
|
37
37
|
"components-server": "third_party/node/node.py --output scripts/component_server/server.js",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"unittest": "scripts/test/run_unittests.py --no-text-coverage",
|
|
56
56
|
"watch": "third_party/node/node.py --output scripts/watch_build.js"
|
|
57
57
|
},
|
|
58
|
-
"version": "1.0.
|
|
58
|
+
"version": "1.0.940255"
|
|
59
59
|
}
|
|
@@ -44,7 +44,7 @@ module.exports = {
|
|
|
44
44
|
|
|
45
45
|
function findComponentTagNameFromStaticProperty(classBodyNode) {
|
|
46
46
|
return classBodyNode.body.find(node => {
|
|
47
|
-
return node.type === '
|
|
47
|
+
return node.type === 'PropertyDefinition' && node.key.name === 'litTagName';
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
@@ -73,7 +73,7 @@ module.exports = {
|
|
|
73
73
|
|
|
74
74
|
// If the reference is right, let's find the value of the static eventName property and make sure it is valid.
|
|
75
75
|
const eventNameProperty = node.body.body.find(classBodyPart => {
|
|
76
|
-
return classBodyPart.type === '
|
|
76
|
+
return classBodyPart.type === 'PropertyDefinition' && classBodyPart.key.name === 'eventName';
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
// This should always exist because we checked for its existence
|