chrome-devtools-frontend 1.0.1019017 → 1.0.1020357

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.
Files changed (38) hide show
  1. package/config/gni/devtools_grd_files.gni +2 -0
  2. package/front_end/core/i18n/locales/en-US.json +1 -4
  3. package/front_end/core/i18n/locales/en-XL.json +1 -4
  4. package/front_end/core/sdk/CSSMatchedStyles.ts +1 -1
  5. package/front_end/core/sdk/CSSModel.ts +22 -0
  6. package/front_end/core/sdk/CSSQuery.ts +2 -1
  7. package/front_end/core/sdk/CSSRule.ts +4 -0
  8. package/front_end/core/sdk/CSSScope.ts +30 -0
  9. package/front_end/core/sdk/sdk.ts +2 -0
  10. package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
  11. package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +1 -1
  12. package/front_end/generated/InspectorBackendCommands.js +13 -3
  13. package/front_end/generated/SupportedCSSProperties.js +2 -2
  14. package/front_end/generated/protocol-mapping.d.ts +5 -0
  15. package/front_end/generated/protocol-proxy-api.d.ts +5 -0
  16. package/front_end/generated/protocol.ts +43 -0
  17. package/front_end/models/bindings/BreakpointManager.ts +22 -14
  18. package/front_end/models/javascript_metadata/NativeFunctions.js +4 -19
  19. package/front_end/panels/elements/ComputedStyleWidget.ts +2 -0
  20. package/front_end/panels/elements/ElementsTreeOutline.ts +3 -1
  21. package/front_end/panels/elements/StylePropertiesSection.ts +25 -0
  22. package/front_end/panels/elements/computedStyleSidebarPane.css +4 -0
  23. package/front_end/panels/emulation/DeviceModeToolbar.ts +1 -0
  24. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -0
  25. package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -0
  26. package/front_end/panels/network/RequestHeadersView.ts +1 -36
  27. package/front_end/panels/network/components/RequestHeadersView.ts +16 -16
  28. package/front_end/panels/network/requestHeadersTree.css +1 -9
  29. package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +23 -1
  30. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.ts +18 -1
  31. package/front_end/ui/components/linear_memory_inspector/LinearMemoryViewerUtils.ts +8 -0
  32. package/front_end/ui/components/linear_memory_inspector/linearMemoryViewer.css +4 -0
  33. package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.ts +2 -0
  34. package/front_end/ui/components/node_text/nodeText.css +5 -5
  35. package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -8
  36. package/front_end/ui/components/panel_feedback/previewToggle.css +1 -7
  37. package/front_end/ui/components/tree_outline/treeOutline.css +1 -0
  38. package/package.json +1 -1
@@ -605,6 +605,7 @@ grd_files_debug_sources = [
605
605
  "front_end/core/sdk/CSSPropertyParser.js",
606
606
  "front_end/core/sdk/CSSQuery.js",
607
607
  "front_end/core/sdk/CSSRule.js",
608
+ "front_end/core/sdk/CSSScope.js",
608
609
  "front_end/core/sdk/CSSStyleDeclaration.js",
609
610
  "front_end/core/sdk/CSSStyleSheetHeader.js",
610
611
  "front_end/core/sdk/CSSSupports.js",
@@ -1461,6 +1462,7 @@ grd_files_debug_sources = [
1461
1462
  "front_end/ui/components/linear_memory_inspector/LinearMemoryNavigator.js",
1462
1463
  "front_end/ui/components/linear_memory_inspector/LinearMemoryValueInterpreter.js",
1463
1464
  "front_end/ui/components/linear_memory_inspector/LinearMemoryViewer.js",
1465
+ "front_end/ui/components/linear_memory_inspector/LinearMemoryViewerUtils.js",
1464
1466
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.js",
1465
1467
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.js",
1466
1468
  "front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.js",
@@ -903,7 +903,7 @@
903
903
  "message": "Show Rendering"
904
904
  },
905
905
  "entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia": {
906
- "message": "Toggle forces CSS prefers-color-scheme color"
906
+ "message": "Toggle CSS media feature prefers-color-scheme"
907
907
  },
908
908
  "entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency": {
909
909
  "message": "vision deficiency"
@@ -7511,9 +7511,6 @@
7511
7511
  "panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS": {
7512
7512
  "message": "Provisional headers are shown. Disable cache to see full headers."
7513
7513
  },
7514
- "panels/network/RequestHeadersView.ts | recordedAttribution": {
7515
- "message": "Recorded attribution with trigger-data: {PH1}"
7516
- },
7517
7514
  "panels/network/RequestHeadersView.ts | referrerPolicy": {
7518
7515
  "message": "Referrer Policy"
7519
7516
  },
@@ -903,7 +903,7 @@
903
903
  "message": "Ŝh́ôẃ R̂én̂d́êŕîńĝ"
904
904
  },
905
905
  "entrypoints/inspector_main/inspector_main-meta.ts | toggleCssPrefersColorSchemeMedia": {
906
- "message": "T̂óĝǵl̂é f̂ór̂ćêś ĈŚŜ ṕr̂éf̂ér̂ś-ĉól̂ór̂-śĉh́êḿê ćôĺôŕ"
906
+ "message": "T̂óĝǵl̂é ĈŚŜ ḿêd́îá f̂éât́ûŕê ṕr̂éf̂ér̂ś-ĉól̂ór̂-śĉh́êḿê"
907
907
  },
908
908
  "entrypoints/inspector_main/inspector_main-meta.ts | visionDeficiency": {
909
909
  "message": "v̂íŝíôń d̂éf̂íĉíêńĉý"
@@ -7511,9 +7511,6 @@
7511
7511
  "panels/network/RequestHeadersView.ts | provisionalHeadersAreShownS": {
7512
7512
  "message": "P̂ŕôv́îśîón̂ál̂ h́êád̂ér̂ś âŕê śĥóŵń. D̂íŝáb̂ĺê ćâćĥé t̂ó ŝéê f́ûĺl̂ h́êád̂ér̂ś."
7513
7513
  },
7514
- "panels/network/RequestHeadersView.ts | recordedAttribution": {
7515
- "message": "R̂éĉór̂d́êd́ ât́t̂ŕîb́ût́îón̂ ẃît́ĥ trigger-data: {PH1}"
7516
- },
7517
7514
  "panels/network/RequestHeadersView.ts | referrerPolicy": {
7518
7515
  "message": "R̂éf̂ér̂ŕêŕ P̂ól̂íĉý"
7519
7516
  },
@@ -491,7 +491,7 @@ export class CSSMatchedStyles {
491
491
  return true;
492
492
  }
493
493
  const parentRule = style.parentRule as CSSStyleRule;
494
- const queries = [...parentRule.media, ...parentRule.containerQueries, ...parentRule.supports];
494
+ const queries = [...parentRule.media, ...parentRule.containerQueries, ...parentRule.supports, ...parentRule.scopes];
495
495
  for (const query of queries) {
496
496
  if (!query.active()) {
497
497
  return false;
@@ -461,6 +461,28 @@ export class CSSModel extends SDKModel<EventTypes> {
461
461
  }
462
462
  }
463
463
 
464
+ async setScopeText(
465
+ styleSheetId: Protocol.CSS.StyleSheetId, range: TextUtils.TextRange.TextRange,
466
+ newScopeText: string): Promise<boolean> {
467
+ Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleEdited);
468
+
469
+ try {
470
+ await this.ensureOriginalStyleSheetText(styleSheetId);
471
+ const {scope} = await this.agent.invoke_setScopeText({styleSheetId, range, text: newScopeText});
472
+
473
+ if (!scope) {
474
+ return false;
475
+ }
476
+ this.#domModel.markUndoableState();
477
+ const edit = new Edit(styleSheetId, range, newScopeText, scope);
478
+ this.fireStyleSheetChanged(styleSheetId, edit);
479
+ return true;
480
+ } catch (e) {
481
+ console.error(e);
482
+ return false;
483
+ }
484
+ }
485
+
464
486
  async addRule(styleSheetId: Protocol.CSS.StyleSheetId, ruleText: string, ruleLocation: TextUtils.TextRange.TextRange):
465
487
  Promise<CSSStyleRule|null> {
466
488
  try {
@@ -9,7 +9,8 @@ import type {CSSModel, Edit} from './CSSModel.js';
9
9
  import {CSSLocation} from './CSSModel.js';
10
10
  import type {CSSStyleSheetHeader} from './CSSStyleSheetHeader.js';
11
11
 
12
- type CSSQueryPayload = Protocol.CSS.CSSMedia|Protocol.CSS.CSSContainerQuery|Protocol.CSS.CSSSupports;
12
+ type CSSQueryPayload =
13
+ Protocol.CSS.CSSMedia|Protocol.CSS.CSSContainerQuery|Protocol.CSS.CSSSupports|Protocol.CSS.CSSScope;
13
14
 
14
15
  export abstract class CSSQuery {
15
16
  text = '';
@@ -9,6 +9,7 @@ import * as Platform from '../platform/platform.js';
9
9
  import {CSSContainerQuery} from './CSSContainerQuery.js';
10
10
  import {CSSLayer} from './CSSLayer.js';
11
11
  import {CSSMedia} from './CSSMedia.js';
12
+ import {CSSScope} from './CSSScope.js';
12
13
  import {CSSSupports} from './CSSSupports.js';
13
14
 
14
15
  import type {CSSModel, Edit} from './CSSModel.js';
@@ -103,6 +104,7 @@ export class CSSStyleRule extends CSSRule {
103
104
  media: CSSMedia[];
104
105
  containerQueries: CSSContainerQuery[];
105
106
  supports: CSSSupports[];
107
+ scopes: CSSScope[];
106
108
  layers: CSSLayer[];
107
109
  wasUsed: boolean;
108
110
  constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSRule, wasUsed?: boolean) {
@@ -113,6 +115,7 @@ export class CSSStyleRule extends CSSRule {
113
115
  this.containerQueries = payload.containerQueries ?
114
116
  CSSContainerQuery.parseContainerQueriesPayload(cssModel, payload.containerQueries) :
115
117
  [];
118
+ this.scopes = payload.scopes ? CSSScope.parseScopesPayload(cssModel, payload.scopes) : [];
116
119
  this.supports = payload.supports ? CSSSupports.parseSupportsPayload(cssModel, payload.supports) : [];
117
120
  this.layers = payload.layers ? CSSLayer.parseLayerPayload(cssModel, payload.layers) : [];
118
121
  this.wasUsed = wasUsed || false;
@@ -200,6 +203,7 @@ export class CSSStyleRule extends CSSRule {
200
203
  }
201
204
  this.media.forEach(media => media.rebase(edit));
202
205
  this.containerQueries.forEach(cq => cq.rebase(edit));
206
+ this.scopes.forEach(scope => scope.rebase(edit));
203
207
  this.supports.forEach(supports => supports.rebase(edit));
204
208
 
205
209
  super.rebase(edit);
@@ -0,0 +1,30 @@
1
+ // Copyright 2022 The Chromium Authors. All rights reserved.
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 TextUtils from '../../models/text_utils/text_utils.js';
6
+ import type * as Protocol from '../../generated/protocol.js';
7
+
8
+ import type {CSSModel} from './CSSModel.js';
9
+ import {CSSQuery} from './CSSQuery.js';
10
+
11
+ export class CSSScope extends CSSQuery {
12
+ static parseScopesPayload(cssModel: CSSModel, payload: Protocol.CSS.CSSScope[]): CSSScope[] {
13
+ return payload.map(scope => new CSSScope(cssModel, scope));
14
+ }
15
+
16
+ constructor(cssModel: CSSModel, payload: Protocol.CSS.CSSScope) {
17
+ super(cssModel);
18
+ this.reinitialize(payload);
19
+ }
20
+
21
+ reinitialize(payload: Protocol.CSS.CSSScope): void {
22
+ this.text = payload.text;
23
+ this.range = payload.range ? TextUtils.TextRange.TextRange.fromObject(payload.range) : null;
24
+ this.styleSheetId = payload.styleSheetId;
25
+ }
26
+
27
+ active(): boolean {
28
+ return true;
29
+ }
30
+ }
@@ -33,6 +33,7 @@ import * as CSSProperty from './CSSProperty.js';
33
33
  import * as CSSPropertyParser from './CSSPropertyParser.js';
34
34
  import * as CSSQuery from './CSSQuery.js';
35
35
  import * as CSSRule from './CSSRule.js';
36
+ import * as CSSScope from './CSSScope.js';
36
37
  import * as CSSStyleDeclaration from './CSSStyleDeclaration.js';
37
38
  import * as CSSStyleSheetHeader from './CSSStyleSheetHeader.js';
38
39
  import * as CSSSupports from './CSSSupports.js';
@@ -103,6 +104,7 @@ export {
103
104
  CSSPropertyParser,
104
105
  CSSQuery,
105
106
  CSSRule,
107
+ CSSScope,
106
108
  CSSStyleDeclaration,
107
109
  CSSStyleSheetHeader,
108
110
  CSSSupports,
@@ -366,13 +366,14 @@ export class ReloadActionDelegate implements UI.ActionRegistration.ActionDelegat
366
366
  Common.Settings.Settings.instance().moduleSetting('emulatedCSSMediaFeaturePrefersColorScheme');
367
367
 
368
368
  switch (actionId) {
369
- case 'rendering.toggle-prefers-color-scheme':
370
- if (emulatedCSSMediaFeaturePrefersColorSchemeSetting.get() === 'light') {
371
- emulatedCSSMediaFeaturePrefersColorSchemeSetting.set('dark');
372
- } else {
373
- emulatedCSSMediaFeaturePrefersColorSchemeSetting.set('light');
374
- }
369
+ case 'rendering.toggle-prefers-color-scheme': {
370
+ // Cycle between no emulation, light, dark
371
+ const options = ['', 'light', 'dark'];
372
+ const current = options.findIndex(x => x === emulatedCSSMediaFeaturePrefersColorSchemeSetting.get() || '');
373
+ emulatedCSSMediaFeaturePrefersColorSchemeSetting.set(options[(current + 1) % 3]);
374
+
375
375
  return true;
376
+ }
376
377
  }
377
378
  return false;
378
379
  }
@@ -103,7 +103,7 @@ const UIStrings = {
103
103
  * @description Title of an action that toggle
104
104
  * "forces CSS prefers-color-scheme" color
105
105
  */
106
- toggleCssPrefersColorSchemeMedia: 'Toggle forces CSS prefers-color-scheme color',
106
+ toggleCssPrefersColorSchemeMedia: 'Toggle CSS media feature prefers-color-scheme',
107
107
  };
108
108
  const str_ = i18n.i18n.registerUIStrings('entrypoints/inspector_main/inspector_main-meta.ts', UIStrings);
109
109
  const i18nLazyString = i18n.i18n.getLazilyComputedLocalizedString.bind(undefined, str_);
@@ -615,6 +615,13 @@ export function registerCommands(inspectorBackend) {
615
615
  {'name': 'range', 'type': 'object', 'optional': false}, {'name': 'text', 'type': 'string', 'optional': false}
616
616
  ],
617
617
  ['supports']);
618
+ inspectorBackend.registerCommand(
619
+ 'CSS.setScopeText',
620
+ [
621
+ {'name': 'styleSheetId', 'type': 'string', 'optional': false},
622
+ {'name': 'range', 'type': 'object', 'optional': false}, {'name': 'text', 'type': 'string', 'optional': false}
623
+ ],
624
+ ['scope']);
618
625
  inspectorBackend.registerCommand(
619
626
  'CSS.setRuleSelector',
620
627
  [
@@ -2149,9 +2156,12 @@ export function registerCommands(inspectorBackend) {
2149
2156
  WindowPlacement: 'window-placement',
2150
2157
  XrSpatialTracking: 'xr-spatial-tracking'
2151
2158
  });
2152
- inspectorBackend.registerEnum(
2153
- 'Page.PermissionsPolicyBlockReason',
2154
- {Header: 'Header', IframeAttribute: 'IframeAttribute', InFencedFrameTree: 'InFencedFrameTree'});
2159
+ inspectorBackend.registerEnum('Page.PermissionsPolicyBlockReason', {
2160
+ Header: 'Header',
2161
+ IframeAttribute: 'IframeAttribute',
2162
+ InFencedFrameTree: 'InFencedFrameTree',
2163
+ InIsolatedApp: 'InIsolatedApp'
2164
+ });
2155
2165
  inspectorBackend.registerEnum('Page.OriginTrialTokenStatus', {
2156
2166
  Success: 'Success',
2157
2167
  NotSupported: 'NotSupported',
@@ -333,7 +333,7 @@ export const generatedProperties = [
333
333
  {'name': 'contain-intrinsic-width', 'keywords': ['auto', 'none']},
334
334
  {'longhands': ['container-name', 'container-type'], 'name': 'container'},
335
335
  {'name': 'container-name', 'keywords': ['none']},
336
- {'name': 'container-type', 'keywords': ['none', 'inline-size', 'size']},
336
+ {'name': 'container-type', 'keywords': ['none', 'inline-size', 'size', 'style']},
337
337
  {'name': 'content'},
338
338
  {'name': 'content-visibility', 'keywords': ['visible', 'auto', 'hidden', 'hidden-matchable']},
339
339
  {'name': 'counter-increment', 'keywords': ['none']},
@@ -952,7 +952,7 @@ export const generatedPropertyValues = {
952
952
  'contain-intrinsic-height': {'values': ['auto', 'none']},
953
953
  'contain-intrinsic-width': {'values': ['auto', 'none']},
954
954
  'container-name': {'values': ['none']},
955
- 'container-type': {'values': ['none', 'inline-size', 'size']},
955
+ 'container-type': {'values': ['none', 'inline-size', 'size', 'style']},
956
956
  'content-visibility': {'values': ['visible', 'auto', 'hidden', 'hidden-matchable']},
957
957
  'counter-increment': {'values': ['none']},
958
958
  'counter-reset': {'values': ['none']},
@@ -1032,6 +1032,11 @@ export namespace ProtocolMapping {
1032
1032
  */
1033
1033
  'CSS.setSupportsText':
1034
1034
  {paramsType: [Protocol.CSS.SetSupportsTextRequest]; returnType: Protocol.CSS.SetSupportsTextResponse;};
1035
+ /**
1036
+ * Modifies the expression of a scope at-rule.
1037
+ */
1038
+ 'CSS.setScopeText':
1039
+ {paramsType: [Protocol.CSS.SetScopeTextRequest]; returnType: Protocol.CSS.SetScopeTextResponse;};
1035
1040
  /**
1036
1041
  * Modifies the rule selector.
1037
1042
  */
@@ -645,6 +645,11 @@ declare namespace ProtocolProxyApi {
645
645
  */
646
646
  invoke_setSupportsText(params: Protocol.CSS.SetSupportsTextRequest): Promise<Protocol.CSS.SetSupportsTextResponse>;
647
647
 
648
+ /**
649
+ * Modifies the expression of a scope at-rule.
650
+ */
651
+ invoke_setScopeText(params: Protocol.CSS.SetScopeTextRequest): Promise<Protocol.CSS.SetScopeTextResponse>;
652
+
648
653
  /**
649
654
  * Modifies the rule selector.
650
655
  */
@@ -1985,6 +1985,11 @@ export namespace CSS {
1985
1985
  * with the innermost layer and going outwards.
1986
1986
  */
1987
1987
  layers?: CSSLayer[];
1988
+ /**
1989
+ * @scope CSS at-rule array.
1990
+ * The array enumerates @scope at-rules starting with the innermost one, going outwards.
1991
+ */
1992
+ scopes?: CSSScope[];
1988
1993
  }
1989
1994
 
1990
1995
  /**
@@ -2250,6 +2255,25 @@ export namespace CSS {
2250
2255
  styleSheetId?: StyleSheetId;
2251
2256
  }
2252
2257
 
2258
+ /**
2259
+ * CSS Scope at-rule descriptor.
2260
+ */
2261
+ export interface CSSScope {
2262
+ /**
2263
+ * Scope rule text.
2264
+ */
2265
+ text: string;
2266
+ /**
2267
+ * The associated rule header range in the enclosing stylesheet (if
2268
+ * available).
2269
+ */
2270
+ range?: SourceRange;
2271
+ /**
2272
+ * Identifier of the stylesheet containing this object (if exists).
2273
+ */
2274
+ styleSheetId?: StyleSheetId;
2275
+ }
2276
+
2253
2277
  /**
2254
2278
  * CSS Layer at-rule descriptor.
2255
2279
  */
@@ -2686,6 +2710,19 @@ export namespace CSS {
2686
2710
  supports: CSSSupports;
2687
2711
  }
2688
2712
 
2713
+ export interface SetScopeTextRequest {
2714
+ styleSheetId: StyleSheetId;
2715
+ range: SourceRange;
2716
+ text: string;
2717
+ }
2718
+
2719
+ export interface SetScopeTextResponse extends ProtocolResponseWithError {
2720
+ /**
2721
+ * The resulting CSS Scope rule after modification.
2722
+ */
2723
+ scope: CSSScope;
2724
+ }
2725
+
2689
2726
  export interface SetRuleSelectorRequest {
2690
2727
  styleSheetId: StyleSheetId;
2691
2728
  range: SourceRange;
@@ -10291,6 +10328,7 @@ export namespace Page {
10291
10328
  Header = 'Header',
10292
10329
  IframeAttribute = 'IframeAttribute',
10293
10330
  InFencedFrameTree = 'InFencedFrameTree',
10331
+ InIsolatedApp = 'InIsolatedApp',
10294
10332
  }
10295
10333
 
10296
10334
  export interface PermissionsPolicyBlockLocator {
@@ -13640,6 +13678,11 @@ export namespace Tracing {
13640
13678
  * Controls how the trace buffer stores data.
13641
13679
  */
13642
13680
  recordMode?: TraceConfigRecordMode;
13681
+ /**
13682
+ * Size of the trace buffer in kilobytes. If not specified or zero is passed, a default value
13683
+ * of 200 MB would be used.
13684
+ */
13685
+ traceBufferSizeInKb?: number;
13643
13686
  /**
13644
13687
  * Turns on JavaScript stack sampling.
13645
13688
  */
@@ -409,13 +409,18 @@ export type EventTypes = {
409
409
  [Events.BreakpointRemoved]: BreakpointLocation,
410
410
  };
411
411
 
412
- const enum DebuggerUpdateResult {
412
+ export const enum DebuggerUpdateResult {
413
413
  OK = 'OK',
414
- ERROR = 'ERROR',
414
+ ERROR_BREAKPOINT_CLASH = 'ERROR_BREAKPOINT_CLASH',
415
+ ERROR_BACKEND = 'ERROR_BACKEND',
416
+
415
417
  // PENDING implies that the current update requires another re-run.
416
418
  PENDING = 'PENDING',
417
419
  }
418
420
 
421
+ export type ScheduleUpdateResult =
422
+ DebuggerUpdateResult.OK|DebuggerUpdateResult.ERROR_BACKEND|DebuggerUpdateResult.ERROR_BREAKPOINT_CLASH;
423
+
419
424
  const enum ResolveLocationResult {
420
425
  OK = 'OK',
421
426
  ERROR = 'ERROR',
@@ -430,7 +435,7 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
430
435
  uiSourceCodes: Set<Workspace.UISourceCode.UISourceCode>;
431
436
  #conditionInternal!: string;
432
437
  #enabledInternal!: boolean;
433
- isRemoved!: boolean;
438
+ isRemoved = false;
434
439
  currentState: Breakpoint.State|null;
435
440
  readonly #modelBreakpoints: Map<SDK.DebuggerModel.DebuggerModel, ModelBreakpoint>;
436
441
 
@@ -629,6 +634,9 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
629
634
  }
630
635
 
631
636
  async remove(keepInStorage: boolean): Promise<void> {
637
+ if (this.getIsRemoved()) {
638
+ return;
639
+ }
632
640
  this.isRemoved = true;
633
641
  const removeFromStorage = !keepInStorage;
634
642
 
@@ -676,9 +684,11 @@ export class Breakpoint implements SDK.TargetManager.SDKModelObserver<SDK.Debugg
676
684
  }
677
685
 
678
686
  async #updateModel(model: ModelBreakpoint): Promise<void> {
679
- const success = await model.scheduleUpdateInDebugger();
680
- if (!success) {
681
- await this.remove(false);
687
+ const result = await model.scheduleUpdateInDebugger();
688
+ if (result === DebuggerUpdateResult.ERROR_BACKEND) {
689
+ await this.remove(true /* keepInStorage */);
690
+ } else if (result === DebuggerUpdateResult.ERROR_BREAKPOINT_CLASH) {
691
+ await this.remove(false /* keepInStorage */);
682
692
  }
683
693
  }
684
694
  }
@@ -722,11 +732,9 @@ export class ModelBreakpoint {
722
732
  this.#liveLocations.disposeAll();
723
733
  }
724
734
 
725
- // Returns true, if scheduling ran as expected.
726
- // Returns false, if an error occurred.
727
- async scheduleUpdateInDebugger(): Promise<boolean> {
735
+ async scheduleUpdateInDebugger(): Promise<ScheduleUpdateResult> {
728
736
  if (!this.#debuggerModel.debuggerEnabled()) {
729
- return true;
737
+ return DebuggerUpdateResult.OK;
730
738
  }
731
739
 
732
740
  const release = await this.#updateMutex.acquire();
@@ -735,7 +743,7 @@ export class ModelBreakpoint {
735
743
  result = await this.#updateInDebugger();
736
744
  }
737
745
  release();
738
- return result === DebuggerUpdateResult.OK;
746
+ return result;
739
747
  }
740
748
 
741
749
  private scriptDiverged(): boolean {
@@ -849,7 +857,7 @@ export class ModelBreakpoint {
849
857
  // Something went wrong: we expect to have a non-null state, but have not received any
850
858
  // breakpointIds from the back-end.
851
859
  if (!breakpointIds.length) {
852
- return DebuggerUpdateResult.ERROR;
860
+ return DebuggerUpdateResult.ERROR_BACKEND;
853
861
  }
854
862
 
855
863
  this.#breakpointIds = breakpointIds;
@@ -859,7 +867,7 @@ export class ModelBreakpoint {
859
867
 
860
868
  // Breakpoint clash: the resolved location resolves to a different breakpoint, report an error.
861
869
  if (resolvedResults.includes(ResolveLocationResult.ERROR)) {
862
- return DebuggerUpdateResult.ERROR;
870
+ return DebuggerUpdateResult.ERROR_BREAKPOINT_CLASH;
863
871
  }
864
872
  return DebuggerUpdateResult.OK;
865
873
  }
@@ -917,7 +925,7 @@ export class ModelBreakpoint {
917
925
  Promise<void> {
918
926
  const result = await this.addResolvedLocation(location);
919
927
  if (result === ResolveLocationResult.ERROR) {
920
- await this.#breakpoint.remove(false);
928
+ await this.#breakpoint.remove(false /* keepInStorage */);
921
929
  }
922
930
  }
923
931
 
@@ -981,11 +981,6 @@ export const NativeFunctions = [
981
981
  signatures: [['?returnValue']],
982
982
  receivers: ['HTMLDialogElement']
983
983
  },
984
- {
985
- name: 'close',
986
- signatures: [['?options']],
987
- receivers: ['TCPSocket','UDPSocket']
988
- },
989
984
  {
990
985
  name: 'close',
991
986
  signatures: [['?closeInfo']],
@@ -6780,20 +6775,6 @@ export const NativeFunctions = [
6780
6775
  name: 'FederatedCredential',
6781
6776
  signatures: [['data']]
6782
6777
  },
6783
- {
6784
- name: 'login',
6785
- signatures: [['?request']]
6786
- },
6787
- {
6788
- name: 'revoke',
6789
- signatures: [['hint']],
6790
- receivers: ['FederatedCredential']
6791
- },
6792
- {
6793
- name: 'revoke',
6794
- signatures: [['permission']],
6795
- receivers: ['Permissions']
6796
- },
6797
6778
  {
6798
6779
  name: 'logoutRps',
6799
6780
  signatures: [['?logout_requests']]
@@ -7384,6 +7365,10 @@ export const NativeFunctions = [
7384
7365
  name: 'RTCSessionDescription',
7385
7366
  signatures: [['?descriptionInitDict']]
7386
7367
  },
7368
+ {
7369
+ name: 'revoke',
7370
+ signatures: [['permission']]
7371
+ },
7387
7372
  {
7388
7373
  name: 'requestAll',
7389
7374
  signatures: [['permissions']]
@@ -206,6 +206,8 @@ export class ComputedStyleWidget extends UI.ThrottledWidget.ThrottledWidget {
206
206
  constructor() {
207
207
  super(true);
208
208
 
209
+ this.contentElement.classList.add('styles-sidebar-computed-style-widget');
210
+
209
211
  this.computedStyleModel = new ComputedStyleModel();
210
212
  this.computedStyleModel.addEventListener(Events.ComputedStyleChanged, this.update, this);
211
213
 
@@ -555,7 +555,9 @@ export class ElementsTreeOutline extends
555
555
  // items extend at least to the right edge of the outer <ol> container.
556
556
  // In the no-word-wrap mode the outer <ol> may be wider than the tree container
557
557
  // (and partially hidden), in which case we are left to use only its right boundary.
558
- const x = scrollContainer.totalOffsetLeft() + scrollContainer.offsetWidth - 18;
558
+ // We use .clientWidth to account for possible scrollbar, and subtract 6px
559
+ // for the width of the split widget (see splitWidget.css).
560
+ const x = scrollContainer.totalOffsetLeft() + scrollContainer.clientWidth - 6;
559
561
 
560
562
  const y = event.pageY;
561
563
 
@@ -708,6 +708,7 @@ export class StylePropertiesSection {
708
708
  protected createAtRuleLists(rule: SDK.CSSRule.CSSStyleRule): void {
709
709
  this.createMediaList(rule.media);
710
710
  this.createContainerQueryList(rule.containerQueries);
711
+ this.createScopesList(rule.scopes);
711
712
  this.createSupportsList(rule.supports);
712
713
  }
713
714
 
@@ -778,6 +779,28 @@ export class StylePropertiesSection {
778
779
  }
779
780
  }
780
781
 
782
+ protected createScopesList(scopesList: SDK.CSSScope.CSSScope[]): void {
783
+ for (let i = scopesList.length - 1; i >= 0; --i) {
784
+ const scope = scopesList[i];
785
+ if (!scope.text) {
786
+ continue;
787
+ }
788
+
789
+ let onQueryTextClick;
790
+ if (scope.styleSheetId) {
791
+ onQueryTextClick = this.handleQueryRuleClick.bind(this, scope);
792
+ }
793
+
794
+ const scopeElement = new ElementsComponents.CSSQuery.CSSQuery();
795
+ scopeElement.data = {
796
+ queryPrefix: '@scope',
797
+ queryText: scope.text,
798
+ onQueryTextClick,
799
+ };
800
+ this.queryListElement.append(scopeElement);
801
+ }
802
+ }
803
+
781
804
  protected createSupportsList(supportsList: SDK.CSSSupports.CSSSupports[]): void {
782
805
  for (let i = supportsList.length - 1; i >= 0; --i) {
783
806
  const supports = supportsList[i];
@@ -1185,6 +1208,8 @@ export class StylePropertiesSection {
1185
1208
  success = await cssModel.setContainerQueryText(query.styleSheetId, range, newContent);
1186
1209
  } else if (query instanceof SDK.CSSSupports.CSSSupports) {
1187
1210
  success = await cssModel.setSupportsText(query.styleSheetId, range, newContent);
1211
+ } else if (query instanceof SDK.CSSScope.CSSScope) {
1212
+ success = await cssModel.setScopeText(query.styleSheetId, range, newContent);
1188
1213
  } else {
1189
1214
  success = await cssModel.setMediaText(query.styleSheetId, range, newContent);
1190
1215
  }
@@ -37,3 +37,7 @@
37
37
  border: 1px solid ButtonText;
38
38
  }
39
39
  }
40
+
41
+ .styles-sidebar-computed-style-widget {
42
+ min-height: auto;
43
+ }
@@ -415,6 +415,7 @@ export class DeviceModeToolbar {
415
415
  boundAppendScaleItem('100%', 1);
416
416
  boundAppendScaleItem('125%', 1.25);
417
417
  boundAppendScaleItem('150%', 1.5);
418
+ boundAppendScaleItem('200%', 2);
418
419
 
419
420
  function appendScaleItem(this: DeviceModeToolbar, title: string, value: number): void {
420
421
  contextMenu.defaultSection().appendCheckboxItem(
@@ -302,6 +302,8 @@ export class LighthousePanel extends UI.Panel.Panel {
302
302
  }
303
303
 
304
304
  const reportContainer = this.auditResultsElement.createChild('div', 'lh-vars lh-root lh-devtools');
305
+ // @ts-ignore Expose LHR on DOM for e2e tests
306
+ reportContainer._lighthouseResultForTesting = lighthouseResult;
305
307
 
306
308
  const dom = new LighthouseReport.DOM(this.auditResultsElement.ownerDocument as Document, reportContainer);
307
309
  const renderer = new LighthouseReportRenderer(dom) as LighthouseReport.ReportRenderer;
@@ -143,6 +143,7 @@ export class StartView extends UI.Widget.Widget {
143
143
  const checkbox = new UI.Toolbar.ToolbarSettingCheckbox(preset.setting, preset.description());
144
144
  const row = formElements.createChild('div', 'vbox lighthouse-launcher-row');
145
145
  row.appendChild(checkbox.element);
146
+ checkbox.element.setAttribute('data-lh-category', preset.configID);
146
147
  this.checkboxes.push({preset, checkbox});
147
148
  if (mode && !preset.supportedModes.includes(mode)) {
148
149
  checkbox.setEnabled(false);
@@ -195,13 +195,6 @@ const UIStrings = {
195
195
  */
196
196
  toUseThisResourceFromADifferentOrigin:
197
197
  'To use this resource from a different origin, the server may relax the cross-origin resource policy response header:',
198
- /**
199
- * @description Shown in the network panel for network requests that meet special criteria.
200
- * 'Attribution' is a term used by the "Attribution Reporting API" and refers to an event, e.g.
201
- * buying an item in an online store after an ad was clicked.
202
- * @example {foo} PH1
203
- */
204
- recordedAttribution: 'Recorded attribution with `trigger-data`: {PH1}',
205
198
  /**
206
199
  *@description Label for a link from the network panel's headers view to the file in which
207
200
  * header overrides are defined in the sources panel.
@@ -322,22 +315,7 @@ export class RequestHeadersView extends UI.Widget.VBox {
322
315
  private formatHeaderObject(header: BlockedReasonDetailDescriptor): DocumentFragment {
323
316
  const fragment = document.createDocumentFragment();
324
317
  if (header.headerNotSet) {
325
- fragment.createChild('div', 'header-badge header-badge-error header-badge-text').textContent = 'not-set';
326
- }
327
- // Highlight successful Attribution Reporting API redirects. If the request was
328
- // not canceled, then something went wrong.
329
- if (header.name.toLowerCase() === 'location' && this.request.canceled) {
330
- const url = new URL(header.value?.toString() || '', this.request.parsedURL.securityOrigin());
331
- const triggerData = getTriggerDataFromAttributionRedirect(url);
332
- if (triggerData) {
333
- fragment.createChild('div', 'header-badge header-badge-success header-badge-text').textContent =
334
- 'Attribution Reporting API';
335
- header.details = {
336
- explanation: (): string => i18nString(UIStrings.recordedAttribution, {PH1: triggerData}),
337
- examples: [],
338
- link: null,
339
- };
340
- }
318
+ fragment.createChild('div', 'header-badge header-badge-text').textContent = 'not-set';
341
319
  }
342
320
  const colon = header.value ? ': ' : '';
343
321
  fragment.createChild('div', 'header-name').textContent = header.name + colon;
@@ -817,19 +795,6 @@ export class Category extends UI.TreeOutline.TreeElement {
817
795
  }
818
796
  }
819
797
 
820
- /**
821
- * Returns the value for the `trigger-data` search parameter iff the provided
822
- * url is a valid attribution redirect as specified by the Attribution
823
- * Reporting API.
824
- */
825
- function getTriggerDataFromAttributionRedirect(url: URL): string|null {
826
- if (url.pathname === '/.well-known/attribution-reporting/trigger-attribution' &&
827
- url.searchParams.has('trigger-data')) {
828
- return url.searchParams.get('trigger-data');
829
- }
830
- return null;
831
- }
832
-
833
798
  interface BlockedReasonDetailDescriptor {
834
799
  name: string;
835
800
  value: Object|null;
@@ -20,23 +20,23 @@ const UIStrings = {
20
20
  /**
21
21
  *@description Text in Request Headers View of the Network panel
22
22
  */
23
- fromMemoryCache: '(from memory cache)',
23
+ fromDiskCache: '(from disk cache)',
24
24
  /**
25
25
  *@description Text in Request Headers View of the Network panel
26
26
  */
27
- fromServiceWorker: '(from `service worker`)',
27
+ fromMemoryCache: '(from memory cache)',
28
28
  /**
29
29
  *@description Text in Request Headers View of the Network panel
30
30
  */
31
- fromSignedexchange: '(from signed-exchange)',
31
+ fromPrefetchCache: '(from prefetch cache)',
32
32
  /**
33
33
  *@description Text in Request Headers View of the Network panel
34
34
  */
35
- fromPrefetchCache: '(from prefetch cache)',
35
+ fromServiceWorker: '(from `service worker`)',
36
36
  /**
37
37
  *@description Text in Request Headers View of the Network panel
38
38
  */
39
- fromDiskCache: '(from disk cache)',
39
+ fromSignedexchange: '(from signed-exchange)',
40
40
  /**
41
41
  *@description Text in Request Headers View of the Network panel
42
42
  */
@@ -52,16 +52,24 @@ const UIStrings = {
52
52
  /**
53
53
  *@description Text in Request Headers View of the Network panel
54
54
  */
55
- requestHeaders: 'Request Headers',
55
+ referrerPolicy: 'Referrer Policy',
56
56
  /**
57
- *@description The URL of a request
57
+ *@description Text in Network Log View Columns of the Network panel
58
58
  */
59
- requestUrl: 'Request URL',
59
+ remoteAddress: 'Remote Address',
60
+ /**
61
+ *@description Text in Request Headers View of the Network panel
62
+ */
63
+ requestHeaders: 'Request Headers',
60
64
  /**
61
65
  *@description The HTTP method of a request
62
66
  */
63
67
  requestMethod: 'Request Method',
64
68
  /**
69
+ *@description The URL of a request
70
+ */
71
+ requestUrl: 'Request URL',
72
+ /**
65
73
  *@description A context menu item in the Network Log View Columns of the Network panel
66
74
  */
67
75
  responseHeaders: 'Response Headers',
@@ -73,14 +81,6 @@ const UIStrings = {
73
81
  *@description HTTP response code
74
82
  */
75
83
  statusCode: 'Status Code',
76
- /**
77
- *@description Text in Network Log View Columns of the Network panel
78
- */
79
- remoteAddress: 'Remote Address',
80
- /**
81
- *@description Text in Request Headers View of the Network panel
82
- */
83
- referrerPolicy: 'Referrer Policy',
84
84
  };
85
85
  const str_ = i18n.i18n.registerUIStrings('panels/network/components/RequestHeadersView.ts', UIStrings);
86
86
  const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
@@ -112,21 +112,13 @@
112
112
  .tree-outline .header-badge {
113
113
  display: inline;
114
114
  margin-right: 0.75em;
115
+ background-color: var(--override-error-background-color);
115
116
  color: var(--override-error-text-color);
116
117
  border-radius: 100vh;
117
118
  padding-left: 6px;
118
119
  padding-right: 6px;
119
120
  }
120
121
 
121
- .tree-outline .header-badge-error {
122
- background-color: var(--override-error-background-color);
123
- }
124
-
125
- .tree-outline .header-badge-success {
126
- background-color: var(--color-accent-green);
127
- text-transform: uppercase;
128
- }
129
-
130
122
  .tree-outline .header-value {
131
123
  display: inline;
132
124
  margin-right: 1em;
@@ -27,6 +27,7 @@ import {
27
27
  import {formatAddress, parseAddress} from './LinearMemoryInspectorUtils.js';
28
28
  import type {JumpToPointerAddressEvent, ValueTypeModeChangedEvent} from './ValueInterpreterDisplay.js';
29
29
  import {LinearMemoryViewer} from './LinearMemoryViewer.js';
30
+ import type {HighlightInfo} from './LinearMemoryViewerUtils.js';
30
31
 
31
32
  import * as i18n from '../../../core/i18n/i18n.js';
32
33
  const UIStrings = {
@@ -51,6 +52,7 @@ export interface LinearMemoryInspectorData {
51
52
  valueTypes?: Set<ValueType>;
52
53
  valueTypeModes?: Map<ValueType, ValueTypeMode>;
53
54
  endianness?: Endianness;
55
+ highlightInfo?: HighlightInfo;
54
56
  }
55
57
 
56
58
  export type Settings = {
@@ -120,6 +122,10 @@ export class LinearMemoryInspector extends HTMLElement {
120
122
  #outerMemoryLength = 0;
121
123
 
122
124
  #address = -1;
125
+ #highlightInfo: HighlightInfo = {
126
+ size: 0,
127
+ startAddress: 0,
128
+ };
123
129
 
124
130
  #currentNavigatorMode = Mode.Submitted;
125
131
  #currentNavigatorAddressLine = `${this.#address}`;
@@ -143,12 +149,23 @@ export class LinearMemoryInspector extends HTMLElement {
143
149
  throw new Error('Memory offset has to be greater or equal to zero.');
144
150
  }
145
151
 
152
+ if (data.highlightInfo !== undefined) {
153
+ if (data.highlightInfo.size < 0) {
154
+ throw new Error('Object size has to be greater than or equal to zero');
155
+ }
156
+ if (data.highlightInfo.startAddress > data.memoryOffset + data.memory.length ||
157
+ data.highlightInfo.startAddress < 0) {
158
+ throw new Error('Object start address is out of bounds.');
159
+ }
160
+ }
161
+
146
162
  this.#memory = data.memory;
147
163
  this.#memoryOffset = data.memoryOffset;
148
164
  this.#outerMemoryLength = data.outerMemoryLength;
149
165
  this.#valueTypeModes = data.valueTypeModes || this.#valueTypeModes;
150
166
  this.#valueTypes = data.valueTypes || this.#valueTypes;
151
167
  this.#endianness = data.endianness || this.#endianness;
168
+ this.#highlightInfo = data.highlightInfo || this.#highlightInfo;
152
169
  this.#setAddress(data.address);
153
170
  this.#render();
154
171
  }
@@ -179,7 +196,12 @@ export class LinearMemoryInspector extends HTMLElement {
179
196
  @pagenavigation=${this.#navigatePage}
180
197
  @historynavigation=${this.#navigateHistory}></${LinearMemoryNavigator.litTagName}>
181
198
  <${LinearMemoryViewer.litTagName}
182
- .data=${{memory: this.#memory.slice(start - this.#memoryOffset, end - this.#memoryOffset), address: this.#address, memoryOffset: start, focus: this.#currentNavigatorMode === Mode.Submitted} as LinearMemoryViewerData}
199
+ .data=${{
200
+ memory: this.#memory.slice(start - this.#memoryOffset,
201
+ end - this.#memoryOffset),
202
+ address: this.#address, memoryOffset: start,
203
+ focus: this.#currentNavigatorMode === Mode.Submitted,
204
+ highlightInfo: this.#highlightInfo } as LinearMemoryViewerData}
183
205
  @byteselected=${this.#onByteSelected}
184
206
  @resize=${this.#resize}>
185
207
  </${LinearMemoryViewer.litTagName}>
@@ -4,6 +4,7 @@
4
4
  import * as LitHtml from '../../lit-html/lit-html.js';
5
5
  import * as ComponentHelpers from '../helpers/helpers.js';
6
6
 
7
+ import type {HighlightInfo} from './LinearMemoryViewerUtils.js';
7
8
  import {toHexString} from './LinearMemoryInspectorUtils.js';
8
9
  import linearMemoryViewerStyles from './linearMemoryViewer.css.js';
9
10
 
@@ -14,6 +15,7 @@ export interface LinearMemoryViewerData {
14
15
  address: number;
15
16
  memoryOffset: number;
16
17
  focus: boolean;
18
+ highlightInfo?: HighlightInfo;
17
19
  }
18
20
 
19
21
  export class ByteSelectedEvent extends Event {
@@ -50,6 +52,10 @@ export class LinearMemoryViewer extends HTMLElement {
50
52
  #memory = new Uint8Array();
51
53
  #address = 0;
52
54
  #memoryOffset = 0;
55
+ #highlightInfo: HighlightInfo = {
56
+ size: 0,
57
+ startAddress: 0,
58
+ };
53
59
 
54
60
  #numRows = 1;
55
61
  #numBytesInRow = BYTE_GROUP_SIZE;
@@ -69,6 +75,7 @@ export class LinearMemoryViewer extends HTMLElement {
69
75
 
70
76
  this.#memory = data.memory;
71
77
  this.#address = data.address;
78
+ this.#highlightInfo = data.highlightInfo || this.#highlightInfo;
72
79
  this.#memoryOffset = data.memoryOffset;
73
80
  this.#focusOnByte = data.focus;
74
81
  this.#update();
@@ -230,18 +237,20 @@ export class LinearMemoryViewer extends HTMLElement {
230
237
  #renderByteValues(startIndex: number, endIndex: number): LitHtml.TemplateResult {
231
238
  const cells = [];
232
239
  for (let i = startIndex; i < endIndex; ++i) {
240
+ const actualIndex = i + this.#memoryOffset;
233
241
  // Add margin after each group of bytes of size byteGroupSize.
234
242
  const addMargin = i !== startIndex && (i - startIndex) % BYTE_GROUP_SIZE === 0;
235
243
  const selected = i === this.#address - this.#memoryOffset;
244
+ const shouldBeHighlighted = this.#shouldBeHighlighted(actualIndex);
236
245
  const classMap = {
237
246
  'cell': true,
238
247
  'byte-cell': true,
239
248
  'byte-group-margin': addMargin,
240
249
  selected,
250
+ 'highlight-area': shouldBeHighlighted,
241
251
  };
242
252
  const isSelectableCell = i < this.#memory.length;
243
253
  const byteValue = isSelectableCell ? html`${toHexString({number: this.#memory[i], pad: 2, prefix: false})}` : '';
244
- const actualIndex = i + this.#memoryOffset;
245
254
  const onSelectedByte = isSelectableCell ? this.#onSelectedByte.bind(this, actualIndex) : '';
246
255
  cells.push(html`<span class=${LitHtml.Directives.classMap(classMap)} @click=${onSelectedByte}>${byteValue}</span>`);
247
256
  }
@@ -251,10 +260,13 @@ export class LinearMemoryViewer extends HTMLElement {
251
260
  #renderCharacterValues(startIndex: number, endIndex: number): LitHtml.TemplateResult {
252
261
  const cells = [];
253
262
  for (let i = startIndex; i < endIndex; ++i) {
263
+ const actualIndex = i + this.#memoryOffset;
264
+ const shouldBeHighlighted = this.#shouldBeHighlighted(actualIndex);
254
265
  const classMap = {
255
266
  'cell': true,
256
267
  'text-cell': true,
257
268
  selected: this.#address - this.#memoryOffset === i,
269
+ 'highlight-area': shouldBeHighlighted,
258
270
  };
259
271
  const isSelectableCell = i < this.#memory.length;
260
272
  const value = isSelectableCell ? html`${this.#toAscii(this.#memory[i])}` : '';
@@ -274,6 +286,11 @@ export class LinearMemoryViewer extends HTMLElement {
274
286
  #onSelectedByte(index: number): void {
275
287
  this.dispatchEvent(new ByteSelectedEvent(index));
276
288
  }
289
+
290
+ #shouldBeHighlighted(index: number): boolean {
291
+ return this.#highlightInfo.startAddress <= index
292
+ && index < this.#highlightInfo.startAddress + this.#highlightInfo.size;
293
+ }
277
294
  }
278
295
 
279
296
  ComponentHelpers.CustomElements.defineComponent('devtools-linear-memory-inspector-viewer', LinearMemoryViewer);
@@ -0,0 +1,8 @@
1
+ // Copyright 2022 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export interface HighlightInfo {
6
+ startAddress: number;
7
+ size: number;
8
+ }
@@ -36,6 +36,10 @@
36
36
  background-color: var(--legacy-item-selection-bg-color);
37
37
  }
38
38
 
39
+ .highlight-area {
40
+ background-color: var(--legacy-item-selection-bg-color);
41
+ }
42
+
39
43
  .byte-cell {
40
44
  min-width: 21px;
41
45
  color: var(--color-text-primary);
@@ -9,6 +9,7 @@ import * as LinearMemoryInspectorUtils from './LinearMemoryInspectorUtils.js';
9
9
  import * as LinearMemoryNavigator from './LinearMemoryNavigator.js';
10
10
  import * as LinearMemoryValueInterpreter from './LinearMemoryValueInterpreter.js';
11
11
  import * as LinearMemoryViewer from './LinearMemoryViewer.js';
12
+ import * as LinearMemoryViewerUtils from './LinearMemoryViewerUtils.js';
12
13
  import * as ValueInterpreterDisplay from './ValueInterpreterDisplay.js';
13
14
  import * as ValueInterpreterDisplayUtils from './ValueInterpreterDisplayUtils.js';
14
15
  import * as ValueInterpreterSettings from './ValueInterpreterSettings.js';
@@ -21,6 +22,7 @@ export {
21
22
  LinearMemoryNavigator,
22
23
  LinearMemoryValueInterpreter,
23
24
  LinearMemoryViewer,
25
+ LinearMemoryViewerUtils,
24
26
  ValueInterpreterDisplay,
25
27
  ValueInterpreterDisplayUtils,
26
28
  ValueInterpreterSettings,
@@ -7,21 +7,21 @@
7
7
  /* See: https://crbug.com/1227651 for details on changing these to --override pattern. */
8
8
 
9
9
  .node-label-name {
10
- color: var(--override-node-text-label-color, --color-token-tag);
10
+ color: var(--override-node-text-label-color, var(--color-token-tag));
11
11
  }
12
12
 
13
13
  .node-label-class {
14
- color: var(--override-node-text-class-color, --color-token-attribute);
14
+ color: var(--override-node-text-class-color, var(--color-token-attribute));
15
15
  }
16
16
 
17
17
  .node-label-id {
18
- color: var(--override-node-text-id-color);
18
+ color: var(--override-node-text-id-color, var(--color-token-attribute));
19
19
  }
20
20
 
21
21
  .node-label-class.node-multiple-descriptors {
22
- color: var(--override-node-text-multiple-descriptors-class, var(--override-node-text-class-color, --color-token-attribute));
22
+ color: var(--override-node-text-multiple-descriptors-class, var(--override-node-text-class-color, var(--color-token-attribute)));
23
23
  }
24
24
 
25
25
  .node-label-id.node-multiple-descriptors {
26
- color: var(--override-node-text-multiple-descriptors-id, var(--override-node-text-id-color, --color-token-attribute));
26
+ color: var(--override-node-text-multiple-descriptors-id, var(--override-node-text-id-color, var(--color-token-attribute)));
27
27
  }
@@ -67,18 +67,11 @@ export class PreviewToggle extends HTMLElement {
67
67
 
68
68
  #render(): void {
69
69
  const checked = Root.Runtime.experiments.isEnabled(this.#experiment);
70
- const hasLink = Boolean(this.#feedbackURL) || Boolean(this.#learnMoreURL);
71
-
72
- const containerClasses = LitHtml.Directives.classMap({
73
- 'container': true,
74
- 'has-link': hasLink,
75
- });
76
-
77
70
  // Disabled until https://crbug.com/1079231 is fixed.
78
71
  // clang-format off
79
72
  render(
80
73
  html`
81
- <div class=${containerClasses}>
74
+ <div class="container">
82
75
  <div class="checkbox-line">
83
76
  <label class="experiment-preview">
84
77
  <input type="checkbox" ?checked=${checked} @change=${this.#checkboxChanged} aria-label=${this.#name}/>
@@ -33,16 +33,10 @@
33
33
  padding: 4px;
34
34
  }
35
35
 
36
- .container.has-link {
37
- /* For x-link outline not to paint over the helper text
38
- we need to have 2 * <padding>px additional line height */
39
- line-height: calc(1em + 8px);
40
- }
41
-
42
36
  .x-link {
43
37
  color: var(--color-primary);
44
38
  text-decoration-line: underline;
45
- padding: 4px;
39
+ margin: 4px;
46
40
  }
47
41
 
48
42
  .feedback .x-link {
@@ -38,6 +38,7 @@ li {
38
38
  height: 12px;
39
39
  width: 13px;
40
40
  overflow: hidden;
41
+ flex: none;
41
42
  }
42
43
 
43
44
  ul {
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "vpython third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.1019017"
58
+ "version": "1.0.1020357"
59
59
  }