chrome-devtools-frontend 1.0.1032245 → 1.0.1033423
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 -0
 - package/front_end/core/i18n/locales/en-US.json +6 -0
 - package/front_end/core/i18n/locales/en-XL.json +6 -0
 - package/front_end/core/sdk/CSSMetadata.ts +1 -0
 - package/front_end/generated/InspectorBackendCommands.js +2 -2
 - package/front_end/generated/SupportedCSSProperties.js +6 -6
 - package/front_end/generated/protocol.ts +8 -0
 - package/front_end/models/extensions/RecorderPluginManager.ts +16 -1
 - package/front_end/models/extensions/extensions.ts +2 -0
 - package/front_end/models/javascript_metadata/NativeFunctions.js +11 -3
 - package/front_end/models/timeline_model/TimelineModel.ts +25 -12
 - package/front_end/panels/console/ConsoleFormat.ts +8 -2
 - package/front_end/panels/network/RequestHTMLView.ts +1 -1
 - package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
 - package/front_end/third_party/codemirror.next/codemirror.next.d.ts +10 -3
 - package/front_end/third_party/codemirror.next/package.json +1 -1
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts +129 -0
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.ts +16 -2
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.ts +10 -3
 - package/front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.ts +11 -6
 - package/front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css +92 -0
 - package/front_end/ui/components/linear_memory_inspector/linear_memory_inspector.ts +2 -0
 - package/front_end/ui/legacy/InspectorView.ts +6 -0
 - package/package.json +1 -1
 
| 
         @@ -1470,6 +1470,7 @@ grd_files_debug_sources = [ 
     | 
|
| 
       1470 
1470 
     | 
    
         
             
              "front_end/ui/components/issue_counter/IssueLinkIcon.js",
         
     | 
| 
       1471 
1471 
     | 
    
         
             
              "front_end/ui/components/issue_counter/issueCounter.css.js",
         
     | 
| 
       1472 
1472 
     | 
    
         
             
              "front_end/ui/components/issue_counter/issueLinkIcon.css.js",
         
     | 
| 
      
 1473 
     | 
    
         
            +
              "front_end/ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.js",
         
     | 
| 
       1473 
1474 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/LinearMemoryInspector.js",
         
     | 
| 
       1474 
1475 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorController.js",
         
     | 
| 
       1475 
1476 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/LinearMemoryInspectorPane.js",
         
     | 
| 
         @@ -1481,6 +1482,7 @@ grd_files_debug_sources = [ 
     | 
|
| 
       1481 
1482 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplay.js",
         
     | 
| 
       1482 
1483 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/ValueInterpreterDisplayUtils.js",
         
     | 
| 
       1483 
1484 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/ValueInterpreterSettings.js",
         
     | 
| 
      
 1485 
     | 
    
         
            +
              "front_end/ui/components/linear_memory_inspector/linearMemoryHighlightChipList.css.js",
         
     | 
| 
       1484 
1486 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/linearMemoryInspector.css.js",
         
     | 
| 
       1485 
1487 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/linearMemoryNavigator.css.js",
         
     | 
| 
       1486 
1488 
     | 
    
         
             
              "front_end/ui/components/linear_memory_inspector/linearMemoryValueInterpreter.css.js",
         
     | 
| 
         @@ -12149,6 +12149,12 @@ 
     | 
|
| 
       12149 
12149 
     | 
    
         
             
              "ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector": {
         
     | 
| 
       12150 
12150 
     | 
    
         
             
                "message": "Show Memory Inspector"
         
     | 
| 
       12151 
12151 
     | 
    
         
             
              },
         
     | 
| 
      
 12152 
     | 
    
         
            +
              "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight": {
         
     | 
| 
      
 12153 
     | 
    
         
            +
                "message": "Delete memory highlight"
         
     | 
| 
      
 12154 
     | 
    
         
            +
              },
         
     | 
| 
      
 12155 
     | 
    
         
            +
              "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress": {
         
     | 
| 
      
 12156 
     | 
    
         
            +
                "message": "Jump to highlighted memory"
         
     | 
| 
      
 12157 
     | 
    
         
            +
              },
         
     | 
| 
       12152 
12158 
     | 
    
         
             
              "ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd": {
         
     | 
| 
       12153 
12159 
     | 
    
         
             
                "message": "Address has to be a number between {PH1} and {PH2}"
         
     | 
| 
       12154 
12160 
     | 
    
         
             
              },
         
     | 
| 
         @@ -12149,6 +12149,12 @@ 
     | 
|
| 
       12149 
12149 
     | 
    
         
             
              "ui/components/linear_memory_inspector/linear_memory_inspector-meta.ts | showMemoryInspector": {
         
     | 
| 
       12150 
12150 
     | 
    
         
             
                "message": "Ŝh́ôẃ M̂ém̂ór̂ý Îńŝṕêćt̂ór̂"
         
     | 
| 
       12151 
12151 
     | 
    
         
             
              },
         
     | 
| 
      
 12152 
     | 
    
         
            +
              "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | deleteHighlight": {
         
     | 
| 
      
 12153 
     | 
    
         
            +
                "message": "D̂él̂ét̂é m̂ém̂ór̂ý ĥíĝh́l̂íĝh́t̂"
         
     | 
| 
      
 12154 
     | 
    
         
            +
              },
         
     | 
| 
      
 12155 
     | 
    
         
            +
              "ui/components/linear_memory_inspector/LinearMemoryHighlightChipList.ts | jumpToAddress": {
         
     | 
| 
      
 12156 
     | 
    
         
            +
                "message": "Ĵúm̂ṕ t̂ó ĥíĝh́l̂íĝh́t̂éd̂ ḿêḿôŕŷ"
         
     | 
| 
      
 12157 
     | 
    
         
            +
              },
         
     | 
| 
       12152 
12158 
     | 
    
         
             
              "ui/components/linear_memory_inspector/LinearMemoryInspector.ts | addressHasToBeANumberBetweenSAnd": {
         
     | 
| 
       12153 
12159 
     | 
    
         
             
                "message": "Âd́d̂ŕêśŝ h́âś t̂ó b̂é â ńûḿb̂ér̂ b́êt́ŵéêń {PH1} âńd̂ {PH2}"
         
     | 
| 
       12154 
12160 
     | 
    
         
             
              },
         
     | 
| 
         @@ -63,7 +63,7 @@ inspectorBackend.registerEnum("Audits.HeavyAdReason", {NetworkTotalLimit: "Netwo 
     | 
|
| 
       63 
63 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.ContentSecurityPolicyViolationType", {KInlineViolation: "kInlineViolation", KEvalViolation: "kEvalViolation", KURLViolation: "kURLViolation", KTrustedTypesSinkViolation: "kTrustedTypesSinkViolation", KTrustedTypesPolicyViolation: "kTrustedTypesPolicyViolation", KWasmEvalViolation: "kWasmEvalViolation"});
         
     | 
| 
       64 
64 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.SharedArrayBufferIssueType", {TransferIssue: "TransferIssue", CreationIssue: "CreationIssue"});
         
     | 
| 
       65 
65 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.TwaQualityEnforcementViolationType", {KHttpError: "kHttpError", KUnavailableOffline: "kUnavailableOffline", KDigitalAssetLinks: "kDigitalAssetLinks"});
         
     | 
| 
       66 
     | 
    
         
            -
            inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", InvalidEligibleHeader: "InvalidEligibleHeader", TooManyConcurrentRequests: "TooManyConcurrentRequests"});
         
     | 
| 
      
 66 
     | 
    
         
            +
            inspectorBackend.registerEnum("Audits.AttributionReportingIssueType", {PermissionPolicyDisabled: "PermissionPolicyDisabled", UntrustworthyReportingOrigin: "UntrustworthyReportingOrigin", InsecureContext: "InsecureContext", InvalidHeader: "InvalidHeader", InvalidRegisterTriggerHeader: "InvalidRegisterTriggerHeader", InvalidEligibleHeader: "InvalidEligibleHeader", TooManyConcurrentRequests: "TooManyConcurrentRequests", SourceAndTriggerHeaders: "SourceAndTriggerHeaders", SourceIgnored: "SourceIgnored", TriggerIgnored: "TriggerIgnored"});
         
     | 
| 
       67 
67 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.GenericIssueErrorType", {CrossOriginPortalPostMessageError: "CrossOriginPortalPostMessageError"});
         
     | 
| 
       68 
68 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.DeprecationIssueType", {AuthorizationCoveredByWildcard: "AuthorizationCoveredByWildcard", CanRequestURLHTTPContainingNewline: "CanRequestURLHTTPContainingNewline", ChromeLoadTimesConnectionInfo: "ChromeLoadTimesConnectionInfo", ChromeLoadTimesFirstPaintAfterLoadTime: "ChromeLoadTimesFirstPaintAfterLoadTime", ChromeLoadTimesWasAlternateProtocolAvailable: "ChromeLoadTimesWasAlternateProtocolAvailable", CookieWithTruncatingChar: "CookieWithTruncatingChar", CrossOriginAccessBasedOnDocumentDomain: "CrossOriginAccessBasedOnDocumentDomain", CrossOriginWindowAlert: "CrossOriginWindowAlert", CrossOriginWindowConfirm: "CrossOriginWindowConfirm", CSSSelectorInternalMediaControlsOverlayCastButton: "CSSSelectorInternalMediaControlsOverlayCastButton", DeprecationExample: "DeprecationExample", DocumentDomainSettingWithoutOriginAgentClusterHeader: "DocumentDomainSettingWithoutOriginAgentClusterHeader", EventPath: "EventPath", ExpectCTHeader: "ExpectCTHeader", GeolocationInsecureOrigin: "GeolocationInsecureOrigin", GeolocationInsecureOriginDeprecatedNotRemoved: "GeolocationInsecureOriginDeprecatedNotRemoved", GetUserMediaInsecureOrigin: "GetUserMediaInsecureOrigin", HostCandidateAttributeGetter: "HostCandidateAttributeGetter", IdentityInCanMakePaymentEvent: "IdentityInCanMakePaymentEvent", InsecurePrivateNetworkSubresourceRequest: "InsecurePrivateNetworkSubresourceRequest", LegacyConstraintGoogIPv6: "LegacyConstraintGoogIPv6", LocalCSSFileExtensionRejected: "LocalCSSFileExtensionRejected", MediaSourceAbortRemove: "MediaSourceAbortRemove", MediaSourceDurationTruncatingBuffered: "MediaSourceDurationTruncatingBuffered", NavigateEventRestoreScroll: "NavigateEventRestoreScroll", NavigateEventTransitionWhile: "NavigateEventTransitionWhile", NoSysexWebMIDIWithoutPermission: "NoSysexWebMIDIWithoutPermission", NotificationInsecureOrigin: "NotificationInsecureOrigin", NotificationPermissionRequestedIframe: "NotificationPermissionRequestedIframe", ObsoleteWebRtcCipherSuite: "ObsoleteWebRtcCipherSuite", OpenWebDatabaseInsecureContext: "OpenWebDatabaseInsecureContext", OverflowVisibleOnReplacedElement: "OverflowVisibleOnReplacedElement", PersistentQuotaType: "PersistentQuotaType", PictureSourceSrc: "PictureSourceSrc", PrefixedCancelAnimationFrame: "PrefixedCancelAnimationFrame", PrefixedRequestAnimationFrame: "PrefixedRequestAnimationFrame", PrefixedStorageInfo: "PrefixedStorageInfo", PrefixedVideoDisplayingFullscreen: "PrefixedVideoDisplayingFullscreen", PrefixedVideoEnterFullscreen: "PrefixedVideoEnterFullscreen", PrefixedVideoEnterFullScreen: "PrefixedVideoEnterFullScreen", PrefixedVideoExitFullscreen: "PrefixedVideoExitFullscreen", PrefixedVideoExitFullScreen: "PrefixedVideoExitFullScreen", PrefixedVideoSupportsFullscreen: "PrefixedVideoSupportsFullscreen", RangeExpand: "RangeExpand", RequestedSubresourceWithEmbeddedCredentials: "RequestedSubresourceWithEmbeddedCredentials", RTCConstraintEnableDtlsSrtpFalse: "RTCConstraintEnableDtlsSrtpFalse", RTCConstraintEnableDtlsSrtpTrue: "RTCConstraintEnableDtlsSrtpTrue", RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics: "RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics", RTCPeerConnectionSdpSemanticsPlanB: "RTCPeerConnectionSdpSemanticsPlanB", RtcpMuxPolicyNegotiate: "RtcpMuxPolicyNegotiate", SharedArrayBufferConstructedWithoutIsolation: "SharedArrayBufferConstructedWithoutIsolation", TextToSpeech_DisallowedByAutoplay: "TextToSpeech_DisallowedByAutoplay", V8SharedArrayBufferConstructedInExtensionWithoutIsolation: "V8SharedArrayBufferConstructedInExtensionWithoutIsolation", XHRJSONEncodingDetection: "XHRJSONEncodingDetection", XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload: "XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload", XRSupportsSession: "XRSupportsSession"});
         
     | 
| 
       69 
69 
     | 
    
         
             
            inspectorBackend.registerEnum("Audits.ClientHintIssueReason", {MetaTagAllowListInvalidOrigin: "MetaTagAllowListInvalidOrigin", MetaTagModifiedHTML: "MetaTagModifiedHTML"});
         
     | 
| 
         @@ -591,7 +591,7 @@ inspectorBackend.registerEvent("Page.javascriptDialogClosed", ["result", "userIn 
     | 
|
| 
       591 
591 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.javascriptDialogOpening", ["url", "message", "type", "hasBrowserHandler", "defaultPrompt"]);
         
     | 
| 
       592 
592 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.lifecycleEvent", ["frameId", "loaderId", "name", "timestamp"]);
         
     | 
| 
       593 
593 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.backForwardCacheNotUsed", ["loaderId", "frameId", "notRestoredExplanations", "notRestoredExplanationsTree"]);
         
     | 
| 
       594 
     | 
    
         
            -
            inspectorBackend.registerEvent("Page.prerenderAttemptCompleted", ["initiatingFrameId", "prerenderingUrl", "finalStatus"]);
         
     | 
| 
      
 594 
     | 
    
         
            +
            inspectorBackend.registerEvent("Page.prerenderAttemptCompleted", ["initiatingFrameId", "prerenderingUrl", "finalStatus", "reasonDetails"]);
         
     | 
| 
       595 
595 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.loadEventFired", ["timestamp"]);
         
     | 
| 
       596 
596 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.navigatedWithinDocument", ["frameId", "url"]);
         
     | 
| 
       597 
597 
     | 
    
         
             
            inspectorBackend.registerEvent("Page.screencastFrame", ["data", "metadata", "sessionId"]);
         
     | 
| 
         @@ -1912,12 +1912,6 @@ export const generatedProperties = [ 
     | 
|
| 
       1912 
1912 
     | 
    
         
             
              ],
         
     | 
| 
       1913 
1913 
     | 
    
         
             
              "name": "height"
         
     | 
| 
       1914 
1914 
     | 
    
         
             
             },
         
     | 
| 
       1915 
     | 
    
         
            -
             {
         
     | 
| 
       1916 
     | 
    
         
            -
              "name": "hover-pop-up-delay"
         
     | 
| 
       1917 
     | 
    
         
            -
             },
         
     | 
| 
       1918 
     | 
    
         
            -
             {
         
     | 
| 
       1919 
     | 
    
         
            -
              "name": "hover-pop-up-hide-delay"
         
     | 
| 
       1920 
     | 
    
         
            -
             },
         
     | 
| 
       1921 
1915 
     | 
    
         
             
             {
         
     | 
| 
       1922 
1916 
     | 
    
         
             
              "inherited": true,
         
     | 
| 
       1923 
1917 
     | 
    
         
             
              "keywords": [
         
     | 
| 
         @@ -2634,6 +2628,12 @@ export const generatedProperties = [ 
     | 
|
| 
       2634 
2628 
     | 
    
         
             
              ],
         
     | 
| 
       2635 
2629 
     | 
    
         
             
              "name": "pointer-events"
         
     | 
| 
       2636 
2630 
     | 
    
         
             
             },
         
     | 
| 
      
 2631 
     | 
    
         
            +
             {
         
     | 
| 
      
 2632 
     | 
    
         
            +
              "name": "pop-up-hide-delay"
         
     | 
| 
      
 2633 
     | 
    
         
            +
             },
         
     | 
| 
      
 2634 
     | 
    
         
            +
             {
         
     | 
| 
      
 2635 
     | 
    
         
            +
              "name": "pop-up-show-delay"
         
     | 
| 
      
 2636 
     | 
    
         
            +
             },
         
     | 
| 
       2637 
2637 
     | 
    
         
             
             {
         
     | 
| 
       2638 
2638 
     | 
    
         
             
              "keywords": [
         
     | 
| 
       2639 
2639 
     | 
    
         
             
               "static",
         
     | 
| 
         @@ -971,6 +971,9 @@ export namespace Audits { 
     | 
|
| 
       971 
971 
     | 
    
         
             
                InvalidRegisterTriggerHeader = 'InvalidRegisterTriggerHeader',
         
     | 
| 
       972 
972 
     | 
    
         
             
                InvalidEligibleHeader = 'InvalidEligibleHeader',
         
     | 
| 
       973 
973 
     | 
    
         
             
                TooManyConcurrentRequests = 'TooManyConcurrentRequests',
         
     | 
| 
      
 974 
     | 
    
         
            +
                SourceAndTriggerHeaders = 'SourceAndTriggerHeaders',
         
     | 
| 
      
 975 
     | 
    
         
            +
                SourceIgnored = 'SourceIgnored',
         
     | 
| 
      
 976 
     | 
    
         
            +
                TriggerIgnored = 'TriggerIgnored',
         
     | 
| 
       974 
977 
     | 
    
         
             
              }
         
     | 
| 
       975 
978 
     | 
    
         | 
| 
       976 
979 
     | 
    
         
             
              /**
         
     | 
| 
         @@ -12172,6 +12175,11 @@ export namespace Page { 
     | 
|
| 
       12172 
12175 
     | 
    
         
             
                initiatingFrameId: FrameId;
         
     | 
| 
       12173 
12176 
     | 
    
         
             
                prerenderingUrl: string;
         
     | 
| 
       12174 
12177 
     | 
    
         
             
                finalStatus: PrerenderFinalStatus;
         
     | 
| 
      
 12178 
     | 
    
         
            +
                /**
         
     | 
| 
      
 12179 
     | 
    
         
            +
                 * This is used to give users more information about the cancellation details,
         
     | 
| 
      
 12180 
     | 
    
         
            +
                 * and this will be formatted for display.
         
     | 
| 
      
 12181 
     | 
    
         
            +
                 */
         
     | 
| 
      
 12182 
     | 
    
         
            +
                reasonDetails?: string;
         
     | 
| 
       12175 
12183 
     | 
    
         
             
              }
         
     | 
| 
       12176 
12184 
     | 
    
         | 
| 
       12177 
12185 
     | 
    
         
             
              export interface LoadEventFiredEvent {
         
     | 
| 
         @@ -3,10 +3,11 @@ 
     | 
|
| 
       3 
3 
     | 
    
         
             
            // found in the LICENSE file.
         
     | 
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            import {type RecorderExtensionEndpoint} from './RecorderExtensionEndpoint.js';
         
     | 
| 
      
 6 
     | 
    
         
            +
            import * as Common from '../../core/common/common.js';
         
     | 
| 
       6 
7 
     | 
    
         | 
| 
       7 
8 
     | 
    
         
             
            let instance: RecorderPluginManager|null = null;
         
     | 
| 
       8 
9 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
            export class RecorderPluginManager {
         
     | 
| 
      
 10 
     | 
    
         
            +
            export class RecorderPluginManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes> {
         
     | 
| 
       10 
11 
     | 
    
         
             
              #plugins: Set<RecorderExtensionEndpoint> = new Set();
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
       12 
13 
     | 
    
         
             
              static instance(): RecorderPluginManager {
         
     | 
| 
         @@ -18,13 +19,27 @@ export class RecorderPluginManager { 
     | 
|
| 
       18 
19 
     | 
    
         | 
| 
       19 
20 
     | 
    
         
             
              addPlugin(plugin: RecorderExtensionEndpoint): void {
         
     | 
| 
       20 
21 
     | 
    
         
             
                this.#plugins.add(plugin);
         
     | 
| 
      
 22 
     | 
    
         
            +
                this.dispatchEventToListeners(Events.PluginAdded, plugin);
         
     | 
| 
       21 
23 
     | 
    
         
             
              }
         
     | 
| 
       22 
24 
     | 
    
         | 
| 
       23 
25 
     | 
    
         
             
              removePlugin(plugin: RecorderExtensionEndpoint): void {
         
     | 
| 
       24 
26 
     | 
    
         
             
                this.#plugins.delete(plugin);
         
     | 
| 
      
 27 
     | 
    
         
            +
                this.dispatchEventToListeners(Events.PluginRemoved, plugin);
         
     | 
| 
       25 
28 
     | 
    
         
             
              }
         
     | 
| 
       26 
29 
     | 
    
         | 
| 
       27 
30 
     | 
    
         
             
              plugins(): RecorderExtensionEndpoint[] {
         
     | 
| 
       28 
31 
     | 
    
         
             
                return Array.from(this.#plugins.values());
         
     | 
| 
       29 
32 
     | 
    
         
             
              }
         
     | 
| 
       30 
33 
     | 
    
         
             
            }
         
     | 
| 
      
 34 
     | 
    
         
            +
             
     | 
| 
      
 35 
     | 
    
         
            +
            // TODO(crbug.com/1167717): Make this a const enum again
         
     | 
| 
      
 36 
     | 
    
         
            +
            // eslint-disable-next-line rulesdir/const_enum
         
     | 
| 
      
 37 
     | 
    
         
            +
            export enum Events {
         
     | 
| 
      
 38 
     | 
    
         
            +
              PluginAdded = 'pluginAdded',
         
     | 
| 
      
 39 
     | 
    
         
            +
              PluginRemoved = 'pluginRemoved',
         
     | 
| 
      
 40 
     | 
    
         
            +
            }
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            export type EventTypes = {
         
     | 
| 
      
 43 
     | 
    
         
            +
              [Events.PluginAdded]: RecorderExtensionEndpoint,
         
     | 
| 
      
 44 
     | 
    
         
            +
              [Events.PluginRemoved]: RecorderExtensionEndpoint,
         
     | 
| 
      
 45 
     | 
    
         
            +
            };
         
     | 
| 
         @@ -7,6 +7,7 @@ import * as ExtensionPanel from './ExtensionPanel.js'; 
     | 
|
| 
       7 
7 
     | 
    
         
             
            import * as ExtensionServer from './ExtensionServer.js';
         
     | 
| 
       8 
8 
     | 
    
         
             
            import * as ExtensionTraceProvider from './ExtensionTraceProvider.js';
         
     | 
| 
       9 
9 
     | 
    
         
             
            import * as ExtensionView from './ExtensionView.js';
         
     | 
| 
      
 10 
     | 
    
         
            +
            import * as RecorderExtensionEndpoint from './RecorderExtensionEndpoint.js';
         
     | 
| 
       10 
11 
     | 
    
         
             
            import * as RecorderPluginManager from './RecorderPluginManager.js';
         
     | 
| 
       11 
12 
     | 
    
         | 
| 
       12 
13 
     | 
    
         
             
            export {
         
     | 
| 
         @@ -15,5 +16,6 @@ export { 
     | 
|
| 
       15 
16 
     | 
    
         
             
              ExtensionServer,
         
     | 
| 
       16 
17 
     | 
    
         
             
              ExtensionTraceProvider,
         
     | 
| 
       17 
18 
     | 
    
         
             
              ExtensionView,
         
     | 
| 
      
 19 
     | 
    
         
            +
              RecorderExtensionEndpoint,
         
     | 
| 
       18 
20 
     | 
    
         
             
              RecorderPluginManager,
         
     | 
| 
       19 
21 
     | 
    
         
             
            };
         
     | 
| 
         @@ -2029,7 +2029,7 @@ export const NativeFunctions = [ 
     | 
|
| 
       2029 
2029 
     | 
    
         
             
              {
         
     | 
| 
       2030 
2030 
     | 
    
         
             
                name: 'setData',
         
     | 
| 
       2031 
2031 
     | 
    
         
             
                signatures: [['data']],
         
     | 
| 
       2032 
     | 
    
         
            -
                receivers: [' 
     | 
| 
      
 2032 
     | 
    
         
            +
                receivers: ['PendingPostBeacon']
         
     | 
| 
       2033 
2033 
     | 
    
         
             
              },
         
     | 
| 
       2034 
2034 
     | 
    
         
             
              {
         
     | 
| 
       2035 
2035 
     | 
    
         
             
                name: 'setData',
         
     | 
| 
         @@ -6165,7 +6165,15 @@ export const NativeFunctions = [ 
     | 
|
| 
       6165 
6165 
     | 
    
         
             
                signatures: [['hints']]
         
     | 
| 
       6166 
6166 
     | 
    
         
             
              },
         
     | 
| 
       6167 
6167 
     | 
    
         
             
              {
         
     | 
| 
       6168 
     | 
    
         
            -
                name: ' 
     | 
| 
      
 6168 
     | 
    
         
            +
                name: 'PendingGetBeacon',
         
     | 
| 
      
 6169 
     | 
    
         
            +
                signatures: [['url','?options']]
         
     | 
| 
      
 6170 
     | 
    
         
            +
              },
         
     | 
| 
      
 6171 
     | 
    
         
            +
              {
         
     | 
| 
      
 6172 
     | 
    
         
            +
                name: 'setURL',
         
     | 
| 
      
 6173 
     | 
    
         
            +
                signatures: [['url']]
         
     | 
| 
      
 6174 
     | 
    
         
            +
              },
         
     | 
| 
      
 6175 
     | 
    
         
            +
              {
         
     | 
| 
      
 6176 
     | 
    
         
            +
                name: 'PendingPostBeacon',
         
     | 
| 
       6169 
6177 
     | 
    
         
             
                signatures: [['url','?options']]
         
     | 
| 
       6170 
6178 
     | 
    
         
             
              },
         
     | 
| 
       6171 
6179 
     | 
    
         
             
              {
         
     | 
| 
         @@ -6855,7 +6863,7 @@ export const NativeFunctions = [ 
     | 
|
| 
       6855 
6863 
     | 
    
         
             
              },
         
     | 
| 
       6856 
6864 
     | 
    
         
             
              {
         
     | 
| 
       6857 
6865 
     | 
    
         
             
                name: 'UDPSocket',
         
     | 
| 
       6858 
     | 
    
         
            -
                signatures: [[' 
     | 
| 
      
 6866 
     | 
    
         
            +
                signatures: [['options']]
         
     | 
| 
       6859 
6867 
     | 
    
         
             
              },
         
     | 
| 
       6860 
6868 
     | 
    
         
             
              {
         
     | 
| 
       6861 
6869 
     | 
    
         
             
                name: 'TextDecoderStream',
         
     | 
| 
         @@ -394,24 +394,37 @@ export class TimelineModelImpl { 
     | 
|
| 
       394 
394 
     | 
    
         
             
              }
         
     | 
| 
       395 
395 
     | 
    
         | 
| 
       396 
396 
     | 
    
         
             
              private collectInteractionEvents(tracingModel: SDK.TracingModel.TracingModel): void {
         
     | 
| 
       397 
     | 
    
         
            -
                const  
     | 
| 
       398 
     | 
    
         
            -
                 
     | 
| 
      
 397 
     | 
    
         
            +
                const interactionEvents: SDK.TracingModel.AsyncEvent[] = [];
         
     | 
| 
      
 398 
     | 
    
         
            +
                for (const process of tracingModel.sortedProcesses()) {
         
     | 
| 
      
 399 
     | 
    
         
            +
                  // Interactions will only appear on the Renderer processes.
         
     | 
| 
      
 400 
     | 
    
         
            +
                  if (process.name() !== 'Renderer') {
         
     | 
| 
      
 401 
     | 
    
         
            +
                    continue;
         
     | 
| 
      
 402 
     | 
    
         
            +
                  }
         
     | 
| 
      
 403 
     | 
    
         
            +
             
     | 
| 
      
 404 
     | 
    
         
            +
                  // And also only on CrRendererMain threads.
         
     | 
| 
      
 405 
     | 
    
         
            +
                  const rendererThread = process.threadByName('CrRendererMain');
         
     | 
| 
      
 406 
     | 
    
         
            +
                  if (!rendererThread) {
         
     | 
| 
      
 407 
     | 
    
         
            +
                    continue;
         
     | 
| 
      
 408 
     | 
    
         
            +
                  }
         
     | 
| 
      
 409 
     | 
    
         
            +
             
     | 
| 
      
 410 
     | 
    
         
            +
                  // EventTiming events are async, so we only have to check asyncEvents,
         
     | 
| 
      
 411 
     | 
    
         
            +
                  // and not worry about sync events.
         
     | 
| 
      
 412 
     | 
    
         
            +
                  for (const event of rendererThread.asyncEvents()) {
         
     | 
| 
      
 413 
     | 
    
         
            +
                    if (!this.isEventTimingInteractionEvent(event)) {
         
     | 
| 
      
 414 
     | 
    
         
            +
                      continue;
         
     | 
| 
      
 415 
     | 
    
         
            +
                    }
         
     | 
| 
      
 416 
     | 
    
         
            +
                    interactionEvents.push(event);
         
     | 
| 
      
 417 
     | 
    
         
            +
                  }
         
     | 
| 
      
 418 
     | 
    
         
            +
                }
         
     | 
| 
      
 419 
     | 
    
         
            +
                if (interactionEvents.length === 0) {
         
     | 
| 
      
 420 
     | 
    
         
            +
                  // No events found, so bail early and don't bother creating the track
         
     | 
| 
      
 421 
     | 
    
         
            +
                  // because it will be empty.
         
     | 
| 
       399 
422 
     | 
    
         
             
                  return;
         
     | 
| 
       400 
423 
     | 
    
         
             
                }
         
     | 
| 
       401 
424 
     | 
    
         | 
| 
       402 
     | 
    
         
            -
                const interactionEvents: SDK.TracingModel.AsyncEvent[] = [];
         
     | 
| 
       403 
     | 
    
         
            -
             
     | 
| 
       404 
425 
     | 
    
         
             
                const track = this.ensureNamedTrack(TrackType.UserInteractions);
         
     | 
| 
       405 
     | 
    
         
            -
                track.thread = mainRendererThread;
         
     | 
| 
       406 
426 
     | 
    
         
             
                track.name = UIStrings.userInteractions;
         
     | 
| 
       407 
427 
     | 
    
         
             
                track.forMainFrame = true;
         
     | 
| 
       408 
     | 
    
         
            -
             
     | 
| 
       409 
     | 
    
         
            -
                for (const event of mainRendererThread.asyncEvents()) {
         
     | 
| 
       410 
     | 
    
         
            -
                  if (!this.isEventTimingInteractionEvent(event)) {
         
     | 
| 
       411 
     | 
    
         
            -
                    continue;
         
     | 
| 
       412 
     | 
    
         
            -
                  }
         
     | 
| 
       413 
     | 
    
         
            -
                  interactionEvents.push(event);
         
     | 
| 
       414 
     | 
    
         
            -
                }
         
     | 
| 
       415 
428 
     | 
    
         
             
                track.asyncEvents = interactionEvents;
         
     | 
| 
       416 
429 
     | 
    
         
             
              }
         
     | 
| 
       417 
430 
     | 
    
         | 
| 
         @@ -199,7 +199,9 @@ export const format = (fmt: string, args: SDK.RemoteObject.RemoteObject[]): { 
     | 
|
| 
       199 
199 
     | 
    
         | 
| 
       200 
200 
     | 
    
         
             
            export const updateStyle = (currentStyle: Map<string, {value: string, priority: string}>, styleToAdd: string): void => {
         
     | 
| 
       201 
201 
     | 
    
         
             
              const ALLOWED_PROPERTY_PREFIXES = ['background', 'border', 'color', 'font', 'line', 'margin', 'padding', 'text'];
         
     | 
| 
       202 
     | 
    
         
            -
               
     | 
| 
      
 202 
     | 
    
         
            +
              // We only allow data URLs with the `url()` CSS function.
         
     | 
| 
      
 203 
     | 
    
         
            +
              // The capture group is not intended to grab the whole URL exactly, just enough so we can check the scheme.
         
     | 
| 
      
 204 
     | 
    
         
            +
              const URL_REGEX = /url\([\'\"]?([^\)]*)/g;
         
     | 
| 
       203 
205 
     | 
    
         | 
| 
       204 
206 
     | 
    
         
             
              currentStyle.clear();
         
     | 
| 
       205 
207 
     | 
    
         
             
              const buffer = document.createElement('span');
         
     | 
| 
         @@ -209,8 +211,12 @@ export const updateStyle = (currentStyle: Map<string, {value: string, priority: 
     | 
|
| 
       209 
211 
     | 
    
         
             
                        prefix => property.startsWith(prefix) || property.startsWith(`-webkit-${prefix}`))) {
         
     | 
| 
       210 
212 
     | 
    
         
             
                  continue;
         
     | 
| 
       211 
213 
     | 
    
         
             
                }
         
     | 
| 
      
 214 
     | 
    
         
            +
             
     | 
| 
      
 215 
     | 
    
         
            +
                // There could be multiple `url()` functions, so we check them all.
         
     | 
| 
      
 216 
     | 
    
         
            +
                // If any of them is not a `data` URL, we skip the whole property.
         
     | 
| 
       212 
217 
     | 
    
         
             
                const value = buffer.style.getPropertyValue(property);
         
     | 
| 
       213 
     | 
    
         
            -
                 
     | 
| 
      
 218 
     | 
    
         
            +
                const potentialUrls = [...value.matchAll(URL_REGEX)].map(match => match[1]);
         
     | 
| 
      
 219 
     | 
    
         
            +
                if (potentialUrls.some(potentialUrl => !potentialUrl.startsWith('data:'))) {
         
     | 
| 
       214 
220 
     | 
    
         
             
                  continue;
         
     | 
| 
       215 
221 
     | 
    
         
             
                }
         
     | 
| 
       216 
222 
     | 
    
         
             
                currentStyle.set(property, {
         
     | 
| 
         @@ -57,7 +57,7 @@ export class RequestHTMLView extends UI.Widget.VBox { 
     | 
|
| 
       57 
57 
     | 
    
         
             
                const iframe = document.createElement('iframe');
         
     | 
| 
       58 
58 
     | 
    
         
             
                iframe.className = 'html-preview-frame';
         
     | 
| 
       59 
59 
     | 
    
         
             
                iframe.setAttribute('sandbox', '');  // Forbid to run JavaScript and set unique origin.
         
     | 
| 
       60 
     | 
    
         
            -
                iframe.setAttribute('csp', 'default-src \'none\'');
         
     | 
| 
      
 60 
     | 
    
         
            +
                iframe.setAttribute('csp', 'default-src \'none\';style-src \'unsafe-inline\'');
         
     | 
| 
       61 
61 
     | 
    
         
             
                iframe.setAttribute('src', this.dataURL);
         
     | 
| 
       62 
62 
     | 
    
         
             
                iframe.tabIndex = -1;
         
     | 
| 
       63 
63 
     | 
    
         
             
                UI.ARIAUtils.markAsPresentation(iframe);
         
     |