chrome-devtools-frontend 1.0.971727 → 1.0.973342
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/devtools_grd_files.gni +2 -1
- package/front_end/core/i18n/locales/en-US.json +24 -0
- package/front_end/core/i18n/locales/en-XL.json +24 -0
- package/front_end/core/sdk/NetworkManager.ts +15 -7
- package/front_end/core/sdk/NetworkRequest.ts +16 -14
- package/front_end/core/sdk/ResourceTreeModel.ts +8 -10
- package/front_end/core/sdk/SourceMap.ts +9 -9
- package/front_end/entrypoints/lighthouse_worker/{LighthouseService.ts → LighthouseWorkerService.ts} +69 -38
- package/front_end/entrypoints/lighthouse_worker/lighthouse_worker.ts +1 -1
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +2 -16
- package/front_end/models/bindings/SASSSourceMapping.ts +4 -3
- package/front_end/models/har/HARFormat.ts +4 -2
- package/front_end/models/har/Importer.ts +0 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystem.ts +0 -1
- package/front_end/models/text_utils/StaticContentProvider.ts +5 -4
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +20 -8
- package/front_end/panels/application/ServiceWorkerCacheViews.ts +2 -1
- package/front_end/panels/changes/ChangesView.ts +4 -4
- package/front_end/panels/elements/StylesSidebarPane.ts +27 -15
- package/front_end/panels/elements/components/LayoutPane.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +13 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +57 -8
- package/front_end/panels/lighthouse/LighthouseProtocolService.ts +94 -30
- package/front_end/panels/lighthouse/LighthouseStartView.ts +6 -2
- package/front_end/panels/lighthouse/LighthouseStartViewFR.ts +61 -0
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +99 -0
- package/front_end/panels/sources/NavigatorView.ts +4 -4
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +28 -2
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +10 -10
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +1047 -1158
- package/front_end/third_party/lighthouse/locales/en-US.json +7 -1
- package/front_end/third_party/lighthouse/locales/en-XL.json +7 -1
- package/front_end/third_party/lighthouse/report/bundle.d.ts +0 -3
- package/front_end/third_party/lighthouse/report/bundle.js +38 -24
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/ui/components/expandable_list/expandableList.css +1 -1
- package/front_end/ui/components/text_editor/config.ts +1 -0
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +7 -4
- package/front_end/ui/legacy/tabbedPane.css +1 -0
- package/package.json +1 -1
- package/scripts/hosted_mode/server.js +13 -0
@@ -1668,7 +1668,7 @@
|
|
1668
1668
|
"message": "Best practices"
|
1669
1669
|
},
|
1670
1670
|
"lighthouse-core/config/default-config.js | a11yCategoryDescription": {
|
1671
|
-
"message": "These checks highlight opportunities to [improve the accessibility of your web app](https://
|
1671
|
+
"message": "These checks highlight opportunities to [improve the accessibility of your web app](https://web.dev/lighthouse-accessibility/). Only a subset of accessibility issues can be automatically detected so manual testing is also encouraged."
|
1672
1672
|
},
|
1673
1673
|
"lighthouse-core/config/default-config.js | a11yCategoryManualDescription": {
|
1674
1674
|
"message": "These items address areas which an automated testing tool cannot cover. Learn more in our guide on [conducting an accessibility review](https://developers.google.com/web/fundamentals/accessibility/how-to-review)."
|
@@ -2543,6 +2543,12 @@
|
|
2543
2543
|
"report/renderer/util.js | varianceDisclaimer": {
|
2544
2544
|
"message": "Values are estimated and may vary. The [performance score is calculated](https://web.dev/performance-scoring/) directly from these metrics."
|
2545
2545
|
},
|
2546
|
+
"report/renderer/util.js | viewOriginalTraceLabel": {
|
2547
|
+
"message": "View Original Trace"
|
2548
|
+
},
|
2549
|
+
"report/renderer/util.js | viewTraceLabel": {
|
2550
|
+
"message": "View Trace"
|
2551
|
+
},
|
2546
2552
|
"report/renderer/util.js | viewTreemapLabel": {
|
2547
2553
|
"message": "View Treemap"
|
2548
2554
|
},
|
@@ -1668,7 +1668,7 @@
|
|
1668
1668
|
"message": "B̂éŝt́ p̂ŕâćt̂íĉéŝ"
|
1669
1669
|
},
|
1670
1670
|
"lighthouse-core/config/default-config.js | a11yCategoryDescription": {
|
1671
|
-
"message": "T̂h́êśê ćĥéĉḱŝ h́îǵĥĺîǵĥt́ ôṕp̂ór̂t́ûńît́îéŝ t́ô [ím̂ṕr̂óv̂é t̂h́ê áĉćêśŝíb̂íl̂ít̂ý ôf́ ŷóûŕ ŵéb̂ áp̂ṕ](https://
|
1671
|
+
"message": "T̂h́êśê ćĥéĉḱŝ h́îǵĥĺîǵĥt́ ôṕp̂ór̂t́ûńît́îéŝ t́ô [ím̂ṕr̂óv̂é t̂h́ê áĉćêśŝíb̂íl̂ít̂ý ôf́ ŷóûŕ ŵéb̂ áp̂ṕ](https://web.dev/lighthouse-accessibility/). Ôńl̂ý â śûb́ŝét̂ óf̂ áĉćêśŝíb̂íl̂ít̂ý îśŝúêś ĉán̂ b́ê áût́ôḿât́îćâĺl̂ý d̂ét̂éĉt́êd́ ŝó m̂án̂úâĺ t̂éŝt́îńĝ íŝ ál̂śô én̂ćôúr̂áĝéd̂."
|
1672
1672
|
},
|
1673
1673
|
"lighthouse-core/config/default-config.js | a11yCategoryManualDescription": {
|
1674
1674
|
"message": "T̂h́êśê ít̂ém̂ś âd́d̂ŕêśŝ ár̂éâś ŵh́îćĥ án̂ áût́ôḿât́êd́ t̂éŝt́îńĝ t́ôól̂ ćâńn̂ót̂ ćôv́êŕ. L̂éâŕn̂ ḿôŕê ín̂ óûŕ ĝúîd́ê ón̂ [ćôńd̂úĉt́îńĝ án̂ áĉćêśŝíb̂íl̂ít̂ý r̂év̂íêẃ](https://developers.google.com/web/fundamentals/accessibility/how-to-review)."
|
@@ -2543,6 +2543,12 @@
|
|
2543
2543
|
"report/renderer/util.js | varianceDisclaimer": {
|
2544
2544
|
"message": "V̂ál̂úêś âŕê éŝt́îḿât́êd́ âńd̂ ḿâý v̂ár̂ý. T̂h́ê [ṕêŕf̂ór̂ḿâńĉé ŝćôŕê íŝ ćâĺĉúl̂át̂éd̂](https://web.dev/performance-scoring/) d́îŕêćt̂ĺŷ f́r̂óm̂ t́ĥéŝé m̂ét̂ŕîćŝ."
|
2545
2545
|
},
|
2546
|
+
"report/renderer/util.js | viewOriginalTraceLabel": {
|
2547
|
+
"message": "V̂íêẃ Ôŕîǵîńâĺ T̂ŕâćê"
|
2548
|
+
},
|
2549
|
+
"report/renderer/util.js | viewTraceLabel": {
|
2550
|
+
"message": "V̂íêẃ T̂ŕâćê"
|
2551
|
+
},
|
2546
2552
|
"report/renderer/util.js | viewTreemapLabel": {
|
2547
2553
|
"message": "V̂íêẃ T̂ŕêém̂áp̂"
|
2548
2554
|
},
|
@@ -289,9 +289,6 @@ export class ReportUIFeatures {
|
|
289
289
|
*/
|
290
290
|
_getThirdPartyRows(rowEls: HTMLElement[], finalUrl: string): Array<HTMLElement>;
|
291
291
|
/**
|
292
|
-
* DevTools uses its own file manager to download files, so it redefines this function.
|
293
|
-
* Wrapper is necessary so DevTools can still override this function.
|
294
|
-
*
|
295
292
|
* @param {Blob|File} blob
|
296
293
|
*/
|
297
294
|
_saveFile(blob: Blob | File): void;
|
@@ -626,6 +626,10 @@ const UIStrings = {
|
|
626
626
|
thirdPartyResourcesLabel: 'Show 3rd-party resources',
|
627
627
|
/** This label is for a button that opens a new tab to a webapp called "Treemap", which is a nested visual representation of a heierarchy of data related to the reports (script bytes and coverage, resource breakdown, etc.) */
|
628
628
|
viewTreemapLabel: 'View Treemap',
|
629
|
+
/** This label is for a button that will show the user a trace of the page. */
|
630
|
+
viewTraceLabel: 'View Trace',
|
631
|
+
/** This label is for a button that will show the user a trace of the page. */
|
632
|
+
viewOriginalTraceLabel: 'View Original Trace',
|
629
633
|
|
630
634
|
/** Option in a dropdown menu that opens a small, summary report in a print dialog. */
|
631
635
|
dropdownPrintSummary: 'Print Summary',
|
@@ -1041,7 +1045,7 @@ function createGaugePwaComponent(dom) {
|
|
1041
1045
|
function createHeadingComponent(dom) {
|
1042
1046
|
const el0 = dom.createFragment();
|
1043
1047
|
const el1 = dom.createElement('style');
|
1044
|
-
el1.append('\n /* CSS Fireworks. Originally by Eddie Lin\n https://codepen.io/paulirish/pen/yEVMbP\n */\n .lh-pyro {\n display: none;\n z-index: 1;\n pointer-events: none;\n }\n .lh-score100 .lh-pyro {\n display: block;\n }\n .lh-score100 .lh-lighthouse stop:first-child {\n stop-color: hsla(200, 12%, 95%, 0);\n }\n .lh-score100 .lh-lighthouse stop:last-child {\n stop-color: hsla(65, 81%, 76%, 1);\n }\n\n .lh-pyro > .lh-pyro-before, .lh-pyro > .lh-pyro-after {\n position: absolute;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n box-shadow: 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff;\n animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;\n animation-delay: 1s, 1s, 1s;\n }\n\n .lh-pyro > .lh-pyro-after {\n animation-delay: 2.25s, 2.25s, 2.25s;\n animation-duration: 1.25s, 1.25s, 6.25s;\n }\n
|
1048
|
+
el1.append('\n /* CSS Fireworks. Originally by Eddie Lin\n https://codepen.io/paulirish/pen/yEVMbP\n */\n .lh-pyro {\n display: none;\n z-index: 1;\n pointer-events: none;\n }\n .lh-score100 .lh-pyro {\n display: block;\n }\n .lh-score100 .lh-lighthouse stop:first-child {\n stop-color: hsla(200, 12%, 95%, 0);\n }\n .lh-score100 .lh-lighthouse stop:last-child {\n stop-color: hsla(65, 81%, 76%, 1);\n }\n\n .lh-pyro > .lh-pyro-before, .lh-pyro > .lh-pyro-after {\n position: absolute;\n width: 5px;\n height: 5px;\n border-radius: 2.5px;\n box-shadow: 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff, 0 0 #fff;\n animation: 1s bang ease-out infinite backwards, 1s gravity ease-in infinite backwards, 5s position linear infinite backwards;\n animation-delay: 1s, 1s, 1s;\n }\n\n .lh-pyro > .lh-pyro-after {\n animation-delay: 2.25s, 2.25s, 2.25s;\n animation-duration: 1.25s, 1.25s, 6.25s;\n }\n\n @keyframes bang {\n to {\n box-shadow: -70px -115.67px #47ebbc, -28px -99.67px #eb47a4, 58px -31.67px #7eeb47, 13px -141.67px #eb47c5, -19px 6.33px #7347eb, -2px -74.67px #ebd247, 24px -151.67px #eb47e0, 57px -138.67px #b4eb47, -51px -104.67px #479eeb, 62px 8.33px #ebcf47, -93px 0.33px #d547eb, -16px -118.67px #47bfeb, 53px -84.67px #47eb83, 66px -57.67px #eb47bf, -93px -65.67px #91eb47, 30px -13.67px #86eb47, -2px -59.67px #83eb47, -44px 1.33px #eb47eb, 61px -58.67px #47eb73, 5px -22.67px #47e8eb, -66px -28.67px #ebe247, 42px -123.67px #eb5547, -75px 26.33px #7beb47, 15px -52.67px #a147eb, 36px -51.67px #eb8347, -38px -12.67px #eb5547, -46px -59.67px #47eb81, 78px -114.67px #eb47ba, 15px -156.67px #eb47bf, -36px 1.33px #eb4783, -72px -86.67px #eba147, 31px -46.67px #ebe247, -68px 29.33px #47e2eb, -55px 19.33px #ebe047, -56px 27.33px #4776eb, -13px -91.67px #eb5547, -47px -138.67px #47ebc7, -18px -96.67px #eb47ac, 11px -88.67px #4783eb, -67px -28.67px #47baeb, 53px 10.33px #ba47eb, 11px 19.33px #5247eb, -5px -11.67px #eb4791, -68px -4.67px #47eba7, 95px -37.67px #eb478b, -67px -162.67px #eb5d47, -54px -120.67px #eb6847, 49px -12.67px #ebe047, 88px 8.33px #47ebda, 97px 33.33px #eb8147, 6px -71.67px #ebbc47;\n }\n }\n @keyframes gravity {\n to {\n transform: translateY(80px);\n opacity: 0;\n }\n }\n @keyframes position {\n 0%, 19.9% {\n margin-top: 4%;\n margin-left: 47%;\n }\n 20%, 39.9% {\n margin-top: 7%;\n margin-left: 30%;\n }\n 40%, 59.9% {\n margin-top: 6%;\n margin-left: 70%;\n }\n 60%, 79.9% {\n margin-top: 3%;\n margin-left: 20%;\n }\n 80%, 99.9% {\n margin-top: 3%;\n margin-left: 80%;\n }\n }\n ');
|
1045
1049
|
el0.append(el1);
|
1046
1050
|
const el2 = dom.createElement('div', 'lh-header-container');
|
1047
1051
|
const el3 = dom.createElement('div', 'lh-scores-wrapper-placeholder');
|
@@ -1142,8 +1146,8 @@ function createScoresWrapperComponent(dom) {
|
|
1142
1146
|
const el2 = dom.createElement('div', 'lh-scores-wrapper');
|
1143
1147
|
const el3 = dom.createElement('div', 'lh-scores-container');
|
1144
1148
|
const el4 = dom.createElement('div', 'lh-pyro');
|
1145
|
-
const el5 = dom.createElement('div', 'lh-before');
|
1146
|
-
const el6 = dom.createElement('div', 'lh-after');
|
1149
|
+
const el5 = dom.createElement('div', 'lh-pyro-before');
|
1150
|
+
const el6 = dom.createElement('div', 'lh-pyro-after');
|
1147
1151
|
el4.append(' ', el5, ' ', el6, ' ');
|
1148
1152
|
el3.append(' ', el4, ' ');
|
1149
1153
|
el2.append(' ', el3, ' ');
|
@@ -1772,10 +1776,8 @@ class DOM {
|
|
1772
1776
|
* @param {string} filename
|
1773
1777
|
*/
|
1774
1778
|
saveFile(blob, filename) {
|
1775
|
-
const ext = blob.type.match('json') ? '.json' : '.html';
|
1776
|
-
|
1777
1779
|
const a = this.createElement('a');
|
1778
|
-
a.download =
|
1780
|
+
a.download = filename;
|
1779
1781
|
this.safelySetBlobHref(a, blob);
|
1780
1782
|
this._document.body.appendChild(a); // Firefox requires anchor to be in the DOM.
|
1781
1783
|
a.click();
|
@@ -5497,7 +5499,11 @@ class TopbarFeatures {
|
|
5497
5499
|
}
|
5498
5500
|
|
5499
5501
|
_print() {
|
5500
|
-
|
5502
|
+
if (this._reportUIFeatures._opts.onPrintOverride) {
|
5503
|
+
this._reportUIFeatures._opts.onPrintOverride(this._dom.rootEl);
|
5504
|
+
} else {
|
5505
|
+
self.print();
|
5506
|
+
}
|
5501
5507
|
}
|
5502
5508
|
|
5503
5509
|
/**
|
@@ -5725,12 +5731,13 @@ class ReportUIFeatures {
|
|
5725
5731
|
this._setupThirdPartyFilter();
|
5726
5732
|
this._setupElementScreenshotOverlay(this._dom.rootEl);
|
5727
5733
|
|
5728
|
-
let turnOffTheLights = false;
|
5729
5734
|
// Do not query the system preferences for DevTools - DevTools should only apply dark theme
|
5730
5735
|
// if dark is selected in the settings panel.
|
5731
|
-
|
5736
|
+
// TODO: set `disableDarkMode` in devtools and delete this special case.
|
5737
|
+
const disableDarkMode = this._dom.isDevTools() ||
|
5738
|
+
this._opts.disableDarkMode || this._opts.disableAutoDarkModeAndFireworks;
|
5732
5739
|
if (!disableDarkMode && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
5733
|
-
|
5740
|
+
toggleDarkTheme(this._dom, true);
|
5734
5741
|
}
|
5735
5742
|
|
5736
5743
|
// Fireworks!
|
@@ -5740,13 +5747,12 @@ class ReportUIFeatures {
|
|
5740
5747
|
const cat = lhr.categories[id];
|
5741
5748
|
return cat && cat.score === 1;
|
5742
5749
|
});
|
5743
|
-
|
5744
|
-
|
5750
|
+
const disableFireworks =
|
5751
|
+
this._opts.disableFireworks || this._opts.disableAutoDarkModeAndFireworks;
|
5752
|
+
if (scoresAll100 && !disableFireworks) {
|
5745
5753
|
this._enableFireworks();
|
5746
|
-
|
5747
|
-
|
5748
|
-
if (turnOffTheLights) {
|
5749
|
-
toggleDarkTheme(this._dom, true);
|
5754
|
+
// If dark mode is allowed, force it on because it looks so much better.
|
5755
|
+
if (!disableDarkMode) toggleDarkTheme(this._dom, true);
|
5750
5756
|
}
|
5751
5757
|
|
5752
5758
|
// Show the metric descriptions by default when there is an error.
|
@@ -5767,6 +5773,15 @@ class ReportUIFeatures {
|
|
5767
5773
|
});
|
5768
5774
|
}
|
5769
5775
|
|
5776
|
+
if (this._opts.onViewTrace) {
|
5777
|
+
this.addButton({
|
5778
|
+
text: lhr.configSettings.throttlingMethod === 'simulate' ?
|
5779
|
+
Util.i18n.strings.viewOriginalTraceLabel :
|
5780
|
+
Util.i18n.strings.viewTraceLabel,
|
5781
|
+
onClick: () => this._opts.onViewTrace?.(),
|
5782
|
+
});
|
5783
|
+
}
|
5784
|
+
|
5770
5785
|
if (this._opts.getStandaloneReportHTML) {
|
5771
5786
|
this._dom.find('a[data-action="save-html"]', this._dom.rootEl).classList.remove('lh-hidden');
|
5772
5787
|
}
|
@@ -5835,9 +5850,6 @@ class ReportUIFeatures {
|
|
5835
5850
|
_enableFireworks() {
|
5836
5851
|
const scoresContainer = this._dom.find('.lh-scores-container', this._dom.rootEl);
|
5837
5852
|
scoresContainer.classList.add('lh-score100');
|
5838
|
-
scoresContainer.addEventListener('click', _ => {
|
5839
|
-
scoresContainer.classList.toggle('lh-fireworks-paused');
|
5840
|
-
});
|
5841
5853
|
}
|
5842
5854
|
|
5843
5855
|
_setupMediaQueryListeners() {
|
@@ -5994,14 +6006,16 @@ class ReportUIFeatures {
|
|
5994
6006
|
}
|
5995
6007
|
|
5996
6008
|
/**
|
5997
|
-
* DevTools uses its own file manager to download files, so it redefines this function.
|
5998
|
-
* Wrapper is necessary so DevTools can still override this function.
|
5999
|
-
*
|
6000
6009
|
* @param {Blob|File} blob
|
6001
6010
|
*/
|
6002
6011
|
_saveFile(blob) {
|
6003
|
-
const
|
6004
|
-
this.
|
6012
|
+
const ext = blob.type.match('json') ? '.json' : '.html';
|
6013
|
+
const filename = fileNamer.getLhrFilenamePrefix(this.json) + ext;
|
6014
|
+
if (this._opts.onSaveFileOverride) {
|
6015
|
+
this._opts.onSaveFileOverride(blob, filename);
|
6016
|
+
} else {
|
6017
|
+
this._dom.saveFile(blob, filename);
|
6018
|
+
}
|
6005
6019
|
}
|
6006
6020
|
}
|
6007
6021
|
|