chrome-devtools-frontend 1.0.1654411 → 1.0.1656291
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/.agents/skills/ui-eng-vision-local-lit-renderer/SKILL.md +116 -0
- package/.agents/skills/ui-eng-vision-logic-consolidator/SKILL.md +82 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +123 -0
- package/.agents/skills/ui-eng-vision-test-scaffolder/SKILL.md +125 -0
- package/.agents/skills/ui-eng-vision-widget-promoter/SKILL.md +75 -0
- package/AUTHORS +1 -0
- package/config/owner/COMMON_OWNERS +0 -4
- package/docs/playbook.md +1 -1
- package/front_end/Tests.js +1 -0
- package/front_end/core/common/Settings.ts +47 -30
- package/front_end/core/sdk/CPUThrottlingManager.ts +10 -159
- package/front_end/core/sdk/ConsoleModel.ts +13 -11
- package/front_end/core/sdk/DOMDebuggerModel.ts +11 -5
- package/front_end/core/sdk/EventBreakpointsModel.ts +9 -5
- package/front_end/core/sdk/IsolateManager.ts +6 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +5 -3
- package/front_end/core/sdk/TargetManager.ts +17 -0
- package/front_end/entrypoints/devtools_app/devtools_app.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +12 -36
- package/front_end/foundation/Universe.ts +98 -3
- package/front_end/generated/InspectorBackendCommands.ts +5 -1
- package/front_end/generated/SupportedCSSProperties.js +2 -6
- package/front_end/generated/protocol-mapping.d.ts +8 -0
- package/front_end/generated/protocol-proxy-api.d.ts +15 -0
- package/front_end/generated/protocol.ts +36 -1
- package/front_end/models/ai_assistance/AiConversation.ts +0 -6
- package/front_end/models/ai_assistance/agents/NetworkAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -156
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +0 -24
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -358
- package/front_end/models/ai_assistance/ai_assistance.ts +0 -6
- package/front_end/models/ai_assistance/contexts/RequestContext.snapshot.txt +0 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +0 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -14
- package/front_end/models/autofill_manager/AutofillManager.ts +1 -2
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/persistence/AutomaticFileSystemManager.ts +14 -13
- package/front_end/models/persistence/AutomaticFileSystemWorkspaceBinding.ts +12 -9
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +18 -9
- package/front_end/models/project_settings/ProjectSettingsModel.ts +12 -11
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +14 -59
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +3 -29
- package/front_end/panels/application/DeviceBoundSessionsView.ts +15 -3
- package/front_end/panels/application/FrameDetailsView.ts +2 -1
- package/front_end/panels/application/ServiceWorkersView.ts +23 -16
- package/front_end/panels/common/CPUThrottlingOption.ts +142 -0
- package/front_end/panels/common/ThrottlingUtils.ts +9 -4
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +45 -0
- package/front_end/panels/elements/ElementsPanel.ts +0 -74
- package/front_end/panels/elements/ElementsTreeOutline.ts +0 -4
- package/front_end/panels/emulation/DeviceModeToolbar.ts +46 -45
- package/front_end/panels/mobile_throttling/CalibrationController.ts +6 -5
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +1 -1
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +40 -13
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +13 -17
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +15 -13
- package/front_end/panels/network/NetworkLogView.ts +0 -9
- package/front_end/panels/network/NetworkPanel.ts +1 -63
- package/front_end/panels/network/RequestInitiatorView.ts +29 -4
- package/front_end/panels/network/components/HeaderSectionRow.css +9 -7
- package/front_end/panels/network/components/HeaderSectionRow.ts +20 -1
- package/front_end/panels/network/components/RequestHeaderSection.css +5 -3
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -2
- package/front_end/panels/network/components/RequestHeadersView.css +1 -1
- package/front_end/panels/security/SecurityPanel.ts +36 -23
- package/front_end/panels/settings/SettingsScreen.ts +18 -103
- package/front_end/panels/settings/settings-meta.ts +0 -24
- package/front_end/panels/timeline/TimelineController.ts +3 -2
- package/front_end/panels/timeline/TimelinePanel.ts +20 -3
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +15 -14
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -0
- package/front_end/panels/utils/utils.ts +25 -24
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +96 -83
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +10 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/CDPSession.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Target.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +2 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +23 -13
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +4 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Input.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/LifecycleWatcher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts +3 -41
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/WebMCP.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConnectOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +4 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/LaunchOptions.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/httpUtils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +34 -55
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +2 -3
- package/front_end/third_party/puppeteer/package/src/api/CDPSession.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/api/Realm.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/api/Target.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +1 -2
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +13 -3
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +24 -13
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Input.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/LifecycleWatcher.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +2 -4
- package/front_end/third_party/puppeteer/package/src/cdp/WebMCP.ts +7 -76
- package/front_end/third_party/puppeteer/package/src/common/ConnectOptions.ts +1 -4
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +4 -1
- package/front_end/third_party/puppeteer/package/src/node/LaunchOptions.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/httpUtils.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +3 -0
- package/front_end/ui/components/markdown_view/MarkdownLinksMap.ts +0 -7
- package/front_end/ui/helpers/OpenInNewTab.ts +15 -7
- package/front_end/ui/legacy/TabbedPane.ts +1 -108
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +9 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +172 -123
- package/front_end/ui/legacy/components/data_grid/DataGridExporter.ts +89 -0
- package/front_end/ui/legacy/components/data_grid/dataGrid.css +10 -0
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +3 -1
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +89 -40
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/Images/navigationControls.png +0 -0
- package/front_end/Images/navigationControls_2x.png +0 -0
- package/front_end/Images/popoverArrows.png +0 -0
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -746
- package/front_end/entrypoints/greendev_floaty/floaty.css +0 -301
- package/front_end/entrypoints/greendev_floaty/floaty.html +0 -38
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -415
- package/front_end/models/ai_assistance/agents/GreenDevAgent.ts +0 -834
- package/front_end/models/ai_assistance/agents/GreenDevAgentAntigravityCliSocketClient.ts +0 -53
- package/front_end/models/ai_assistance/agents/GreenDevAgentGeminiCliSocketClient.ts +0 -117
- package/front_end/models/annotations/AnnotationRepository.ts +0 -238
- package/front_end/models/annotations/AnnotationType.ts +0 -10
- package/front_end/models/annotations/README.md +0 -7
- package/front_end/models/annotations/annotations.ts +0 -6
- package/front_end/models/greendev/Prototypes.ts +0 -68
- package/front_end/models/greendev/README.md +0 -5
- package/front_end/models/greendev/greendev.ts +0 -5
- package/front_end/panels/common/Annotation.ts +0 -184
- package/front_end/panels/common/AnnotationManager.ts +0 -208
- package/front_end/panels/common/annotation.css +0 -40
- package/front_end/panels/greendev/GreenDevPanel.css +0 -282
- package/front_end/panels/greendev/GreenDevPanel.ts +0 -364
- package/front_end/panels/greendev/GreenDevShared.ts +0 -13
- package/front_end/panels/greendev/greendev-meta.ts +0 -52
- package/front_end/panels/greendev/greendev.ts +0 -9
|
@@ -12,7 +12,7 @@ import * as Protocol from '../../generated/protocol.js';
|
|
|
12
12
|
import * as NetworkForward from '../../panels/network/forward/forward.js';
|
|
13
13
|
import {createIcon, type Icon} from '../../ui/kit/kit.js';
|
|
14
14
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
15
|
-
import {html, render} from '../../ui/lit/lit.js';
|
|
15
|
+
import {html, render, type TemplateResult} from '../../ui/lit/lit.js';
|
|
16
16
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
17
17
|
|
|
18
18
|
import lockIconStyles from './lockIcon.css.js';
|
|
@@ -510,26 +510,31 @@ export function getSecurityStateIconForOverview(
|
|
|
510
510
|
return createIcon(iconName, className);
|
|
511
511
|
}
|
|
512
512
|
|
|
513
|
-
|
|
513
|
+
function renderHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): TemplateResult {
|
|
514
514
|
const schemeSeparator = '://';
|
|
515
515
|
const index = url.indexOf(schemeSeparator);
|
|
516
516
|
|
|
517
517
|
// If the separator is not found, just display the text without highlighting.
|
|
518
518
|
if (index === -1) {
|
|
519
|
-
|
|
520
|
-
text.textContent = url;
|
|
521
|
-
return text;
|
|
519
|
+
return html`<span>${url}</span>`;
|
|
522
520
|
}
|
|
523
521
|
|
|
524
|
-
const highlightedUrl = document.createElement('span');
|
|
525
|
-
highlightedUrl.classList.add('highlighted-url');
|
|
526
522
|
const scheme = url.substr(0, index);
|
|
527
523
|
const content = url.substr(index + schemeSeparator.length);
|
|
528
|
-
highlightedUrl.createChild('span', 'url-scheme-' + securityState).textContent = scheme;
|
|
529
|
-
highlightedUrl.createChild('span', 'url-scheme-separator').textContent = schemeSeparator;
|
|
530
|
-
highlightedUrl.createChild('span').textContent = content;
|
|
531
524
|
|
|
532
|
-
return
|
|
525
|
+
return html`
|
|
526
|
+
<span class="highlighted-url">
|
|
527
|
+
<span class=${`url-scheme-${securityState}`}>${scheme}</span>
|
|
528
|
+
<span class="url-scheme-separator">${schemeSeparator}</span>
|
|
529
|
+
<span>${content}</span>
|
|
530
|
+
</span>`;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export function createHighlightedUrl(url: Platform.DevToolsPath.UrlString, securityState: string): Element {
|
|
534
|
+
const fragment = document.createDocumentFragment();
|
|
535
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
536
|
+
render(renderHighlightedUrl(url, securityState), fragment);
|
|
537
|
+
return fragment.firstElementChild as Element;
|
|
533
538
|
}
|
|
534
539
|
|
|
535
540
|
export interface ViewInput {
|
|
@@ -1315,11 +1320,14 @@ export class SecurityMainView extends UI.Widget.VBox {
|
|
|
1315
1320
|
}
|
|
1316
1321
|
|
|
1317
1322
|
export class SecurityOriginView extends UI.Widget.VBox {
|
|
1318
|
-
|
|
1323
|
+
readonly #origin: Platform.DevToolsPath.UrlString;
|
|
1324
|
+
readonly #originDisplay: HTMLElement;
|
|
1325
|
+
|
|
1319
1326
|
constructor(origin: Platform.DevToolsPath.UrlString, originState: OriginState) {
|
|
1320
1327
|
super({jslog: `${VisualLogging.pane('security.origin-view')}`});
|
|
1321
1328
|
this.registerRequiredCSS(originViewStyles, lockIconStyles);
|
|
1322
1329
|
this.setMinimumSize(200, 100);
|
|
1330
|
+
this.#origin = origin;
|
|
1323
1331
|
|
|
1324
1332
|
this.element.classList.add('security-origin-view');
|
|
1325
1333
|
|
|
@@ -1328,13 +1336,8 @@ export class SecurityOriginView extends UI.Widget.VBox {
|
|
|
1328
1336
|
titleDiv.textContent = i18nString(UIStrings.origin);
|
|
1329
1337
|
UI.ARIAUtils.markAsHeading(titleDiv, 1);
|
|
1330
1338
|
|
|
1331
|
-
|
|
1332
|
-
this.
|
|
1333
|
-
const icon = getSecurityStateIconForDetailedView(
|
|
1334
|
-
originState.securityState, `security-property security-property-${originState.securityState}`);
|
|
1335
|
-
this.originLockIcon.appendChild(icon);
|
|
1336
|
-
|
|
1337
|
-
originDisplay.appendChild(createHighlightedUrl(origin, originState.securityState));
|
|
1339
|
+
this.#originDisplay = titleSection.createChild('div', 'origin-display');
|
|
1340
|
+
this.#renderOriginDisplay(originState.securityState);
|
|
1338
1341
|
|
|
1339
1342
|
const originNetworkDiv = titleSection.createChild('div', 'view-network-button');
|
|
1340
1343
|
const originNetworkButton = UI.UIUtils.createTextButton(i18nString(UIStrings.viewRequestsInNetworkPanel), event => {
|
|
@@ -1573,10 +1576,20 @@ export class SecurityOriginView extends UI.Widget.VBox {
|
|
|
1573
1576
|
}
|
|
1574
1577
|
|
|
1575
1578
|
setSecurityState(newSecurityState: Protocol.Security.SecurityState): void {
|
|
1576
|
-
this
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1579
|
+
this.#renderOriginDisplay(newSecurityState);
|
|
1580
|
+
}
|
|
1581
|
+
|
|
1582
|
+
#renderOriginDisplay(securityState: Protocol.Security.SecurityState): void {
|
|
1583
|
+
const icon =
|
|
1584
|
+
getSecurityStateIconForDetailedView(securityState, `security-property security-property-${securityState}`);
|
|
1585
|
+
|
|
1586
|
+
// clang-format off
|
|
1587
|
+
// eslint-disable-next-line @devtools/no-lit-render-outside-of-view
|
|
1588
|
+
render(html`
|
|
1589
|
+
${icon}
|
|
1590
|
+
${renderHighlightedUrl(this.#origin, securityState)}
|
|
1591
|
+
`, this.#originDisplay);
|
|
1592
|
+
// clang-format on
|
|
1580
1593
|
}
|
|
1581
1594
|
}
|
|
1582
1595
|
|
|
@@ -11,14 +11,13 @@ import * as Common from '../../core/common/common.js';
|
|
|
11
11
|
import * as Host from '../../core/host/host.js';
|
|
12
12
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
13
13
|
import * as Root from '../../core/root/root.js';
|
|
14
|
-
import * as GreenDev from '../../models/greendev/greendev.js';
|
|
15
14
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
16
15
|
import * as UIHelpers from '../../ui/helpers/helpers.js';
|
|
17
16
|
import {type Card, createIcon, Link} from '../../ui/kit/kit.js';
|
|
18
17
|
import * as SettingsUI from '../../ui/legacy/components/settings_ui/settings_ui.js';
|
|
19
18
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
20
19
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
21
|
-
import {html,
|
|
20
|
+
import {html, render} from '../../ui/lit/lit.js';
|
|
22
21
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
23
22
|
import {PanelUtils} from '../utils/utils.js';
|
|
24
23
|
|
|
@@ -51,11 +50,6 @@ const UIStrings = {
|
|
|
51
50
|
* @description Message shown in the experiments panel to warn users about any possible unstable features.
|
|
52
51
|
*/
|
|
53
52
|
theseExperimentsCouldBeUnstable: 'Warning: These experiments could be unstable or unreliable.',
|
|
54
|
-
/**
|
|
55
|
-
* @description Message shown in the GreenDev prototypes panel to warn users about any possible unstable features.
|
|
56
|
-
*/
|
|
57
|
-
greenDevUnstable:
|
|
58
|
-
'Warning: All these features are prototype and very unstable. They exist for user testing and are not designed to be relied on.',
|
|
59
53
|
/**
|
|
60
54
|
* @description Message to display if a setting change requires a reload of DevTools
|
|
61
55
|
*/
|
|
@@ -276,14 +270,14 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
|
276
270
|
);
|
|
277
271
|
|
|
278
272
|
for (const sectionCategory of explicitSectionOrder) {
|
|
279
|
-
const settingsForSection = preRegisteredSettings.filter(
|
|
280
|
-
|
|
273
|
+
const settingsForSection = preRegisteredSettings.filter(setting => setting.category === sectionCategory &&
|
|
274
|
+
GenericSettingsTab.isSettingVisible(setting));
|
|
281
275
|
this.createSectionElement(sectionCategory, settingsForSection);
|
|
282
276
|
}
|
|
283
277
|
|
|
284
|
-
const restoreAndReloadButton =
|
|
285
|
-
i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
|
|
286
|
-
|
|
278
|
+
const restoreAndReloadButton =
|
|
279
|
+
UI.UIUtils.createTextButton(i18nString(UIStrings.restoreDefaultsAndReload), restoreAndReload,
|
|
280
|
+
{jslogContext: 'settings.restore-defaults-and-reload'});
|
|
287
281
|
this.containerElement.appendChild(restoreAndReloadButton);
|
|
288
282
|
|
|
289
283
|
function restoreAndReload(): void {
|
|
@@ -335,8 +329,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
|
335
329
|
this.createStandardSectionElement(sectionName, settings, element);
|
|
336
330
|
}
|
|
337
331
|
|
|
338
|
-
private createSectionElement(
|
|
339
|
-
|
|
332
|
+
private createSectionElement(category: Common.Settings.SettingCategory,
|
|
333
|
+
settings: Common.Settings.SettingRegistration[]): void {
|
|
340
334
|
// Always create the EXTENSIONS section and append the link handling control.
|
|
341
335
|
if (category === Common.Settings.SettingCategory.EXTENSIONS) {
|
|
342
336
|
this.createExtensionSection(settings);
|
|
@@ -350,9 +344,8 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
|
350
344
|
}
|
|
351
345
|
}
|
|
352
346
|
|
|
353
|
-
private createStandardSectionElement(
|
|
354
|
-
|
|
355
|
-
content?: Element): void {
|
|
347
|
+
private createStandardSectionElement(category: Common.Settings.SettingCategory,
|
|
348
|
+
settings: Common.Settings.SettingRegistration[], content?: Element): void {
|
|
356
349
|
const uiSectionName = Common.Settings.getLocalizedSettingsCategory(category);
|
|
357
350
|
const sectionElement = document.createElement('div');
|
|
358
351
|
for (const settingRegistration of settings) {
|
|
@@ -399,15 +392,14 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
|
|
|
399
392
|
|
|
400
393
|
const filterSection = this.containerElement.createChild('div');
|
|
401
394
|
filterSection.classList.add('experiments-filter');
|
|
402
|
-
render(
|
|
403
|
-
html`
|
|
395
|
+
render(html`
|
|
404
396
|
<devtools-toolbar>
|
|
405
397
|
<devtools-toolbar-input autofocus type="filter" placeholder=${
|
|
406
|
-
|
|
407
|
-
|
|
398
|
+
i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
|
|
399
|
+
this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
|
|
408
400
|
</devtools-toolbar>
|
|
409
401
|
`,
|
|
410
|
-
|
|
402
|
+
filterSection);
|
|
411
403
|
this.renderExperiments('');
|
|
412
404
|
}
|
|
413
405
|
|
|
@@ -455,8 +447,8 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
|
|
|
455
447
|
return subsection;
|
|
456
448
|
}
|
|
457
449
|
|
|
458
|
-
private createExperimentCheckbox(experiment: Root.Runtime.Experiment|
|
|
459
|
-
|
|
450
|
+
private createExperimentCheckbox(experiment: Root.Runtime.Experiment|
|
|
451
|
+
Root.Runtime.HostExperiment): HTMLParagraphElement {
|
|
460
452
|
const checkbox =
|
|
461
453
|
UI.UIUtils.CheckboxLabel.createWithStringLiteral(experiment.title, experiment.isEnabled(), experiment.name);
|
|
462
454
|
checkbox.classList.add('experiment-label');
|
|
@@ -547,8 +539,8 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
547
539
|
}
|
|
548
540
|
export class Revealer implements
|
|
549
541
|
Common.Revealer.Revealer<Root.Runtime.Experiment|Root.Runtime.HostExperiment|Common.Settings.Setting<unknown>> {
|
|
550
|
-
async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|
|
|
551
|
-
|
|
542
|
+
async reveal(object: Root.Runtime.Experiment|Root.Runtime.HostExperiment|
|
|
543
|
+
Common.Settings.Setting<unknown>): Promise<void> {
|
|
552
544
|
const context = UI.Context.Context.instance();
|
|
553
545
|
if (object instanceof Root.Runtime.Experiment || object instanceof Root.Runtime.HostExperiment) {
|
|
554
546
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.bringToFront();
|
|
@@ -599,80 +591,3 @@ export interface ShowSettingsScreenOptions {
|
|
|
599
591
|
name?: string;
|
|
600
592
|
focusTabHeader?: boolean;
|
|
601
593
|
}
|
|
602
|
-
|
|
603
|
-
export class GreenDevSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
604
|
-
#view: View;
|
|
605
|
-
|
|
606
|
-
constructor(view = GREENDEV_VIEW) {
|
|
607
|
-
super({jslog: `${VisualLogging.pane('greendev-prototypes')}`});
|
|
608
|
-
this.element.id = 'greendev-prototypes-tab-content';
|
|
609
|
-
|
|
610
|
-
this.#view = view;
|
|
611
|
-
|
|
612
|
-
this.requestUpdate();
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
highlightObject(_object: Object): void {
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
override performUpdate(): Promise<void>|void {
|
|
619
|
-
const settings = GreenDev.Prototypes.instance().settings();
|
|
620
|
-
this.#view({settings}, {}, this.element);
|
|
621
|
-
}
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
interface GreenDevViewInput {
|
|
625
|
-
settings: GreenDev.GreenDevSettings;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
type View = (input: GreenDevViewInput, output: object, target: HTMLElement) => void;
|
|
629
|
-
const GREENDEV_VIEW: View = (input, _output, target) => {
|
|
630
|
-
// clang-format off
|
|
631
|
-
render(html`
|
|
632
|
-
<div class="settings-card-container">
|
|
633
|
-
<devtools-card .heading=${'GreenDev prototypes'}>
|
|
634
|
-
<div class="experiments-warning-subsection">
|
|
635
|
-
<devtools-icon .name=${'warning'}></devtools-icon>
|
|
636
|
-
<span>${i18nString(UIStrings.greenDevUnstable)}</span>
|
|
637
|
-
</div>
|
|
638
|
-
<div class="settings-experiments-block">
|
|
639
|
-
${renderPrototypeCheckboxes(input.settings, ['aiAnnotations', 'beyondStylingGemini', 'beyondStylingAntigravity', 'emulationCapabilities'])}
|
|
640
|
-
</div>
|
|
641
|
-
</devtools-card>
|
|
642
|
-
</div>
|
|
643
|
-
`, target);
|
|
644
|
-
// clang-format on
|
|
645
|
-
};
|
|
646
|
-
|
|
647
|
-
const GREENDEV_PROTOTYPE_NAMES: Record<keyof GreenDev.GreenDevSettings, string> = {
|
|
648
|
-
aiAnnotations: 'AI auto-annotations',
|
|
649
|
-
beyondStylingGemini: 'Beyond Styling (Gemini CLI)',
|
|
650
|
-
beyondStylingAntigravity: 'Beyond Styling (Antigravity CLI)',
|
|
651
|
-
emulationCapabilities: 'Emulation Capabilities',
|
|
652
|
-
};
|
|
653
|
-
|
|
654
|
-
function renderPrototypeCheckboxes(
|
|
655
|
-
settings: GreenDev.GreenDevSettings,
|
|
656
|
-
keys: Array<keyof GreenDev.GreenDevSettings>,
|
|
657
|
-
): TemplateResult {
|
|
658
|
-
const {bindToSetting} = UI.UIUtils;
|
|
659
|
-
|
|
660
|
-
function showChangeWarning(): void {
|
|
661
|
-
UI.InspectorView.InspectorView.instance().displayReloadRequiredWarning(
|
|
662
|
-
i18nString(UIStrings.settingsChangedReloadDevTools));
|
|
663
|
-
}
|
|
664
|
-
// clang-format off
|
|
665
|
-
const checkboxes = Object.keys(settings).map(name => {
|
|
666
|
-
const settingName = name as keyof GreenDev.GreenDevSettings;
|
|
667
|
-
if(!keys.includes(settingName)) {
|
|
668
|
-
return nothing;
|
|
669
|
-
}
|
|
670
|
-
const setting = settings[settingName];
|
|
671
|
-
const title = GREENDEV_PROTOTYPE_NAMES[settingName];
|
|
672
|
-
return html`<p class="settings-experiment">
|
|
673
|
-
<devtools-checkbox @change=${showChangeWarning} title=${title} ${bindToSetting(setting)}>${title}</devtools-checkbox>
|
|
674
|
-
</p>`;
|
|
675
|
-
});
|
|
676
|
-
return html`${checkboxes}`;
|
|
677
|
-
// clang-format on
|
|
678
|
-
}
|
|
@@ -24,14 +24,6 @@ const UIStrings = {
|
|
|
24
24
|
* @description Text in Settings Screen of the Settings
|
|
25
25
|
*/
|
|
26
26
|
experiments: 'Experiments',
|
|
27
|
-
/**
|
|
28
|
-
* @description Text in Settings Screen of the Settings
|
|
29
|
-
*/
|
|
30
|
-
greenDevProtoTypes: 'GreenDev',
|
|
31
|
-
/**
|
|
32
|
-
* @description Command for showing the GreenDev tab in the Settings Screen
|
|
33
|
-
*/
|
|
34
|
-
showGreenDev: 'Show GreenDev',
|
|
35
27
|
/**
|
|
36
28
|
* @description Title of Ignore list settings
|
|
37
29
|
*/
|
|
@@ -162,22 +154,6 @@ UI.ViewManager.registerViewExtension({
|
|
|
162
154
|
iconName: 'clear-list',
|
|
163
155
|
});
|
|
164
156
|
|
|
165
|
-
UI.ViewManager.registerViewExtension({
|
|
166
|
-
location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
|
|
167
|
-
id: 'greendev-prototypes',
|
|
168
|
-
title: i18nLazyString(UIStrings.greenDevProtoTypes),
|
|
169
|
-
commandPrompt: i18nLazyString(UIStrings.showGreenDev),
|
|
170
|
-
order: 101,
|
|
171
|
-
async loadView() {
|
|
172
|
-
const Settings = await loadSettingsModule();
|
|
173
|
-
return new Settings.SettingsScreen.GreenDevSettingsTab();
|
|
174
|
-
},
|
|
175
|
-
iconName: 'experiment',
|
|
176
|
-
condition: config => {
|
|
177
|
-
return Boolean(config?.devToolsGreenDevUi?.enabled);
|
|
178
|
-
},
|
|
179
|
-
});
|
|
180
|
-
|
|
181
157
|
UI.ViewManager.registerViewExtension({
|
|
182
158
|
location: UI.ViewManager.ViewLocationValues.SETTINGS_VIEW,
|
|
183
159
|
id: 'keybinds',
|
|
@@ -11,6 +11,7 @@ import * as CrUXManager from '../../models/crux-manager/crux-manager.js';
|
|
|
11
11
|
import * as LiveMetrics from '../../models/live-metrics/live-metrics.js';
|
|
12
12
|
import * as Trace from '../../models/trace/trace.js';
|
|
13
13
|
import * as PanelCommon from '../../panels/common/common.js';
|
|
14
|
+
import * as MobileThrottling from '../../panels/mobile_throttling/mobile_throttling.js';
|
|
14
15
|
import * as Tracing from '../../services/tracing/tracing.js';
|
|
15
16
|
|
|
16
17
|
import * as RecordingMetadata from './RecordingMetadata.js';
|
|
@@ -355,9 +356,9 @@ export class TimelineController implements Tracing.TracingManager.TracingManager
|
|
|
355
356
|
// temporarily disable throttling whilst the final trace event collection
|
|
356
357
|
// takes place. Once it is done, we re-enable it (this is the existing
|
|
357
358
|
// behaviour within DevTools; the throttling settling is sticky + global).
|
|
358
|
-
const throttlingManager =
|
|
359
|
+
const throttlingManager = MobileThrottling.ThrottlingManager.throttlingManager();
|
|
359
360
|
const optionDuringRecording = throttlingManager.cpuThrottlingOption();
|
|
360
|
-
throttlingManager.setCPUThrottlingOption(
|
|
361
|
+
throttlingManager.setCPUThrottlingOption(PanelCommon.CPUThrottlingOption.NoThrottlingOption);
|
|
361
362
|
|
|
362
363
|
this.client.loadingStarted();
|
|
363
364
|
|
|
@@ -316,6 +316,9 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
316
316
|
|
|
317
317
|
let timelinePanelInstance: TimelinePanel|undefined;
|
|
318
318
|
|
|
319
|
+
// Total time to wait for source maps to load before giving up so trace processing can proceed.
|
|
320
|
+
const SOURCE_MAP_LOAD_TIMEOUT_MS = 5000;
|
|
321
|
+
|
|
319
322
|
/**
|
|
320
323
|
* Represents the states that the timeline panel can be in.
|
|
321
324
|
* If you need to change the panel's view, use the {@link TimelinePanel.#changeView} method.
|
|
@@ -2649,12 +2652,19 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2649
2652
|
};
|
|
2650
2653
|
|
|
2651
2654
|
metadata.sourceMaps = [];
|
|
2655
|
+
await this.#handleSourceMapPromise(parsedTrace, handleScript);
|
|
2656
|
+
}
|
|
2652
2657
|
|
|
2658
|
+
async #handleSourceMapPromise(parsedTrace: Trace.TraceModel.ParsedTrace,
|
|
2659
|
+
handleScript: (script: Trace.Handlers.ModelHandlers.Scripts.Script) => Promise<void>):
|
|
2660
|
+
Promise<void> {
|
|
2653
2661
|
const promises = [];
|
|
2654
2662
|
for (const script of parsedTrace?.data.Scripts.scripts.values() ?? []) {
|
|
2655
2663
|
promises.push(handleScript(script));
|
|
2656
2664
|
}
|
|
2657
|
-
|
|
2665
|
+
|
|
2666
|
+
const timeout = new Promise<void>(resolve => setTimeout(resolve, SOURCE_MAP_LOAD_TIMEOUT_MS));
|
|
2667
|
+
await Promise.race([Promise.allSettled(promises), timeout]);
|
|
2658
2668
|
}
|
|
2659
2669
|
|
|
2660
2670
|
#createSourceMapResolver(isFreshRecording: boolean, metadata: Trace.Types.File.MetaData|null):
|
|
@@ -2688,7 +2698,8 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2688
2698
|
return await debuggerModel.sourceMapManager().sourceMapForClientPromise(script);
|
|
2689
2699
|
}
|
|
2690
2700
|
|
|
2691
|
-
|
|
2701
|
+
async function resolveSourceMap(params: Trace.Types.Configuration.ResolveSourceMapParams):
|
|
2702
|
+
Promise<SDK.SourceMap.SourceMap|null> {
|
|
2692
2703
|
const {scriptId, scriptUrl, sourceUrl, sourceMapUrl, frame, cachedRawSourceMap} = params;
|
|
2693
2704
|
|
|
2694
2705
|
if (cachedRawSourceMap) {
|
|
@@ -2745,7 +2756,13 @@ export class TimelinePanel extends Common.ObjectWrapper.eventMixin<EventTypes, t
|
|
|
2745
2756
|
const payload = await SDK.SourceMapManager.tryLoadSourceMap(
|
|
2746
2757
|
TimelinePanel.instance().#resourceLoader, sourceMapUrl, initiator);
|
|
2747
2758
|
return payload ? new SDK.SourceMap.SourceMap(sourceUrl, sourceMapUrl, payload) : null;
|
|
2748
|
-
}
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2761
|
+
const timeout = new Promise<null>(resolve => setTimeout(() => resolve(null), SOURCE_MAP_LOAD_TIMEOUT_MS));
|
|
2762
|
+
return function resolveSourceMapWithTimeout(params: Trace.Types.Configuration.ResolveSourceMapParams):
|
|
2763
|
+
Promise<SDK.SourceMap.SourceMap|null> {
|
|
2764
|
+
return Promise.race([resolveSourceMap(params), timeout]);
|
|
2765
|
+
};
|
|
2749
2766
|
}
|
|
2750
2767
|
|
|
2751
2768
|
async #retainResourceContentsForEnhancedTrace(
|
|
@@ -12,6 +12,7 @@ import type * as Menus from '../../../ui/components/menus/menus.js';
|
|
|
12
12
|
import * as UI from '../../../ui/legacy/legacy.js';
|
|
13
13
|
import * as Lit from '../../../ui/lit/lit.js';
|
|
14
14
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
|
15
|
+
import * as PanelsCommon from '../../common/common.js';
|
|
15
16
|
import * as MobileThrottling from '../../mobile_throttling/mobile_throttling.js';
|
|
16
17
|
|
|
17
18
|
import cpuThrottlingSelectorStyles from './cpuThrottlingSelector.css.js';
|
|
@@ -57,22 +58,22 @@ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
|
57
58
|
|
|
58
59
|
interface CPUThrottlingGroup {
|
|
59
60
|
name: string;
|
|
60
|
-
items:
|
|
61
|
+
items: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption[];
|
|
61
62
|
showCustomAddOption?: boolean;
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
interface ViewInput {
|
|
65
|
-
recommendedOption:
|
|
66
|
-
currentOption:
|
|
66
|
+
recommendedOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption|null;
|
|
67
|
+
currentOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption;
|
|
67
68
|
groups: CPUThrottlingGroup[];
|
|
68
|
-
throttling:
|
|
69
|
+
throttling: PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling;
|
|
69
70
|
onMenuItemSelected: (event: Menus.SelectMenu.SelectMenuItemSelectedEvent) => void;
|
|
70
71
|
onCalibrateClick: () => void;
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLElement): void => {
|
|
74
75
|
let recommendedInfoEl;
|
|
75
|
-
if (input.recommendedOption && input.currentOption ===
|
|
76
|
+
if (input.recommendedOption && input.currentOption === PanelsCommon.CPUThrottlingOption.NoThrottlingOption) {
|
|
76
77
|
recommendedInfoEl = html`<devtools-icon
|
|
77
78
|
title=${i18nString(UIStrings.recommendedThrottlingReason)}
|
|
78
79
|
name=info></devtools-icon>`;
|
|
@@ -134,24 +135,24 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: undefined, target: HTMLE
|
|
|
134
135
|
type View = typeof DEFAULT_VIEW;
|
|
135
136
|
|
|
136
137
|
export class CPUThrottlingSelector extends UI.Widget.Widget {
|
|
137
|
-
#currentOption:
|
|
138
|
-
#recommendedOption:
|
|
138
|
+
#currentOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption;
|
|
139
|
+
#recommendedOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption|null = null;
|
|
139
140
|
#groups: CPUThrottlingGroup[] = [];
|
|
140
|
-
#calibratedThrottlingSetting: Common.Settings.Setting<
|
|
141
|
+
#calibratedThrottlingSetting: Common.Settings.Setting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>;
|
|
141
142
|
readonly #view: View;
|
|
142
143
|
readonly #cpuThrottlingManager = SDK.CPUThrottlingManager.CPUThrottlingManager.instance();
|
|
143
144
|
|
|
144
145
|
constructor(element?: HTMLElement, view: View = DEFAULT_VIEW) {
|
|
145
146
|
super(element);
|
|
146
|
-
this.#currentOption =
|
|
147
|
+
this.#currentOption = MobileThrottling.ThrottlingManager.throttlingManager().cpuThrottlingOption();
|
|
147
148
|
this.#calibratedThrottlingSetting =
|
|
148
|
-
Common.Settings.Settings.instance().createSetting<
|
|
149
|
+
Common.Settings.Settings.instance().createSetting<PanelsCommon.CPUThrottlingOption.CalibratedCPUThrottling>(
|
|
149
150
|
'calibrated-cpu-throttling', {}, Common.Settings.SettingStorageType.GLOBAL);
|
|
150
151
|
this.#resetGroups();
|
|
151
152
|
this.#view = view;
|
|
152
153
|
}
|
|
153
154
|
|
|
154
|
-
set recommendedOption(recommendedOption:
|
|
155
|
+
set recommendedOption(recommendedOption: PanelsCommon.CPUThrottlingOption.CPUThrottlingOption|null) {
|
|
155
156
|
this.#recommendedOption = recommendedOption;
|
|
156
157
|
this.requestUpdate();
|
|
157
158
|
}
|
|
@@ -172,7 +173,7 @@ export class CPUThrottlingSelector extends UI.Widget.Widget {
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
#onOptionChange(): void {
|
|
175
|
-
this.#currentOption =
|
|
176
|
+
this.#currentOption = MobileThrottling.ThrottlingManager.throttlingManager().cpuThrottlingOption();
|
|
176
177
|
|
|
177
178
|
this.requestUpdate();
|
|
178
179
|
}
|
|
@@ -186,9 +187,9 @@ export class CPUThrottlingSelector extends UI.Widget.Widget {
|
|
|
186
187
|
let option;
|
|
187
188
|
if (typeof event.itemValue === 'string') {
|
|
188
189
|
if (event.itemValue === 'low-tier-mobile') {
|
|
189
|
-
option =
|
|
190
|
+
option = PanelsCommon.CPUThrottlingOption.CalibratedLowTierMobileThrottlingOption;
|
|
190
191
|
} else if (event.itemValue === 'mid-tier-mobile') {
|
|
191
|
-
option =
|
|
192
|
+
option = PanelsCommon.CPUThrottlingOption.CalibratedMidTierMobileThrottlingOption;
|
|
192
193
|
}
|
|
193
194
|
} else {
|
|
194
195
|
const rate = Number(event.itemValue);
|
|
@@ -118,21 +118,15 @@ export class PanelUtils {
|
|
|
118
118
|
|
|
119
119
|
const isHeaderOverridden = request.hasOverriddenHeaders();
|
|
120
120
|
const isContentOverridden = request.hasOverriddenContent;
|
|
121
|
+
let overrideTitle: Common.UIString.LocalizedString|undefined;
|
|
121
122
|
if (isHeaderOverridden || isContentOverridden) {
|
|
122
|
-
let title: Common.UIString.LocalizedString;
|
|
123
123
|
if (isHeaderOverridden && isContentOverridden) {
|
|
124
|
-
|
|
124
|
+
overrideTitle = i18nString(UIStrings.requestContentHeadersOverridden);
|
|
125
125
|
} else if (isContentOverridden) {
|
|
126
|
-
|
|
126
|
+
overrideTitle = i18nString(UIStrings.requestContentOverridden);
|
|
127
127
|
} else {
|
|
128
|
-
|
|
128
|
+
overrideTitle = i18nString(UIStrings.requestHeadersOverridden);
|
|
129
129
|
}
|
|
130
|
-
|
|
131
|
-
// clang-format off
|
|
132
|
-
return html`<div class="network-override-marker">
|
|
133
|
-
<devtools-icon class="icon" name="document" role=img title=${title}></devtools-icon>
|
|
134
|
-
</div>`;
|
|
135
|
-
// clang-format on
|
|
136
130
|
}
|
|
137
131
|
|
|
138
132
|
// Pick icon based on MIME type in the following cases:
|
|
@@ -153,9 +147,10 @@ export class PanelUtils {
|
|
|
153
147
|
}
|
|
154
148
|
}
|
|
155
149
|
|
|
150
|
+
let iconElement: TemplateResult;
|
|
156
151
|
if (type === Common.ResourceType.resourceTypes.Image) {
|
|
157
152
|
// clang-format off
|
|
158
|
-
|
|
153
|
+
iconElement = html`<div class="image icon">
|
|
159
154
|
<img
|
|
160
155
|
class="image-network-icon-preview"
|
|
161
156
|
title=${iconTitleForRequest(request)}
|
|
@@ -168,29 +163,35 @@ export class PanelUtils {
|
|
|
168
163
|
/>
|
|
169
164
|
</div>`;
|
|
170
165
|
// clang-format on
|
|
171
|
-
}
|
|
172
|
-
|
|
173
166
|
// Exclude Manifest here because it has mimeType:application/json but it has its own icon
|
|
174
|
-
if (type !== Common.ResourceType.resourceTypes.Manifest &&
|
|
175
|
-
|
|
167
|
+
} else if (type !== Common.ResourceType.resourceTypes.Manifest &&
|
|
168
|
+
Common.ResourceType.ResourceType.simplifyContentType(request.mimeType) === 'application/json') {
|
|
176
169
|
// clang-format off
|
|
177
|
-
|
|
170
|
+
iconElement = html`<devtools-icon
|
|
178
171
|
class="icon" name="file-json" title=${iconTitleForRequest(request)} role=img
|
|
179
172
|
style="color:var(--icon-file-script)">
|
|
180
173
|
</devtools-icon>`;
|
|
181
174
|
// clang-format on
|
|
175
|
+
} else {
|
|
176
|
+
// Others
|
|
177
|
+
const {iconName, color} = PanelUtils.iconDataForResourceType(type);
|
|
178
|
+
// clang-format off
|
|
179
|
+
iconElement = html`<devtools-icon
|
|
180
|
+
class="icon" name=${iconName} title=${iconTitleForRequest(request)}
|
|
181
|
+
style=${styleMap({color})}>
|
|
182
|
+
</devtools-icon>`;
|
|
183
|
+
// clang-format on
|
|
182
184
|
}
|
|
183
185
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return
|
|
188
|
-
class="icon" name=${iconName} title=${iconTitleForRequest(request)}
|
|
189
|
-
style=${styleMap({color})}>
|
|
190
|
-
</devtools-icon>`;
|
|
191
|
-
// clang-format on
|
|
186
|
+
if (overrideTitle) {
|
|
187
|
+
return html`<div class="network-override-marker">${iconElement}</div>`;
|
|
188
|
+
}
|
|
189
|
+
return iconElement;
|
|
192
190
|
|
|
193
191
|
function iconTitleForRequest(request: SDK.NetworkRequest.NetworkRequest): string {
|
|
192
|
+
if (overrideTitle) {
|
|
193
|
+
return overrideTitle;
|
|
194
|
+
}
|
|
194
195
|
const throttlingConditions =
|
|
195
196
|
SDK.NetworkManager.MultitargetNetworkManager.instance().appliedRequestConditions(request);
|
|
196
197
|
if (!throttlingConditions?.urlPattern) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Name: Dependencies sourced from the upstream `chromium` repository
|
|
2
2
|
URL: Internal
|
|
3
3
|
Version: N/A
|
|
4
|
-
Revision:
|
|
4
|
+
Revision: 0ace4caef4948b4cbf54725b4133cb02bd286e24
|
|
5
5
|
Update Mechanism: Manual (https://crbug.com/428069060)
|
|
6
6
|
License: BSD-3-Clause
|
|
7
7
|
License File: LICENSE
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Name: Puppeteer Core
|
|
2
2
|
Short Name: Puppeteer Core
|
|
3
3
|
URL: https://github.com/puppeteer/puppeteer/tree/main/packages/puppeteer-core
|
|
4
|
-
Version: 25.
|
|
4
|
+
Version: 25.3.0
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
License File: LICENSE
|
|
7
|
-
Revision:
|
|
7
|
+
Revision: 58d9b023ed74c3a1f14ec5fd9315872602270c72
|
|
8
8
|
Security Critical: no
|
|
9
9
|
Shipped: yes
|
|
10
10
|
Update Mechanism: Autoroll
|