chrome-devtools-frontend 1.0.921086 → 1.0.922671
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 +2 -0
- package/front_end/core/common/ColorUtils.ts +2 -1
- package/front_end/core/common/Object.ts +36 -1
- package/front_end/core/common/Settings.ts +8 -1
- 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 +3 -0
- package/front_end/core/i18n/locales/en-XL.json +3 -0
- 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/FrameManager.ts +2 -2
- package/front_end/core/sdk/RemoteObject.ts +43 -20
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +1 -1
- package/front_end/entrypoints/js_app/JsMain.ts +1 -1
- package/front_end/entrypoints/node_main/NodeMain.ts +1 -1
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/legacy/legacy-defs.d.ts +9 -0
- package/front_end/models/emulation/DeviceModeModel.ts +1 -1
- package/front_end/models/extensions/ExtensionAPI.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +4 -1
- 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 +8 -7
- package/front_end/panels/application/DatabaseQueryView.ts +7 -1
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +6 -1
- package/front_end/panels/console/ConsolePrompt.ts +6 -1
- package/front_end/panels/console/ConsoleSidebar.ts +5 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -2
- package/front_end/panels/coverage/CoverageView.ts +5 -4
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +59 -48
- package/front_end/panels/css_overview/CSSOverviewController.ts +48 -8
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +8 -1
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +14 -12
- package/front_end/panels/elements/ElementsPanel.ts +10 -8
- package/front_end/panels/elements/ElementsTreeOutline.ts +8 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +12 -2
- 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/layer_viewer/LayerDetailsView.ts +7 -1
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +4 -4
- package/front_end/panels/layer_viewer/Layers3DView.ts +7 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +7 -1
- package/front_end/panels/layers/LayersPanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +1 -2
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +4 -0
- package/front_end/panels/network/NetworkDataGridNode.ts +46 -104
- package/front_end/panels/network/NetworkItemView.ts +2 -6
- package/front_end/panels/network/NetworkLogView.ts +4 -4
- package/front_end/panels/network/NetworkPanel.ts +12 -18
- package/front_end/panels/network/RequestTimingView.ts +3 -1
- package/front_end/panels/network/module.json +0 -3
- package/front_end/panels/profiler/CPUProfileFlameChart.ts +26 -11
- package/front_end/panels/profiler/HeapProfileView.ts +5 -6
- package/front_end/panels/profiler/HeapSnapshotView.ts +6 -6
- package/front_end/panels/profiler/HeapTimelineOverview.ts +17 -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/settings/SettingsScreen.ts +2 -2
- package/front_end/panels/sources/CSSPlugin.ts +6 -6
- package/front_end/panels/sources/DebuggerPlugin.ts +4 -5
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +7 -5
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +5 -5
- package/front_end/panels/sources/OutlineQuickOpen.ts +7 -2
- package/front_end/panels/sources/ScriptFormatterEditorAction.ts +5 -6
- package/front_end/panels/sources/SourcesPanel.ts +2 -2
- package/front_end/panels/sources/SourcesView.ts +16 -3
- package/front_end/panels/sources/TabbedEditorContainer.ts +8 -13
- package/front_end/panels/sources/UISourceCodeFrame.ts +7 -1
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -7
- package/front_end/panels/timeline/TimelineDetailsView.ts +1 -1
- 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 +2 -1
- package/front_end/panels/timeline/TimelineTreeView.ts +6 -1
- package/front_end/ui/components/docs/toggle_fonts.ts +28 -1
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +4 -5
- package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +14 -5
- package/front_end/ui/legacy/Dialog.ts +12 -2
- package/front_end/ui/legacy/FilterBar.ts +12 -8
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SplitWidget.ts +6 -1
- package/front_end/ui/legacy/TabbedPane.ts +9 -1
- package/front_end/ui/legacy/TextEditor.ts +12 -1
- package/front_end/ui/legacy/Treeoutline.ts +19 -11
- package/front_end/ui/legacy/ViewManager.ts +8 -7
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/BezierEditor.ts +6 -1
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +7 -1
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +12 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +19 -71
- 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/OverviewGrid.ts +13 -3
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewPane.ts +14 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -4
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +13 -3
- package/front_end/ui/legacy/components/quick_open/QuickInput.ts +4 -5
- package/front_end/ui/legacy/components/quick_open/QuickPick.ts +4 -5
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +29 -19
- package/front_end/ui/legacy/components/source_frame/SourcesTextEditor.ts +18 -2
- package/front_end/ui/legacy/components/text_editor/CodeMirrorTextEditor.ts +3 -1
- package/front_end/ui/legacy/splitWidget.css +2 -2
- package/inspector_overlay/common.ts +3 -3
- package/inspector_overlay/tool_viewport_size.ts +1 -1
- package/package.json +1 -1
- package/scripts/build/generate_css_js_files.js +1 -0
|
@@ -1294,7 +1294,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1294
1294
|
{value: toIndex},
|
|
1295
1295
|
{value: ArrayGroupingTreeElement.bucketThreshold},
|
|
1296
1296
|
{value: ArrayGroupingTreeElement.sparseIterationThreshold},
|
|
1297
|
-
{value: ArrayGroupingTreeElement.getOwnPropertyNamesThreshold},
|
|
1298
1297
|
]);
|
|
1299
1298
|
|
|
1300
1299
|
await callback(jsonValue);
|
|
@@ -1303,22 +1302,19 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1303
1302
|
* Note: must declare params as optional.
|
|
1304
1303
|
*/
|
|
1305
1304
|
function packRanges(
|
|
1306
|
-
this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
|
|
1307
|
-
|
|
1305
|
+
this: Object, fromIndex?: number, toIndex?: number, bucketThreshold?: number,
|
|
1306
|
+
sparseIterationThreshold?: number): {
|
|
1308
1307
|
ranges: number[][],
|
|
1309
|
-
skipGetOwnPropertyNames: boolean,
|
|
1310
1308
|
}|undefined {
|
|
1311
1309
|
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined ||
|
|
1312
|
-
|
|
1310
|
+
bucketThreshold === undefined) {
|
|
1313
1311
|
return;
|
|
1314
1312
|
}
|
|
1315
1313
|
let ownPropertyNames: string[]|null = null;
|
|
1316
1314
|
const consecutiveRange = (toIndex - fromIndex >= sparseIterationThreshold) && ArrayBuffer.isView(this);
|
|
1317
|
-
const skipGetOwnPropertyNames = consecutiveRange && (toIndex - fromIndex >= getOwnPropertyNamesThreshold);
|
|
1318
1315
|
|
|
1319
1316
|
function* arrayIndexes(object: Object): Generator<number, void, unknown> {
|
|
1320
|
-
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined
|
|
1321
|
-
getOwnPropertyNamesThreshold === undefined) {
|
|
1317
|
+
if (fromIndex === undefined || toIndex === undefined || sparseIterationThreshold === undefined) {
|
|
1322
1318
|
return;
|
|
1323
1319
|
}
|
|
1324
1320
|
|
|
@@ -1388,13 +1384,10 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1388
1384
|
}
|
|
1389
1385
|
}
|
|
1390
1386
|
|
|
1391
|
-
return {ranges: ranges
|
|
1387
|
+
return {ranges: ranges};
|
|
1392
1388
|
}
|
|
1393
1389
|
|
|
1394
|
-
async function callback(result: {
|
|
1395
|
-
ranges: Array<Array<number>>,
|
|
1396
|
-
skipGetOwnPropertyNames: boolean,
|
|
1397
|
-
}|undefined): Promise<void> {
|
|
1390
|
+
async function callback(result: {ranges: Array<Array<number>>}|undefined): Promise<void> {
|
|
1398
1391
|
if (!result) {
|
|
1399
1392
|
return;
|
|
1400
1393
|
}
|
|
@@ -1420,8 +1413,7 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1420
1413
|
if (topLevel) {
|
|
1421
1414
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1422
1415
|
// @ts-ignore
|
|
1423
|
-
await ArrayGroupingTreeElement.populateNonIndexProperties(
|
|
1424
|
-
treeNode, object, result.skipGetOwnPropertyNames, linkifier);
|
|
1416
|
+
await ArrayGroupingTreeElement.populateNonIndexProperties(treeNode, object, linkifier);
|
|
1425
1417
|
}
|
|
1426
1418
|
}
|
|
1427
1419
|
}
|
|
@@ -1489,57 +1481,14 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1489
1481
|
|
|
1490
1482
|
private static async populateNonIndexProperties(
|
|
1491
1483
|
this: ArrayGroupingTreeElement, treeNode: UI.TreeOutline.TreeElement, object: SDK.RemoteObject.RemoteObject,
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
const result = await object.callFunction(buildObjectFragment, [{value: skipGetOwnPropertyNames}]);
|
|
1497
|
-
if (!result.object || result.wasThrown) {
|
|
1498
|
-
return;
|
|
1499
|
-
}
|
|
1500
|
-
const allProperties = await result.object.getOwnProperties(true /* generatePreview */);
|
|
1501
|
-
result.object.release();
|
|
1502
|
-
if (!allProperties.properties) {
|
|
1484
|
+
linkifier?: Components.Linkifier.Linkifier): Promise<void> {
|
|
1485
|
+
const {properties, internalProperties} = await SDK.RemoteObject.RemoteObject.loadFromObjectPerProto(
|
|
1486
|
+
object, true /* generatePreview */, true /* nonIndexedPropertiesOnly */);
|
|
1487
|
+
if (!properties) {
|
|
1503
1488
|
return;
|
|
1504
1489
|
}
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
for (const property of properties) {
|
|
1508
|
-
parentMap.set(property, this.object);
|
|
1509
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1510
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1511
|
-
if (!ObjectPropertiesSection.isDisplayableProperty(property, (treeNode as any).property)) {
|
|
1512
|
-
continue;
|
|
1513
|
-
}
|
|
1514
|
-
const childTreeElement = new ObjectPropertyTreeElement(property, linkifier);
|
|
1515
|
-
childTreeElement.readOnly = true;
|
|
1516
|
-
treeNode.appendChild(childTreeElement);
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
function buildObjectFragment(this: Object, skipGetOwnPropertyNames?: boolean): {
|
|
1520
|
-
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
1521
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/naming-convention
|
|
1522
|
-
__proto__: any,
|
|
1523
|
-
} {
|
|
1524
|
-
// @ts-ignore __proto__ exists on Object.
|
|
1525
|
-
const result = {__proto__: this.__proto__};
|
|
1526
|
-
if (skipGetOwnPropertyNames) {
|
|
1527
|
-
return result;
|
|
1528
|
-
}
|
|
1529
|
-
const names = Object.getOwnPropertyNames(this);
|
|
1530
|
-
for (let i = 0; i < names.length; ++i) {
|
|
1531
|
-
const name = names[i];
|
|
1532
|
-
// Array index check according to the ES5-15.4.
|
|
1533
|
-
if (String(Number(name) >>> 0) === name && Number(name) >>> 0 !== 0xffffffff) {
|
|
1534
|
-
continue;
|
|
1535
|
-
}
|
|
1536
|
-
const descriptor = Object.getOwnPropertyDescriptor(this, name);
|
|
1537
|
-
if (descriptor) {
|
|
1538
|
-
Object.defineProperty(result, name, descriptor);
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
return result;
|
|
1542
|
-
}
|
|
1490
|
+
ObjectPropertyTreeElement.populateWithProperties(
|
|
1491
|
+
treeNode, properties, internalProperties, false, false, object, linkifier);
|
|
1543
1492
|
}
|
|
1544
1493
|
|
|
1545
1494
|
async onpopulate(): Promise<void> {
|
|
@@ -1559,7 +1508,6 @@ export class ArrayGroupingTreeElement extends UI.TreeOutline.TreeElement {
|
|
|
1559
1508
|
|
|
1560
1509
|
private static bucketThreshold = 100;
|
|
1561
1510
|
private static sparseIterationThreshold = 250000;
|
|
1562
|
-
private static getOwnPropertyNamesThreshold = 500000;
|
|
1563
1511
|
}
|
|
1564
1512
|
|
|
1565
1513
|
export class ObjectPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
@@ -1599,20 +1547,20 @@ export class ObjectPropertiesSectionsTreeExpandController {
|
|
|
1599
1547
|
}
|
|
1600
1548
|
}
|
|
1601
1549
|
|
|
1602
|
-
private elementAttached(event: Common.EventTarget.EventTargetEvent): void {
|
|
1603
|
-
const element =
|
|
1550
|
+
private elementAttached(event: Common.EventTarget.EventTargetEvent<UI.TreeOutline.TreeElement>): void {
|
|
1551
|
+
const element = event.data;
|
|
1604
1552
|
if (element.isExpandable() && this.expandedProperties.has(this.propertyPath(element))) {
|
|
1605
1553
|
element.expand();
|
|
1606
1554
|
}
|
|
1607
1555
|
}
|
|
1608
1556
|
|
|
1609
|
-
private elementExpanded(event: Common.EventTarget.EventTargetEvent): void {
|
|
1610
|
-
const element =
|
|
1557
|
+
private elementExpanded(event: Common.EventTarget.EventTargetEvent<UI.TreeOutline.TreeElement>): void {
|
|
1558
|
+
const element = event.data;
|
|
1611
1559
|
this.expandedProperties.add(this.propertyPath(element));
|
|
1612
1560
|
}
|
|
1613
1561
|
|
|
1614
|
-
private elementCollapsed(event: Common.EventTarget.EventTargetEvent): void {
|
|
1615
|
-
const element =
|
|
1562
|
+
private elementCollapsed(event: Common.EventTarget.EventTargetEvent<UI.TreeOutline.TreeElement>): void {
|
|
1563
|
+
const element = event.data;
|
|
1616
1564
|
this.expandedProperties.delete(this.propertyPath(element));
|
|
1617
1565
|
}
|
|
1618
1566
|
|
|
@@ -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 Host from '../../../../core/host/host.js';
|
|
6
7
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
7
8
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
@@ -33,7 +34,7 @@ const UIStrings = {
|
|
|
33
34
|
};
|
|
34
35
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/perf_ui/FilmStripView.ts', UIStrings);
|
|
35
36
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
36
|
-
export class FilmStripView extends UI.Widget.HBox {
|
|
37
|
+
export class FilmStripView extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.HBox>(UI.Widget.HBox) {
|
|
37
38
|
private statusLabel: HTMLElement;
|
|
38
39
|
private zeroTime!: number;
|
|
39
40
|
private spanTime!: number;
|
|
@@ -195,6 +196,12 @@ export enum Events {
|
|
|
195
196
|
FrameExit = 'FrameExit',
|
|
196
197
|
}
|
|
197
198
|
|
|
199
|
+
export type EventTypes = {
|
|
200
|
+
[Events.FrameSelected]: number,
|
|
201
|
+
[Events.FrameEnter]: number,
|
|
202
|
+
[Events.FrameExit]: number,
|
|
203
|
+
};
|
|
204
|
+
|
|
198
205
|
export const Modes = {
|
|
199
206
|
TimeBased: 'TimeBased',
|
|
200
207
|
FrameBased: 'FrameBased',
|
|
@@ -85,7 +85,8 @@ interface GroupExpansionState {
|
|
|
85
85
|
[key: string]: boolean;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export class FlameChart extends UI.Widget.VBox
|
|
88
|
+
export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
89
|
+
implements Calculator, ChartViewportDelegate {
|
|
89
90
|
private readonly groupExpansionSetting?: Common.Settings.Setting<GroupExpansionState>;
|
|
90
91
|
private groupExpansionState: GroupExpansionState;
|
|
91
92
|
private readonly flameChartDelegate: FlameChartDelegate;
|
|
@@ -2321,6 +2322,13 @@ export enum Events {
|
|
|
2321
2322
|
EntryHighlighted = 'EntryHighlighted',
|
|
2322
2323
|
}
|
|
2323
2324
|
|
|
2325
|
+
export type EventTypes = {
|
|
2326
|
+
[Events.CanvasFocused]: number|void,
|
|
2327
|
+
[Events.EntryInvoked]: number,
|
|
2328
|
+
[Events.EntrySelected]: number,
|
|
2329
|
+
[Events.EntryHighlighted]: number,
|
|
2330
|
+
};
|
|
2331
|
+
|
|
2324
2332
|
export const Colors = {
|
|
2325
2333
|
SelectedGroupBackground: 'hsl(215, 85%, 98%)',
|
|
2326
2334
|
SelectedGroupBorder: 'hsl(216, 68%, 54%)',
|
|
@@ -417,11 +417,10 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper {
|
|
|
417
417
|
this.windowLeft = windowLeft;
|
|
418
418
|
this.windowRight = windowRight;
|
|
419
419
|
this.updateCurtains();
|
|
420
|
-
let windowPosition;
|
|
421
420
|
if (this.calculator) {
|
|
422
|
-
|
|
421
|
+
this.dispatchEventToListeners(Events.WindowChangedWithPosition, this.calculateWindowPosition());
|
|
423
422
|
}
|
|
424
|
-
this.dispatchEventToListeners(Events.WindowChanged
|
|
423
|
+
this.dispatchEventToListeners(Events.WindowChanged);
|
|
425
424
|
}
|
|
426
425
|
|
|
427
426
|
private updateCurtains(): void {
|
|
@@ -523,8 +522,19 @@ export class Window extends Common.ObjectWrapper.ObjectWrapper {
|
|
|
523
522
|
// eslint-disable-next-line rulesdir/const_enum
|
|
524
523
|
export enum Events {
|
|
525
524
|
WindowChanged = 'WindowChanged',
|
|
525
|
+
WindowChangedWithPosition = 'WindowChangedWithPosition',
|
|
526
526
|
}
|
|
527
527
|
|
|
528
|
+
export interface WindowChangedWithPositionEvent {
|
|
529
|
+
rawStartValue: number;
|
|
530
|
+
rawEndValue: number;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export type EventTypes = {
|
|
534
|
+
[Events.WindowChanged]: void,
|
|
535
|
+
[Events.WindowChangedWithPosition]: WindowChangedWithPositionEvent,
|
|
536
|
+
};
|
|
537
|
+
|
|
528
538
|
export class WindowSelector {
|
|
529
539
|
private startPosition: number;
|
|
530
540
|
private width: number;
|
|
@@ -33,10 +33,12 @@ import type * as SDK from '../../../../core/sdk/sdk.js';
|
|
|
33
33
|
import * as UI from '../../legacy.js';
|
|
34
34
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
35
35
|
|
|
36
|
+
import type {WindowChangedWithPositionEvent} from './OverviewGrid.js';
|
|
36
37
|
import {Events as OverviewGridEvents, OverviewGrid} from './OverviewGrid.js';
|
|
37
38
|
import type {Calculator} from './TimelineGrid.js';
|
|
38
39
|
|
|
39
|
-
export class TimelineOverviewPane extends UI.Widget.VBox
|
|
40
|
+
export class TimelineOverviewPane extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
41
|
+
UI.Widget.VBox) {
|
|
40
42
|
private readonly overviewCalculator: TimelineOverviewCalculator;
|
|
41
43
|
private readonly overviewGrid: OverviewGrid;
|
|
42
44
|
private readonly cursorArea: HTMLElement;
|
|
@@ -65,7 +67,7 @@ export class TimelineOverviewPane extends UI.Widget.VBox {
|
|
|
65
67
|
this.cursorArea.addEventListener('mouseleave', this.hideCursor.bind(this), true);
|
|
66
68
|
|
|
67
69
|
this.overviewGrid.setResizeEnabled(false);
|
|
68
|
-
this.overviewGrid.addEventListener(OverviewGridEvents.
|
|
70
|
+
this.overviewGrid.addEventListener(OverviewGridEvents.WindowChangedWithPosition, this.onWindowChanged, this);
|
|
69
71
|
this.overviewGrid.setClickHandler(this.onClick.bind(this));
|
|
70
72
|
this.overviewControls = [];
|
|
71
73
|
this.markers = new Map();
|
|
@@ -208,7 +210,7 @@ export class TimelineOverviewPane extends UI.Widget.VBox {
|
|
|
208
210
|
return this.overviewControls.some(control => control.onClick(event));
|
|
209
211
|
}
|
|
210
212
|
|
|
211
|
-
private onWindowChanged(event: Common.EventTarget.EventTargetEvent): void {
|
|
213
|
+
private onWindowChanged(event: Common.EventTarget.EventTargetEvent<WindowChangedWithPositionEvent>): void {
|
|
212
214
|
if (this.muteOnWindowChanged) {
|
|
213
215
|
return;
|
|
214
216
|
}
|
|
@@ -255,6 +257,15 @@ export enum Events {
|
|
|
255
257
|
WindowChanged = 'WindowChanged',
|
|
256
258
|
}
|
|
257
259
|
|
|
260
|
+
export interface WindowChangedEvent {
|
|
261
|
+
startTime: number;
|
|
262
|
+
endTime: number;
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
export type EventTypes = {
|
|
266
|
+
[Events.WindowChanged]: WindowChangedEvent,
|
|
267
|
+
};
|
|
268
|
+
|
|
258
269
|
export class TimelineOverviewCalculator implements Calculator {
|
|
259
270
|
private minimumBoundaryInternal!: number;
|
|
260
271
|
private maximumBoundaryInternal!: number;
|
|
@@ -271,14 +271,21 @@ export class CommandMenuProvider extends Provider {
|
|
|
271
271
|
|
|
272
272
|
renderItem(itemIndex: number, query: string, titleElement: Element, subtitleElement: Element): void {
|
|
273
273
|
const command = this.commands[itemIndex];
|
|
274
|
+
|
|
274
275
|
titleElement.removeChildren();
|
|
275
|
-
const tagElement = (titleElement.createChild('span', 'tag') as HTMLElement);
|
|
276
|
-
const index = Platform.StringUtilities.hashCode(command.category()) % MaterialPaletteColors.length;
|
|
277
|
-
tagElement.style.backgroundColor = MaterialPaletteColors[index];
|
|
278
|
-
tagElement.textContent = command.category();
|
|
279
276
|
UI.UIUtils.createTextChild(titleElement, command.title());
|
|
280
277
|
FilteredListWidget.highlightRanges(titleElement, query, true);
|
|
278
|
+
|
|
281
279
|
subtitleElement.textContent = command.shortcut();
|
|
280
|
+
|
|
281
|
+
const tagElement = (titleElement.parentElement?.parentElement?.createChild('span', 'tag') as HTMLElement);
|
|
282
|
+
if (!tagElement) {
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
const index = Platform.StringUtilities.hashCode(command.category()) % MaterialPaletteColors.length;
|
|
286
|
+
tagElement.style.backgroundColor = MaterialPaletteColors[index];
|
|
287
|
+
tagElement.style.color = 'var(--color-background)';
|
|
288
|
+
tagElement.textContent = command.category();
|
|
282
289
|
}
|
|
283
290
|
|
|
284
291
|
selectItem(itemIndex: number|null, _promptValue: string): void {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration)
|
|
6
6
|
/* eslint-disable-next-line @typescript-eslint/no-explicit-any */
|
|
7
7
|
|
|
8
|
+
import * as Common from '../../../../core/common/common.js';
|
|
8
9
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
9
10
|
import * as Platform from '../../../../core/platform/platform.js';
|
|
10
11
|
import * as TextUtils from '../../../../models/text_utils/text_utils.js';
|
|
@@ -28,7 +29,8 @@ const UIStrings = {
|
|
|
28
29
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/quick_open/FilteredListWidget.ts', UIStrings);
|
|
29
30
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
30
31
|
|
|
31
|
-
export class FilteredListWidget extends
|
|
32
|
+
export class FilteredListWidget extends Common.ObjectWrapper.eventMixin<EventTypes, typeof UI.Widget.VBox>(
|
|
33
|
+
UI.Widget.VBox) implements UI.ListControl.ListDelegate<number> {
|
|
32
34
|
private promptHistory: string[];
|
|
33
35
|
private scoringTimer: number;
|
|
34
36
|
private filterTimer: number;
|
|
@@ -160,8 +162,8 @@ export class FilteredListWidget extends UI.Widget.VBox implements UI.ListControl
|
|
|
160
162
|
this.dialog.contentElement.style.setProperty('border-radius', '4px');
|
|
161
163
|
this.show(this.dialog.contentElement);
|
|
162
164
|
UI.ARIAUtils.setExpanded(this.contentElement, true);
|
|
163
|
-
this.dialog.once(
|
|
164
|
-
this.dispatchEventToListeners(
|
|
165
|
+
this.dialog.once(UI.Dialog.Events.Hidden).then(() => {
|
|
166
|
+
this.dispatchEventToListeners(Events.Hidden);
|
|
165
167
|
});
|
|
166
168
|
// @ts-ignore
|
|
167
169
|
this.dialog.show();
|
|
@@ -529,6 +531,14 @@ export class FilteredListWidget extends UI.Widget.VBox implements UI.ListControl
|
|
|
529
531
|
}
|
|
530
532
|
}
|
|
531
533
|
|
|
534
|
+
export const enum Events {
|
|
535
|
+
Hidden = 'hidden',
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export type EventTypes = {
|
|
539
|
+
[Events.Hidden]: void,
|
|
540
|
+
};
|
|
541
|
+
|
|
532
542
|
export class Provider {
|
|
533
543
|
private refreshCallback!: () => void;
|
|
534
544
|
constructor() {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../../../core/i18n/i18n.js';
|
|
6
6
|
|
|
7
|
-
import {FilteredListWidget, Provider} from './FilteredListWidget.js';
|
|
7
|
+
import {Events as FilteredListWidgetEvents, FilteredListWidget, Provider} from './FilteredListWidget.js';
|
|
8
8
|
|
|
9
9
|
const UIStrings = {
|
|
10
10
|
/**
|
|
@@ -27,9 +27,8 @@ export class QuickInput {
|
|
|
27
27
|
throw new ReferenceError('Instance type not implemented.');
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
static show(options: QuickInputOptions): Promise<string|
|
|
31
|
-
let canceledPromise
|
|
32
|
-
new Promise<undefined>(_r => {}); // Intentionally creates an unresolved promise
|
|
30
|
+
static show(options: QuickInputOptions): Promise<string|void> {
|
|
31
|
+
let canceledPromise = new Promise<void>(_r => {}); // Intentionally creates an unresolved promise
|
|
33
32
|
const fulfilledPromise = new Promise<string>(resolve => {
|
|
34
33
|
const provider = new QuickInputProvider(options, resolve);
|
|
35
34
|
const widget = new FilteredListWidget(provider);
|
|
@@ -40,7 +39,7 @@ export class QuickInput {
|
|
|
40
39
|
|
|
41
40
|
widget.setPromptTitle(options.placeHolder || options.prompt);
|
|
42
41
|
widget.showAsDialog(options.prompt);
|
|
43
|
-
canceledPromise =
|
|
42
|
+
canceledPromise = widget.once(FilteredListWidgetEvents.Hidden);
|
|
44
43
|
|
|
45
44
|
widget.setQuery(options.value || '');
|
|
46
45
|
if (options.valueSelection) {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Diff from '../../../../third_party/diff/diff.js';
|
|
6
6
|
import * as UI from '../../legacy.js';
|
|
7
|
-
import {FilteredListWidget, Provider} from './FilteredListWidget.js';
|
|
7
|
+
import {Events as FilteredListWidgetEvents, FilteredListWidget, Provider} from './FilteredListWidget.js';
|
|
8
8
|
export interface QuickPickItem {
|
|
9
9
|
label: string;
|
|
10
10
|
description?: string;
|
|
@@ -21,9 +21,8 @@ export class QuickPick {
|
|
|
21
21
|
throw new ReferenceError('Instance type not implemented.');
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
static show(items: QuickPickItem[], options: QuickPickOptions): Promise<QuickPickItem|
|
|
25
|
-
let canceledPromise
|
|
26
|
-
new Promise<undefined>(_r => {}); // Intentionally creates an unresolved promise
|
|
24
|
+
static show(items: QuickPickItem[], options: QuickPickOptions): Promise<QuickPickItem|void> {
|
|
25
|
+
let canceledPromise = new Promise<void>(_r => {}); // Intentionally creates an unresolved promise
|
|
27
26
|
const fulfilledPromise = new Promise<QuickPickItem>(resolve => {
|
|
28
27
|
const provider =
|
|
29
28
|
new QuickPickProvider(items, resolve, options.matchOnDescription ? 0.5 : 0, options.matchOnDetail ? 0.25 : 0);
|
|
@@ -31,7 +30,7 @@ export class QuickPick {
|
|
|
31
30
|
widget.setHintElement(options.placeHolder);
|
|
32
31
|
widget.setPromptTitle(options.placeHolder);
|
|
33
32
|
widget.showAsDialog(options.placeHolder);
|
|
34
|
-
canceledPromise =
|
|
33
|
+
canceledPromise = widget.once(FilteredListWidgetEvents.Hidden);
|
|
35
34
|
widget.setQuery('');
|
|
36
35
|
});
|
|
37
36
|
|
|
@@ -75,10 +75,12 @@
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
.filtered-list-widget-item-wrapper {
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
color: var(--color-text-primary);
|
|
79
|
+
display: flex;
|
|
80
80
|
border-bottom: 1px solid var(--color-details-hairline-light);
|
|
81
|
+
font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande', sans-serif;
|
|
81
82
|
padding-left: 8px;
|
|
83
|
+
padding-right: 8px;
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
.filtered-list-widget-item-wrapper devtools-icon {
|
|
@@ -95,16 +97,18 @@
|
|
|
95
97
|
text-overflow: ellipsis;
|
|
96
98
|
overflow: hidden;
|
|
97
99
|
align-self: center;
|
|
98
|
-
color: var(--color-text-primary);
|
|
99
100
|
max-width: 446px;
|
|
100
101
|
font-size: 12px;
|
|
101
|
-
font-family: '.SFNSDisplay-Regular', 'Helvetica Neue', 'Lucida Grande', sans-serif;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.filtered-list-widget-item span.highlight {
|
|
104
|
+
.filtered-list-widget-item.two-rows span.highlight {
|
|
105
105
|
color: var(--color-primary);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
.filtered-list-widget-item.one-row span.highlight {
|
|
109
|
+
font-weight: bold;
|
|
110
|
+
}
|
|
111
|
+
|
|
108
112
|
.filtered-list-widget-item .filtered-list-widget-title {
|
|
109
113
|
flex: auto;
|
|
110
114
|
overflow: hidden;
|
|
@@ -126,13 +130,22 @@
|
|
|
126
130
|
text-overflow: ellipsis;
|
|
127
131
|
}
|
|
128
132
|
|
|
133
|
+
.filtered-list-widget-item-wrapper .tag {
|
|
134
|
+
padding: 0 12px;
|
|
135
|
+
border-radius: 4px;
|
|
136
|
+
line-height: 24px;
|
|
137
|
+
height: 24px;
|
|
138
|
+
align-self: center;
|
|
139
|
+
}
|
|
140
|
+
|
|
129
141
|
.filtered-list-widget-item-wrapper.selected .filtered-list-widget-item span.highlight {
|
|
130
142
|
color: var(--color-background);
|
|
131
143
|
background-color: var(--override-filtered-list-widget-highlight-text-background-color);
|
|
132
144
|
}
|
|
133
145
|
|
|
134
146
|
.filtered-list-widget-item-wrapper.selected .filtered-list-widget-title,
|
|
135
|
-
.filtered-list-widget-item-wrapper.selected .filtered-list-widget-subtitle
|
|
147
|
+
.filtered-list-widget-item-wrapper.selected .filtered-list-widget-subtitle,
|
|
148
|
+
.filtered-list-widget-item-wrapper.selected .tag {
|
|
136
149
|
color: var(--color-background);
|
|
137
150
|
}
|
|
138
151
|
|
|
@@ -174,6 +187,15 @@
|
|
|
174
187
|
padding-top: 8px;
|
|
175
188
|
padding-bottom: 8px;
|
|
176
189
|
display: flex;
|
|
190
|
+
flex: auto;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.filtered-list-widget-item.one-row .filtered-list-widget-title {
|
|
194
|
+
flex: none;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.filtered-list-widget-item.one-row .filtered-list-widget-subtitle::before {
|
|
198
|
+
content: ' ';
|
|
177
199
|
}
|
|
178
200
|
|
|
179
201
|
.filtered-list-widget-item.two-rows {
|
|
@@ -186,22 +208,10 @@
|
|
|
186
208
|
font-weight: bold;
|
|
187
209
|
}
|
|
188
210
|
|
|
189
|
-
.tag {
|
|
190
|
-
color: var(--color-background);
|
|
191
|
-
padding: 1px 3px;
|
|
192
|
-
margin-right: 5px;
|
|
193
|
-
border-radius: 2px;
|
|
194
|
-
line-height: 18px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
.filtered-list-widget-item .tag .highlight {
|
|
198
|
-
color: var(--color-background);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
211
|
.not-found-text {
|
|
202
212
|
height: 34px;
|
|
203
213
|
line-height: 34px;
|
|
204
|
-
padding-left:
|
|
214
|
+
padding-left: 8px;
|
|
205
215
|
font-style: italic;
|
|
206
216
|
color: var(--color-text-disabled);
|
|
207
217
|
background: var(--color-background-elevation-0);
|
|
@@ -9,7 +9,9 @@ import * as TextEditor from '../text_editor/text_editor.js';
|
|
|
9
9
|
|
|
10
10
|
const whitespaceStyleInjectedSet = new WeakSet<Document>();
|
|
11
11
|
|
|
12
|
-
export class SourcesTextEditor extends
|
|
12
|
+
export class SourcesTextEditor extends
|
|
13
|
+
Common.ObjectWrapper.eventMixin<EventTypes, typeof TextEditor.CodeMirrorTextEditor.CodeMirrorTextEditor>(
|
|
14
|
+
TextEditor.CodeMirrorTextEditor.CodeMirrorTextEditor) {
|
|
13
15
|
private readonly delegate: SourcesTextEditorDelegate;
|
|
14
16
|
private readonly gutterMouseMove: (event: Event) => void;
|
|
15
17
|
private readonly gutterMouseOut: () => void;
|
|
@@ -486,7 +488,7 @@ export class SourcesTextEditor extends TextEditor.CodeMirrorTextEditor.CodeMirro
|
|
|
486
488
|
if (from && to && from.equal(to)) {
|
|
487
489
|
return;
|
|
488
490
|
}
|
|
489
|
-
this.dispatchEventToListeners(Events.JumpHappened, {from
|
|
491
|
+
this.dispatchEventToListeners(Events.JumpHappened, {from, to});
|
|
490
492
|
}
|
|
491
493
|
|
|
492
494
|
private scroll(): void {
|
|
@@ -696,6 +698,20 @@ export enum Events {
|
|
|
696
698
|
JumpHappened = 'JumpHappened',
|
|
697
699
|
}
|
|
698
700
|
|
|
701
|
+
export interface JumpHappenedEvent {
|
|
702
|
+
from: TextUtils.TextRange.TextRange|null;
|
|
703
|
+
to: TextUtils.TextRange.TextRange|null;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
export type EventTypes = {
|
|
707
|
+
[Events.GutterClick]: GutterClickEventData,
|
|
708
|
+
[Events.SelectionChanged]: TextUtils.TextRange.TextRange,
|
|
709
|
+
[Events.ScrollChanged]: number,
|
|
710
|
+
[Events.EditorFocused]: void,
|
|
711
|
+
[Events.EditorBlurred]: void,
|
|
712
|
+
[Events.JumpHappened]: JumpHappenedEvent,
|
|
713
|
+
};
|
|
714
|
+
|
|
699
715
|
export class SourcesTextEditorDelegate {
|
|
700
716
|
populateLineGutterContextMenu(_contextMenu: UI.ContextMenu.ContextMenu, _lineNumber: number): Promise<void> {
|
|
701
717
|
throw new Error('Not implemented');
|
|
@@ -64,7 +64,9 @@ export interface Coordinates {
|
|
|
64
64
|
// https://crbug.com/1151919 * = CodeMirror.Editor
|
|
65
65
|
const editorToDevtoolsWrapper = new WeakMap<any, CodeMirrorTextEditor>();
|
|
66
66
|
|
|
67
|
-
export class CodeMirrorTextEditor extends
|
|
67
|
+
export class CodeMirrorTextEditor extends
|
|
68
|
+
Common.ObjectWrapper.eventMixin<UI.TextEditor.EventTypes, typeof UI.Widget.VBox>(UI.Widget.VBox)
|
|
69
|
+
implements UI.TextEditor.TextEditor {
|
|
68
70
|
private options: UI.TextEditor.Options;
|
|
69
71
|
// https://crbug.com/1151919 * = CodeMirror.Editor
|
|
70
72
|
private codeMirrorInternal: any;
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
top: 0;
|
|
53
53
|
bottom: 0;
|
|
54
54
|
width: 6px;
|
|
55
|
-
z-index:
|
|
55
|
+
z-index: 4000;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
.shadow-split-widget.vbox > .shadow-split-widget-resizer {
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
left: 0;
|
|
61
61
|
right: 0;
|
|
62
62
|
height: 6px;
|
|
63
|
-
z-index:
|
|
63
|
+
z-index: 4000;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
.shadow-split-widget.vbox > .shadow-split-widget-sidebar.no-default-splitter {
|
|
@@ -38,7 +38,7 @@ interface ViewportSize {
|
|
|
38
38
|
|
|
39
39
|
export interface ResetData {
|
|
40
40
|
viewportSize: ViewportSize;
|
|
41
|
-
|
|
41
|
+
viewportSizeForMediaQueries?: ViewportSize;
|
|
42
42
|
deviceScaleFactor: number;
|
|
43
43
|
pageScaleFactor: number;
|
|
44
44
|
pageZoomFactor: number;
|
|
@@ -52,7 +52,7 @@ export interface ResetData {
|
|
|
52
52
|
// Old logic is kept temporarily while the tools are being migrated.
|
|
53
53
|
export class Overlay {
|
|
54
54
|
protected viewportSize = {width: 800, height: 600};
|
|
55
|
-
protected
|
|
55
|
+
protected viewportSizeForMediaQueries?: ViewportSize;
|
|
56
56
|
protected deviceScaleFactor = 1;
|
|
57
57
|
protected emulationScaleFactor = 1;
|
|
58
58
|
protected pageScaleFactor = 1;
|
|
@@ -104,7 +104,7 @@ export class Overlay {
|
|
|
104
104
|
reset(resetData?: ResetData) {
|
|
105
105
|
if (resetData) {
|
|
106
106
|
this.viewportSize = resetData.viewportSize;
|
|
107
|
-
this.
|
|
107
|
+
this.viewportSizeForMediaQueries = resetData.viewportSizeForMediaQueries;
|
|
108
108
|
this.deviceScaleFactor = resetData.deviceScaleFactor;
|
|
109
109
|
this.pageScaleFactor = resetData.pageScaleFactor;
|
|
110
110
|
this.pageZoomFactor = resetData.pageZoomFactor;
|
|
@@ -29,7 +29,7 @@ export class ViewportSizeOverlay extends Overlay {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
drawViewSize() {
|
|
32
|
-
const viewportSize = this.
|
|
32
|
+
const viewportSize = this.viewportSizeForMediaQueries || this.viewportSize;
|
|
33
33
|
const text = `${formatNumber(viewportSize.width)}px \xD7 ${formatNumber(viewportSize.height)}px`;
|
|
34
34
|
const canvasWidth = this.canvasWidth || 0;
|
|
35
35
|
this.context.save();
|
package/package.json
CHANGED
|
@@ -21,6 +21,7 @@ for (const fileName of filenames) {
|
|
|
21
21
|
`// Copyright ${new Date().getFullYear()} The Chromium Authors. All rights reserved.
|
|
22
22
|
// Use of this source code is governed by a BSD-style license that can be
|
|
23
23
|
// found in the LICENSE file.
|
|
24
|
+
// IMPORTANT: this file is auto generated. Please do not edit this file.
|
|
24
25
|
const styles = new CSSStyleSheet();
|
|
25
26
|
styles.replaceSync(
|
|
26
27
|
\`${isDebug ? output : cleanCSS.minify(output).styles}
|