chrome-devtools-frontend 1.0.1533544 → 1.0.1534717
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/contributing/infrastructure.md +32 -0
- package/front_end/Images/src/justify-content-stretch.svg +4 -0
- package/front_end/core/host/InspectorFrontendHost.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +33 -29
- package/front_end/core/host/UserMetrics.ts +26 -1
- package/front_end/core/protocol_client/CDPConnection.ts +39 -0
- package/front_end/core/protocol_client/InspectorBackend.ts +0 -98
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +18 -8
- package/front_end/core/sdk/NetworkManager.ts +0 -16
- package/front_end/core/sdk/RehydratingConnection.ts +1 -1
- package/front_end/devtools_compatibility.js +202 -7
- package/front_end/generated/protocol-mapping.d.ts +3 -0
- package/front_end/models/ai_assistance/BuiltInAi.ts +141 -56
- package/front_end/panels/common/BadgeNotification.ts +1 -3
- package/front_end/panels/console/ConsoleInsightTeaser.ts +76 -60
- package/front_end/panels/console/ConsoleViewMessage.ts +4 -2
- package/front_end/panels/console/consoleInsightTeaser.css +4 -0
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/StylePropertyTreeElement.ts +46 -8
- package/front_end/panels/elements/components/CSSPropertyIconResolver.ts +1 -0
- package/front_end/panels/elements/components/StylePropertyEditor.ts +65 -0
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -2
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +10 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +4 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +7 -17
- package/front_end/ui/components/docs/style_property_editor/masonry.html +21 -0
- package/front_end/ui/components/docs/style_property_editor/masonry.ts +50 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +2 -3
- package/front_end/ui/components/text_editor/config.ts +1 -3
- package/front_end/ui/legacy/UIUtils.ts +5 -0
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +1 -1
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/Font.ts +1 -14
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +2 -10
- package/package.json +1 -1
- package/front_end/services/window_bounds/WindowBoundsService.ts +0 -27
- package/front_end/services/window_bounds/window_bounds.ts +0 -9
|
@@ -859,7 +859,7 @@ export class CdpPage extends Page {
|
|
|
859
859
|
}
|
|
860
860
|
const textTokens = [];
|
|
861
861
|
// eslint-disable-next-line max-len -- The comment is long.
|
|
862
|
-
// eslint-disable-next-line
|
|
862
|
+
// eslint-disable-next-line @puppeteer/use-using -- These are not owned by this function.
|
|
863
863
|
for (const arg of args) {
|
|
864
864
|
const remoteObject = arg.remoteObject();
|
|
865
865
|
if (remoteObject.objectId) {
|
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
7
|
import * as Platform from '../../../core/platform/platform.js';
|
|
8
|
-
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
|
9
8
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
10
9
|
import * as RenderCoordinator from '../../../ui/components/render_coordinator/render_coordinator.js';
|
|
11
10
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
12
11
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
12
|
+
import * as UI from '../../legacy/legacy.js';
|
|
13
13
|
import * as Buttons from '../buttons/buttons.js';
|
|
14
14
|
|
|
15
15
|
import dialogStyles from './dialog.css.js';
|
|
@@ -77,10 +77,6 @@ interface DialogData {
|
|
|
77
77
|
*/
|
|
78
78
|
dialogShownCallback: (() => unknown)|null;
|
|
79
79
|
|
|
80
|
-
/**
|
|
81
|
-
* Optional. Service that provides the window dimensions used for positioning the Dialog.
|
|
82
|
-
*/
|
|
83
|
-
windowBoundsService: WindowBoundsService.WindowBoundsService.WindowBoundsService;
|
|
84
80
|
/**
|
|
85
81
|
* Whether the dialog is closed when the 'Escape' key is pressed. When true, the event is
|
|
86
82
|
* propagation is stopped.
|
|
@@ -132,7 +128,6 @@ export class Dialog extends HTMLElement {
|
|
|
132
128
|
horizontalAlignment: DialogHorizontalAlignment.CENTER,
|
|
133
129
|
getConnectorCustomXPosition: null,
|
|
134
130
|
dialogShownCallback: null,
|
|
135
|
-
windowBoundsService: WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance(),
|
|
136
131
|
closeOnESC: true,
|
|
137
132
|
closeOnScroll: true,
|
|
138
133
|
closeButton: false,
|
|
@@ -161,7 +156,7 @@ export class Dialog extends HTMLElement {
|
|
|
161
156
|
this.#forceDialogCloseInDevToolsBound();
|
|
162
157
|
});
|
|
163
158
|
readonly #dialogResizeObserver = new ResizeObserver(this.#updateDialogBounds.bind(this));
|
|
164
|
-
#devToolsBoundingElement =
|
|
159
|
+
#devToolsBoundingElement = UI.UIUtils.getDevToolsBoundingElement();
|
|
165
160
|
|
|
166
161
|
// We bind here because we have to listen to keydowns on the entire window,
|
|
167
162
|
// not on the Dialog element itself. This is because if the user has the
|
|
@@ -204,16 +199,6 @@ export class Dialog extends HTMLElement {
|
|
|
204
199
|
this.#onStateChange();
|
|
205
200
|
}
|
|
206
201
|
|
|
207
|
-
get windowBoundsService(): WindowBoundsService.WindowBoundsService.WindowBoundsService {
|
|
208
|
-
return this.#props.windowBoundsService;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
set windowBoundsService(windowBoundsService: WindowBoundsService.WindowBoundsService.WindowBoundsService) {
|
|
212
|
-
this.#props.windowBoundsService = windowBoundsService;
|
|
213
|
-
this.#devToolsBoundingElement = this.windowBoundsService.getDevToolsBoundingElement();
|
|
214
|
-
this.#onStateChange();
|
|
215
|
-
}
|
|
216
|
-
|
|
217
202
|
get bestVerticalPosition(): DialogVerticalPosition|null {
|
|
218
203
|
return this.#bestVerticalPosition;
|
|
219
204
|
}
|
|
@@ -733,6 +718,11 @@ export class Dialog extends HTMLElement {
|
|
|
733
718
|
VisualLogging.setMappedParent(this.#getDialog(), this.parentElementOrShadowHost() as HTMLElement);
|
|
734
719
|
// clang-format on
|
|
735
720
|
}
|
|
721
|
+
|
|
722
|
+
setBoundingElementForTesting(element: HTMLElement): void {
|
|
723
|
+
this.#devToolsBoundingElement = element;
|
|
724
|
+
this.#onStateChange();
|
|
725
|
+
}
|
|
736
726
|
}
|
|
737
727
|
|
|
738
728
|
customElements.define('devtools-dialog', Dialog);
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright 2025 The Chromium Authors
|
|
3
|
+
Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
found in the LICENSE file.
|
|
5
|
+
-->
|
|
6
|
+
<!DOCTYPE html>
|
|
7
|
+
<head>
|
|
8
|
+
<meta charset="UTF-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width,initial-scale=1" />
|
|
10
|
+
<title>Basic Masonry Editor example</title>
|
|
11
|
+
<style>
|
|
12
|
+
.container {
|
|
13
|
+
font-size: 12px;
|
|
14
|
+
}
|
|
15
|
+
</style>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="container">
|
|
19
|
+
</div>
|
|
20
|
+
<script type="module" src="./masonry.js"></script>
|
|
21
|
+
</body>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// Copyright 2025 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Elements from '../../../../panels/elements/components/components.js';
|
|
6
|
+
import * as FrontendHelpers from '../../../../testing/EnvironmentHelpers.js';
|
|
7
|
+
import * as ComponentHelpers from '../../helpers/helpers.js';
|
|
8
|
+
|
|
9
|
+
await ComponentHelpers.ComponentServerSetup.setup();
|
|
10
|
+
await FrontendHelpers.initializeGlobalVars();
|
|
11
|
+
|
|
12
|
+
const component = new Elements.StylePropertyEditor.MasonryEditor();
|
|
13
|
+
|
|
14
|
+
document.getElementById('container')?.appendChild(component);
|
|
15
|
+
|
|
16
|
+
const computedProperties = new Map([
|
|
17
|
+
['align-content', 'initial'],
|
|
18
|
+
['justify-content', 'normal'],
|
|
19
|
+
['align-items', 'normal'],
|
|
20
|
+
['justify-items', 'normal'],
|
|
21
|
+
]);
|
|
22
|
+
|
|
23
|
+
const originalComputedProperties = new Map(computedProperties);
|
|
24
|
+
|
|
25
|
+
const authoredProperties = new Map([
|
|
26
|
+
['justify-content', 'normal'],
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
component.data = {
|
|
30
|
+
computedProperties,
|
|
31
|
+
authoredProperties,
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
component.addEventListener('propertyselected', (event: Elements.StylePropertyEditor.PropertySelectedEvent) => {
|
|
35
|
+
authoredProperties.set(event.data.name, event.data.value);
|
|
36
|
+
computedProperties.set(event.data.name, event.data.value);
|
|
37
|
+
component.data = {
|
|
38
|
+
computedProperties,
|
|
39
|
+
authoredProperties,
|
|
40
|
+
};
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
component.addEventListener('propertydeselected', (event: Elements.StylePropertyEditor.PropertyDeselectedEvent) => {
|
|
44
|
+
authoredProperties.delete(event.data.name);
|
|
45
|
+
computedProperties.set(event.data.name, originalComputedProperties.get(event.data.name) as string);
|
|
46
|
+
component.data = {
|
|
47
|
+
computedProperties,
|
|
48
|
+
authoredProperties,
|
|
49
|
+
};
|
|
50
|
+
});
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
|
6
|
-
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
|
7
6
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
7
|
+
import * as UI from '../../legacy/legacy.js';
|
|
8
8
|
import * as ThemeSupport from '../../legacy/theme_support/theme_support.js';
|
|
9
9
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
10
10
|
|
|
@@ -166,8 +166,7 @@ export class TextEditor extends HTMLElement {
|
|
|
166
166
|
}
|
|
167
167
|
|
|
168
168
|
#startObservingResize(): void {
|
|
169
|
-
const devtoolsElement =
|
|
170
|
-
WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();
|
|
169
|
+
const devtoolsElement = UI.UIUtils.getDevToolsBoundingElement();
|
|
171
170
|
if (devtoolsElement) {
|
|
172
171
|
this.#devtoolsResizeObserver.observe(devtoolsElement);
|
|
173
172
|
}
|
|
@@ -7,7 +7,6 @@ import * as Common from '../../../core/common/common.js';
|
|
|
7
7
|
import type * as Host from '../../../core/host/host.js';
|
|
8
8
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
9
9
|
import * as TextUtils from '../../../models/text_utils/text_utils.js';
|
|
10
|
-
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
|
11
10
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
12
11
|
import * as UI from '../../legacy/legacy.js';
|
|
13
12
|
import * as VisualLogging from '../../visual_logging/visual_logging.js';
|
|
@@ -343,8 +342,7 @@ let sideBarElement: HTMLElement|null = null;
|
|
|
343
342
|
|
|
344
343
|
function getTooltipSpace(): DOMRect {
|
|
345
344
|
if (!sideBarElement) {
|
|
346
|
-
sideBarElement =
|
|
347
|
-
WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();
|
|
345
|
+
sideBarElement = UI.UIUtils.getDevToolsBoundingElement();
|
|
348
346
|
}
|
|
349
347
|
return sideBarElement.getBoundingClientRect();
|
|
350
348
|
}
|
|
@@ -56,6 +56,7 @@ import confirmDialogStyles from './confirmDialog.css.js';
|
|
|
56
56
|
import {Dialog} from './Dialog.js';
|
|
57
57
|
import {GlassPane, PointerEventsBehavior, SizeBehavior} from './GlassPane.js';
|
|
58
58
|
import inspectorCommonStyles from './inspectorCommon.css.js';
|
|
59
|
+
import {InspectorView} from './InspectorView.js';
|
|
59
60
|
import {KeyboardShortcut, Keys} from './KeyboardShortcut.js';
|
|
60
61
|
import smallBubbleStyles from './smallBubble.css.js';
|
|
61
62
|
import {Tooltip} from './Tooltip.js';
|
|
@@ -2348,3 +2349,7 @@ export function copyTextToClipboard(text: string, alert?: string): void {
|
|
|
2348
2349
|
ARIAUtils.LiveAnnouncer.alert(alert);
|
|
2349
2350
|
}
|
|
2350
2351
|
}
|
|
2352
|
+
|
|
2353
|
+
export function getDevToolsBoundingElement(): HTMLElement {
|
|
2354
|
+
return InspectorView.maybeGetInspectorViewInstance()?.element || document.body;
|
|
2355
|
+
}
|
|
@@ -99,7 +99,7 @@ export class CSSAngle extends HTMLElement {
|
|
|
99
99
|
this.angleElement = this.querySelector<HTMLElement>('.css-angle');
|
|
100
100
|
}
|
|
101
101
|
if (!this.swatchElement) {
|
|
102
|
-
this.swatchElement = this.querySelector
|
|
102
|
+
this.swatchElement = this.querySelector('devtools-css-angle-swatch');
|
|
103
103
|
}
|
|
104
104
|
if (!this.angleElement || !this.swatchElement) {
|
|
105
105
|
return;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/* eslint-disable @devtools/no-imperative-dom-api */
|
|
5
5
|
|
|
6
6
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
|
-
import * as
|
|
7
|
+
import * as UI from '../../legacy.js';
|
|
8
8
|
import * as ThemeSupport from '../../theme_support/theme_support.js';
|
|
9
9
|
|
|
10
10
|
import type {FlameChart} from './FlameChart.js';
|
|
@@ -124,7 +124,7 @@ export class BrickBreaker extends HTMLElement {
|
|
|
124
124
|
#keyPressHandlerBound = this.#keyPressHandler.bind(this);
|
|
125
125
|
#closeGameBound = this.#closeGame.bind(this);
|
|
126
126
|
#mouseMoveHandlerBound = this.#mouseMoveHandler.bind(this);
|
|
127
|
-
#boundingElement =
|
|
127
|
+
#boundingElement = UI.UIUtils.getDevToolsBoundingElement();
|
|
128
128
|
// Value by which we moved the game up relative to the viewport
|
|
129
129
|
#gameViewportOffset = 0;
|
|
130
130
|
#running = false;
|
|
@@ -3,8 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
import * as Host from '../../../../core/host/host.js';
|
|
5
5
|
|
|
6
|
-
let fontFamily: string|null = null;
|
|
7
|
-
|
|
8
6
|
/**
|
|
9
7
|
* Because we run our UI in a couple of contexts (actual app & test
|
|
10
8
|
* environments) and on multiple platforms, the font is not consistent, so this
|
|
@@ -19,18 +17,7 @@ let fontFamily: string|null = null;
|
|
|
19
17
|
* to ensure that the screenshot tests are consistent.
|
|
20
18
|
**/
|
|
21
19
|
export function getFontFamilyForCanvas(): string {
|
|
22
|
-
|
|
23
|
-
return fontFamily;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
const bodyStyles = getComputedStyle(document.body);
|
|
27
|
-
if (bodyStyles.fontFamily) {
|
|
28
|
-
fontFamily = bodyStyles.fontFamily;
|
|
29
|
-
} else {
|
|
30
|
-
fontFamily = Host.Platform.fontFamily();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
return fontFamily;
|
|
20
|
+
return Host.Platform.fontFamily();
|
|
34
21
|
}
|
|
35
22
|
|
|
36
23
|
export const DEFAULT_FONT_SIZE = '11px';
|
|
@@ -356,11 +356,13 @@ export const knownContextValues = new Set([
|
|
|
356
356
|
'ai_assistance',
|
|
357
357
|
'align-content',
|
|
358
358
|
'align-content-center',
|
|
359
|
+
'align-content-end',
|
|
359
360
|
'align-content-flex-end',
|
|
360
361
|
'align-content-flex-start',
|
|
361
362
|
'align-content-space-around',
|
|
362
363
|
'align-content-space-between',
|
|
363
364
|
'align-content-space-evenly',
|
|
365
|
+
'align-content-start',
|
|
364
366
|
'align-content-stretch',
|
|
365
367
|
'align-items',
|
|
366
368
|
'align-items-baseline',
|
|
@@ -1994,6 +1996,7 @@ export const knownContextValues = new Set([
|
|
|
1994
1996
|
'justify-content-space-between',
|
|
1995
1997
|
'justify-content-space-evenly',
|
|
1996
1998
|
'justify-content-start',
|
|
1999
|
+
'justify-content-stretch',
|
|
1997
2000
|
'justify-items',
|
|
1998
2001
|
'justify-items-center',
|
|
1999
2002
|
'justify-items-end',
|
|
@@ -217,11 +217,7 @@ export function drawGridLineNamesAndAssertLabels(
|
|
|
217
217
|
|
|
218
218
|
for (const expected of expectedLabels) {
|
|
219
219
|
const foundLabel = foundLabels.find(({textContent}) => textContent === expected.textContent);
|
|
220
|
-
|
|
221
|
-
if (!foundLabel) {
|
|
222
|
-
assert.fail(`Expected line name label with text content ${expected.textContent} not found`);
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
220
|
+
assert.exists(foundLabel, `Expected line name label with text content ${expected.textContent} not found`);
|
|
225
221
|
|
|
226
222
|
if (expected.type === 'column' && typeof expected.x !== 'undefined') {
|
|
227
223
|
assert.closeTo(
|
|
@@ -256,11 +252,7 @@ export function drawGridAreaNamesAndAssertLabels(
|
|
|
256
252
|
});
|
|
257
253
|
for (const expected of expectedLabels) {
|
|
258
254
|
const foundLabel = foundLabels.find(({textContent}) => textContent === expected.textContent);
|
|
259
|
-
|
|
260
|
-
if (!foundLabel) {
|
|
261
|
-
assert.fail(`Expected area label with text content ${expected.textContent} not found`);
|
|
262
|
-
return;
|
|
263
|
-
}
|
|
255
|
+
assert.exists(foundLabel, `Expected area label with text content ${expected.textContent} not found`);
|
|
264
256
|
|
|
265
257
|
if (typeof expected.left !== 'undefined') {
|
|
266
258
|
assert.strictEqual(
|
package/package.json
CHANGED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
// Copyright 2021 The Chromium Authors
|
|
2
|
-
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
-
// found in the LICENSE file.
|
|
4
|
-
|
|
5
|
-
import * as Legacy from '../../ui/legacy/legacy.js';
|
|
6
|
-
|
|
7
|
-
export interface WindowBoundsService {
|
|
8
|
-
getDevToolsBoundingElement(): HTMLElement;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let windowBoundsServiceImplInstance: WindowBoundsServiceImpl;
|
|
12
|
-
export class WindowBoundsServiceImpl implements WindowBoundsService {
|
|
13
|
-
static instance(opts: {
|
|
14
|
-
forceNew: boolean|null,
|
|
15
|
-
} = {forceNew: null}): WindowBoundsServiceImpl {
|
|
16
|
-
const {forceNew} = opts;
|
|
17
|
-
if (!windowBoundsServiceImplInstance || forceNew) {
|
|
18
|
-
windowBoundsServiceImplInstance = new WindowBoundsServiceImpl();
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return windowBoundsServiceImplInstance;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getDevToolsBoundingElement(): HTMLElement {
|
|
25
|
-
return Legacy.InspectorView.InspectorView.maybeGetInspectorViewInstance()?.element || document.body;
|
|
26
|
-
}
|
|
27
|
-
}
|