chrome-devtools-frontend 1.0.1019968 → 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.
@@ -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
  },
@@ -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
  },
@@ -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
 
@@ -35,12 +35,10 @@
35
35
  import * as Common from '../../core/common/common.js';
36
36
  import * as i18n from '../../core/i18n/i18n.js';
37
37
  import * as SDK from '../../core/sdk/sdk.js';
38
- import * as Adorners from '../../ui/components/adorners/adorners.js';
39
38
  import * as CodeHighlighter from '../../ui/components/code_highlighter/code_highlighter.js';
40
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
41
39
  import * as UI from '../../ui/legacy/legacy.js';
42
40
 
43
- import * as ElementsComponents from './components/components.js';
41
+ import {linkifyDeferredNodeReference} from './DOMLinkifier.js';
44
42
  import {ElementsPanel} from './ElementsPanel.js';
45
43
  import {ElementsTreeElement, InitialChildrenLimit} from './ElementsTreeElement.js';
46
44
  import elementsTreeOutlineStyles from './elementsTreeOutline.css.js';
@@ -1631,45 +1629,13 @@ export class ShortcutTreeElement extends UI.TreeOutline.TreeElement {
1631
1629
  text = '<' + text + '>';
1632
1630
  }
1633
1631
  title.textContent = '\u21AA ' + text;
1632
+
1633
+ const link = (linkifyDeferredNodeReference(nodeShortcut.deferredNode) as Element);
1634
+ UI.UIUtils.createTextChild(this.listItemElement, ' ');
1635
+ link.classList.add('elements-tree-shortcut-link');
1636
+ link.textContent = i18nString(UIStrings.reveal);
1637
+ this.listItemElement.appendChild(link);
1634
1638
  this.nodeShortcut = nodeShortcut;
1635
- this.addRevealAdorner();
1636
- }
1637
-
1638
- addRevealAdorner(): void {
1639
- const adorner = new Adorners.Adorner.Adorner();
1640
- adorner.classList.add('adorner-reveal');
1641
- const config = ElementsComponents.AdornerManager.getRegisteredAdorner(
1642
- ElementsComponents.AdornerManager.RegisteredAdorners.REVEAL);
1643
- const name = config.name;
1644
- const adornerContent = document.createElement('span');
1645
- const linkIcon = new IconButton.Icon.Icon();
1646
- linkIcon
1647
- .data = {iconName: 'ic_show_node_16x16', color: 'var(--color-text-disabled)', width: '12px', height: '12px'};
1648
- const slotText = document.createElement('span');
1649
- slotText.textContent = name;
1650
- adornerContent.append(linkIcon);
1651
- adornerContent.append(slotText);
1652
- adornerContent.classList.add('adorner-with-icon');
1653
- adorner.data = {
1654
- name,
1655
- content: adornerContent,
1656
- };
1657
- this.listItemElement.appendChild(adorner);
1658
- const onClick = (((): void => {
1659
- this.nodeShortcut.deferredNode.resolve(
1660
- node => {
1661
- void Common.Revealer.reveal(node);
1662
- },
1663
- );
1664
- }) as EventListener);
1665
- adorner.addInteraction(onClick, {
1666
- isToggle: false,
1667
- shouldPropagateOnKeydown: false,
1668
- ariaLabelDefault: i18nString(UIStrings.reveal),
1669
- ariaLabelActive: i18nString(UIStrings.reveal),
1670
- });
1671
- adorner.addEventListener('mousedown', e => e.consume(), false);
1672
- ElementsPanel.instance().registerAdorner(adorner);
1673
1639
  }
1674
1640
 
1675
1641
  get hovered(): boolean {
@@ -3,7 +3,6 @@
3
3
  // found in the LICENSE file.
4
4
  import * as i18n from '../../core/i18n/i18n.js';
5
5
  import * as SDK from '../../core/sdk/sdk.js';
6
- import * as IconButton from '../../ui/components/icon_button/icon_button.js';
7
6
  import * as UI from '../../ui/legacy/legacy.js';
8
7
 
9
8
  import * as ElementsComponents from './components/components.js';
@@ -80,14 +79,7 @@ export class TopLayerContainer extends UI.TreeOutline.TreeElement {
80
79
  const config = ElementsComponents.AdornerManager.getRegisteredAdorner(
81
80
  ElementsComponents.AdornerManager.RegisteredAdorners.TOP_LAYER);
82
81
  const adornerContent = document.createElement('span');
83
- adornerContent.classList.add('adorner-with-icon');
84
- const linkIcon = new IconButton.Icon.Icon();
85
- linkIcon
86
- .data = {iconName: 'ic_show_node_16x16', color: 'var(--color-text-disabled)', width: '12px', height: '12px'};
87
- const adornerText = document.createElement('span');
88
- adornerText.textContent = ` top-layer (${topLayerElementIndex}) `;
89
- adornerContent.append(linkIcon);
90
- adornerContent.append(adornerText);
82
+ adornerContent.textContent = ` top-layer (${topLayerElementIndex}) `;
91
83
  const adorner = element?.adorn(config, adornerContent);
92
84
  if (adorner) {
93
85
  const onClick = (((): void => {
@@ -31,7 +31,6 @@ export enum RegisteredAdorners {
31
31
  CONTAINER = 'container',
32
32
  SLOT = 'slot',
33
33
  TOP_LAYER = 'top-layer',
34
- REVEAL = 'reveal',
35
34
  }
36
35
 
37
36
  // This enum-like const object serves as the authoritative registry for all the
@@ -80,12 +79,6 @@ export function getRegisteredAdorner(which: RegisteredAdorners): RegisteredAdorn
80
79
  category: AdornerCategories.LAYOUT,
81
80
  enabledByDefault: true,
82
81
  };
83
- case RegisteredAdorners.REVEAL:
84
- return {
85
- name: 'reveal',
86
- category: AdornerCategories.DEFAULT,
87
- enabledByDefault: true,
88
- };
89
82
  }
90
83
  }
91
84
 
@@ -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
+ }
@@ -27,10 +27,6 @@
27
27
  display: none;
28
28
  }
29
29
 
30
- .adorner-reveal {
31
- margin: 3px;
32
- }
33
-
34
30
  .adorner-with-icon {
35
31
  display: flex;
36
32
  justify-content: center;
@@ -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;
@@ -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;
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.1019968"
58
+ "version": "1.0.1020357"
59
59
  }