@nimbus21.ai/chrome-devtools-mcp 0.6.3 → 0.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (621) hide show
  1. package/README.md +311 -26
  2. package/build/src/DevToolsConnectionAdapter.js +69 -0
  3. package/build/src/DevtoolsUtils.js +208 -0
  4. package/build/src/McpContext.js +247 -50
  5. package/build/src/McpResponse.js +211 -48
  6. package/build/src/PageCollector.js +247 -33
  7. package/build/src/WaitForHelper.js +5 -0
  8. package/build/src/browser.js +97 -33
  9. package/build/src/cli.js +139 -16
  10. package/build/src/formatters/consoleFormatter.js +108 -60
  11. package/build/src/formatters/networkFormatter.js +45 -2
  12. package/build/src/formatters/snapshotFormatter.js +57 -59
  13. package/build/src/issue-descriptions.js +39 -0
  14. package/build/src/logger.js +1 -1
  15. package/build/src/main.js +68 -68
  16. package/build/src/polyfill.js +2 -2
  17. package/build/src/third_party/THIRD_PARTY_NOTICES +2010 -0
  18. package/build/src/third_party/devtools.js +6 -0
  19. package/build/src/third_party/index.js +171065 -0
  20. package/build/src/third_party/issue-descriptions/CoepCoopSandboxedIframeCannotNavigateToCoopPage.md +4 -0
  21. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOrigin.md +8 -0
  22. package/build/src/third_party/issue-descriptions/CoepCorpNotSameOriginAfterDefaultedToSameOriginByCoep.md +18 -0
  23. package/build/src/third_party/issue-descriptions/CoepCorpNotSameSite.md +7 -0
  24. package/build/src/third_party/issue-descriptions/CoepFrameResourceNeedsCoepHeader.md +10 -0
  25. package/build/src/third_party/issue-descriptions/CompatibilityModeQuirks.md +5 -0
  26. package/build/src/third_party/issue-descriptions/CookieAttributeValueExceedsMaxSize.md +5 -0
  27. package/build/src/third_party/issue-descriptions/LowTextContrast.md +5 -0
  28. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeRead.md +8 -0
  29. package/build/src/third_party/issue-descriptions/SameSiteExcludeContextDowngradeSet.md +8 -0
  30. package/build/src/third_party/issue-descriptions/SameSiteExcludeNavigationContextDowngrade.md +8 -0
  31. package/build/src/third_party/issue-descriptions/SameSiteInvalidSameParty.md +8 -0
  32. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorRead.md +8 -0
  33. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureErrorSet.md +8 -0
  34. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnRead.md +8 -0
  35. package/build/src/third_party/issue-descriptions/SameSiteNoneInsecureWarnSet.md +8 -0
  36. package/build/src/third_party/issue-descriptions/SameSiteSamePartyCrossPartyContextSet.md +10 -0
  37. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeRead.md +9 -0
  38. package/build/src/third_party/issue-descriptions/SameSiteUnspecifiedLaxAllowUnsafeSet.md +9 -0
  39. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeRead.md +8 -0
  40. package/build/src/third_party/issue-descriptions/SameSiteWarnCrossDowngradeSet.md +8 -0
  41. package/build/src/third_party/issue-descriptions/SameSiteWarnStrictLaxDowngradeStrict.md +8 -0
  42. package/build/src/third_party/issue-descriptions/arInsecureContext.md +7 -0
  43. package/build/src/third_party/issue-descriptions/arInvalidInfoHeader.md +5 -0
  44. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsSourceHeader.md +5 -0
  45. package/build/src/third_party/issue-descriptions/arInvalidRegisterOsTriggerHeader.md +5 -0
  46. package/build/src/third_party/issue-descriptions/arInvalidRegisterSourceHeader.md +5 -0
  47. package/build/src/third_party/issue-descriptions/arInvalidRegisterTriggerHeader.md +5 -0
  48. package/build/src/third_party/issue-descriptions/arNavigationRegistrationUniqueScopeAlreadySet.md +5 -0
  49. package/build/src/third_party/issue-descriptions/arNavigationRegistrationWithoutTransientUserActivation.md +6 -0
  50. package/build/src/third_party/issue-descriptions/arNoRegisterOsSourceHeader.md +5 -0
  51. package/build/src/third_party/issue-descriptions/arNoRegisterOsTriggerHeader.md +5 -0
  52. package/build/src/third_party/issue-descriptions/arNoRegisterSourceHeader.md +5 -0
  53. package/build/src/third_party/issue-descriptions/arNoRegisterTriggerHeader.md +5 -0
  54. package/build/src/third_party/issue-descriptions/arNoWebOrOsSupport.md +4 -0
  55. package/build/src/third_party/issue-descriptions/arOsSourceIgnored.md +18 -0
  56. package/build/src/third_party/issue-descriptions/arOsTriggerIgnored.md +19 -0
  57. package/build/src/third_party/issue-descriptions/arPermissionPolicyDisabled.md +8 -0
  58. package/build/src/third_party/issue-descriptions/arSourceAndTriggerHeaders.md +9 -0
  59. package/build/src/third_party/issue-descriptions/arSourceIgnored.md +13 -0
  60. package/build/src/third_party/issue-descriptions/arTriggerIgnored.md +12 -0
  61. package/build/src/third_party/issue-descriptions/arUntrustworthyReportingOrigin.md +10 -0
  62. package/build/src/third_party/issue-descriptions/arWebAndOsHeaders.md +11 -0
  63. package/build/src/third_party/issue-descriptions/bounceTrackingMitigations.md +3 -0
  64. package/build/src/third_party/issue-descriptions/clientHintMetaTagAllowListInvalidOrigin.md +4 -0
  65. package/build/src/third_party/issue-descriptions/clientHintMetaTagModifiedHTML.md +4 -0
  66. package/build/src/third_party/issue-descriptions/cookieCrossSiteRedirectDowngrade.md +12 -0
  67. package/build/src/third_party/issue-descriptions/cookieExcludeBlockedWithinRelatedWebsiteSet.md +4 -0
  68. package/build/src/third_party/issue-descriptions/cookieExcludeDomainNonAscii.md +11 -0
  69. package/build/src/third_party/issue-descriptions/cookieExcludePortMismatch.md +8 -0
  70. package/build/src/third_party/issue-descriptions/cookieExcludeSchemeMismatch.md +7 -0
  71. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutRead.md +6 -0
  72. package/build/src/third_party/issue-descriptions/cookieExcludeThirdPartyPhaseoutSet.md +6 -0
  73. package/build/src/third_party/issue-descriptions/cookieWarnDomainNonAscii.md +11 -0
  74. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantRead.md +4 -0
  75. package/build/src/third_party/issue-descriptions/cookieWarnMetadataGrantSet.md +4 -0
  76. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutRead.md +6 -0
  77. package/build/src/third_party/issue-descriptions/cookieWarnThirdPartyPhaseoutSet.md +6 -0
  78. package/build/src/third_party/issue-descriptions/corsAllowCredentialsRequired.md +6 -0
  79. package/build/src/third_party/issue-descriptions/corsDisabledScheme.md +7 -0
  80. package/build/src/third_party/issue-descriptions/corsDisallowedByMode.md +7 -0
  81. package/build/src/third_party/issue-descriptions/corsHeaderDisallowedByPreflightResponse.md +5 -0
  82. package/build/src/third_party/issue-descriptions/corsInsecurePrivateNetwork.md +10 -0
  83. package/build/src/third_party/issue-descriptions/corsInvalidHeaderValues.md +7 -0
  84. package/build/src/third_party/issue-descriptions/corsLocalNetworkAccessPermissionDenied.md +19 -0
  85. package/build/src/third_party/issue-descriptions/corsMethodDisallowedByPreflightResponse.md +5 -0
  86. package/build/src/third_party/issue-descriptions/corsNoCorsRedirectModeNotFollow.md +5 -0
  87. package/build/src/third_party/issue-descriptions/corsOriginMismatch.md +6 -0
  88. package/build/src/third_party/issue-descriptions/corsPreflightAllowPrivateNetworkError.md +10 -0
  89. package/build/src/third_party/issue-descriptions/corsPreflightResponseInvalid.md +5 -0
  90. package/build/src/third_party/issue-descriptions/corsPrivateNetworkPermissionDenied.md +10 -0
  91. package/build/src/third_party/issue-descriptions/corsRedirectContainsCredentials.md +5 -0
  92. package/build/src/third_party/issue-descriptions/corsWildcardOriginNotAllowed.md +8 -0
  93. package/build/src/third_party/issue-descriptions/cspEvalViolation.md +9 -0
  94. package/build/src/third_party/issue-descriptions/cspInlineViolation.md +10 -0
  95. package/build/src/third_party/issue-descriptions/cspTrustedTypesPolicyViolation.md +5 -0
  96. package/build/src/third_party/issue-descriptions/cspTrustedTypesSinkViolation.md +8 -0
  97. package/build/src/third_party/issue-descriptions/cspURLViolation.md +10 -0
  98. package/build/src/third_party/issue-descriptions/deprecation.md +3 -0
  99. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsHttpNotFound.md +1 -0
  100. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsInvalidResponse.md +1 -0
  101. package/build/src/third_party/issue-descriptions/federatedAuthRequestAccountsNoResponse.md +1 -0
  102. package/build/src/third_party/issue-descriptions/federatedAuthRequestApprovalDeclined.md +1 -0
  103. package/build/src/third_party/issue-descriptions/federatedAuthRequestCanceled.md +1 -0
  104. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataHttpNotFound.md +1 -0
  105. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataInvalidResponse.md +1 -0
  106. package/build/src/third_party/issue-descriptions/federatedAuthRequestClientMetadataNoResponse.md +1 -0
  107. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorFetchingSignin.md +1 -0
  108. package/build/src/third_party/issue-descriptions/federatedAuthRequestErrorIdToken.md +1 -0
  109. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenHttpNotFound.md +1 -0
  110. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidRequest.md +1 -0
  111. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenInvalidResponse.md +1 -0
  112. package/build/src/third_party/issue-descriptions/federatedAuthRequestIdTokenNoResponse.md +1 -0
  113. package/build/src/third_party/issue-descriptions/federatedAuthRequestInvalidSigninResponse.md +1 -0
  114. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestHttpNotFound.md +1 -0
  115. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestInvalidResponse.md +1 -0
  116. package/build/src/third_party/issue-descriptions/federatedAuthRequestManifestNoResponse.md +1 -0
  117. package/build/src/third_party/issue-descriptions/federatedAuthRequestTooManyRequests.md +1 -0
  118. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidAccountsResponse.md +1 -0
  119. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestInvalidConfigOrWellKnown.md +1 -0
  120. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoAccountSharingPermission.md +1 -0
  121. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoApiPermission.md +1 -0
  122. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNoReturningUserFromFetchedAccounts.md +1 -0
  123. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotIframe.md +1 -0
  124. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotPotentiallyTrustworthy.md +1 -0
  125. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSameOrigin.md +1 -0
  126. package/build/src/third_party/issue-descriptions/federatedAuthUserInfoRequestNotSignedInWithIdp.md +1 -0
  127. package/build/src/third_party/issue-descriptions/fetchingPartitionedBlobURL.md +7 -0
  128. package/build/src/third_party/issue-descriptions/genericFormAriaLabelledByToNonExistingIdError.md +8 -0
  129. package/build/src/third_party/issue-descriptions/genericFormAutocompleteAttributeEmptyError.md +5 -0
  130. package/build/src/third_party/issue-descriptions/genericFormDuplicateIdForInputError.md +5 -0
  131. package/build/src/third_party/issue-descriptions/genericFormEmptyIdAndNameAttributesForInputError.md +5 -0
  132. package/build/src/third_party/issue-descriptions/genericFormInputAssignedAutocompleteValueToIdOrNameAttributeError.md +5 -0
  133. package/build/src/third_party/issue-descriptions/genericFormInputHasWrongButWellIntendedAutocompleteValueError.md +5 -0
  134. package/build/src/third_party/issue-descriptions/genericFormInputWithNoLabelError.md +5 -0
  135. package/build/src/third_party/issue-descriptions/genericFormLabelForMatchesNonExistingIdError.md +5 -0
  136. package/build/src/third_party/issue-descriptions/genericFormLabelForNameError.md +5 -0
  137. package/build/src/third_party/issue-descriptions/genericFormLabelHasNeitherForNorNestedInputError.md +5 -0
  138. package/build/src/third_party/issue-descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
  139. package/build/src/third_party/issue-descriptions/genericResponseWasBlockedByORB.md +4 -0
  140. package/build/src/third_party/issue-descriptions/heavyAd.md +10 -0
  141. package/build/src/third_party/issue-descriptions/mixedContent.md +5 -0
  142. package/build/src/third_party/issue-descriptions/navigatingPartitionedBlobURL.md +5 -0
  143. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabled.md +7 -0
  144. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluder.md +9 -0
  145. package/build/src/third_party/issue-descriptions/permissionElementActivationDisabledWithOccluderParent.md +9 -0
  146. package/build/src/third_party/issue-descriptions/permissionElementCspFrameAncestorsMissing.md +5 -0
  147. package/build/src/third_party/issue-descriptions/permissionElementFencedFrameDisallowed.md +5 -0
  148. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooLarge.md +5 -0
  149. package/build/src/third_party/issue-descriptions/permissionElementFontSizeTooSmall.md +5 -0
  150. package/build/src/third_party/issue-descriptions/permissionElementGeolocationDeprecated.md +5 -0
  151. package/build/src/third_party/issue-descriptions/permissionElementInsetBoxShadowUnsupported.md +5 -0
  152. package/build/src/third_party/issue-descriptions/permissionElementInvalidDisplayStyle.md +5 -0
  153. package/build/src/third_party/issue-descriptions/permissionElementInvalidSizeValue.md +5 -0
  154. package/build/src/third_party/issue-descriptions/permissionElementInvalidType.md +5 -0
  155. package/build/src/third_party/issue-descriptions/permissionElementInvalidTypeActivation.md +5 -0
  156. package/build/src/third_party/issue-descriptions/permissionElementLowContrast.md +5 -0
  157. package/build/src/third_party/issue-descriptions/permissionElementNonOpaqueColor.md +5 -0
  158. package/build/src/third_party/issue-descriptions/permissionElementPaddingBottomUnsupported.md +6 -0
  159. package/build/src/third_party/issue-descriptions/permissionElementPaddingRightUnsupported.md +6 -0
  160. package/build/src/third_party/issue-descriptions/permissionElementPermissionsPolicyBlocked.md +5 -0
  161. package/build/src/third_party/issue-descriptions/permissionElementRegistrationFailed.md +5 -0
  162. package/build/src/third_party/issue-descriptions/permissionElementRequestInProgress.md +5 -0
  163. package/build/src/third_party/issue-descriptions/permissionElementSecurityChecksFailed.md +5 -0
  164. package/build/src/third_party/issue-descriptions/permissionElementTypeNotSupported.md +5 -0
  165. package/build/src/third_party/issue-descriptions/permissionElementUntrustedEvent.md +7 -0
  166. package/build/src/third_party/issue-descriptions/placeholderDescriptionForInvisibleIssues.md +3 -0
  167. package/build/src/third_party/issue-descriptions/propertyRuleInvalidNameIssue.md +3 -0
  168. package/build/src/third_party/issue-descriptions/propertyRuleIssue.md +7 -0
  169. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedOptGroupChild.md +7 -0
  170. package/build/src/third_party/issue-descriptions/selectElementAccessibilityDisallowedSelectChild.md +7 -0
  171. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentAttributesSelectDescendant.md +3 -0
  172. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentLegendChild.md +3 -0
  173. package/build/src/third_party/issue-descriptions/selectElementAccessibilityInteractiveContentOptionChild.md +3 -0
  174. package/build/src/third_party/issue-descriptions/selectElementAccessibilityNonPhrasingContentOptionChild.md +3 -0
  175. package/build/src/third_party/issue-descriptions/sharedArrayBuffer.md +7 -0
  176. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorCrossOriginNoCorsRequest.md +1 -0
  177. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorDictionaryLoadFailure.md +3 -0
  178. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorMatchingDictionaryNotUsed.md +3 -0
  179. package/build/src/third_party/issue-descriptions/sharedDictionaryUseErrorUnexpectedContentDictionaryHeader.md +1 -0
  180. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorCossOriginNoCorsRequest.md +1 -0
  181. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorDisallowedBySettings.md +1 -0
  182. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorExpiredResponse.md +3 -0
  183. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorFeatureDisabled.md +3 -0
  184. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInsufficientResources.md +1 -0
  185. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidMatchField.md +1 -0
  186. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md +1 -0
  187. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorInvalidTTLField.md +1 -0
  188. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNavigationRequest.md +3 -0
  189. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNoMatchField.md +1 -0
  190. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md +1 -0
  191. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md +1 -0
  192. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonSecureContext.md +3 -0
  193. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringIdField.md +1 -0
  194. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringInMatchDestList.md +1 -0
  195. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonStringMatchField.md +1 -0
  196. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorNonTokenTypeField.md +1 -0
  197. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorRequestAborted.md +1 -0
  198. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorShuttingDown.md +1 -0
  199. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorTooLongIdField.md +3 -0
  200. package/build/src/third_party/issue-descriptions/sharedDictionaryWriteErrorUnsupportedType.md +3 -0
  201. package/build/src/third_party/issue-descriptions/sriInvalidSignatureHeader.md +14 -0
  202. package/build/src/third_party/issue-descriptions/sriInvalidSignatureInputHeader.md +15 -0
  203. package/build/src/third_party/issue-descriptions/sriMissingSignatureHeader.md +8 -0
  204. package/build/src/third_party/issue-descriptions/sriMissingSignatureInputHeader.md +7 -0
  205. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsIncorrectLength.md +11 -0
  206. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsNotByteSequence.md +14 -0
  207. package/build/src/third_party/issue-descriptions/sriSignatureHeaderValueIsParameterized.md +15 -0
  208. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentName.md +8 -0
  209. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidComponentType.md +13 -0
  210. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidDerivedComponentParameter.md +4 -0
  211. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidHeaderComponentParameter.md +5 -0
  212. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderInvalidParameter.md +11 -0
  213. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderKeyIdLength.md +12 -0
  214. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingLabel.md +6 -0
  215. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderMissingRequiredParameters.md +8 -0
  216. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueMissingComponents.md +11 -0
  217. package/build/src/third_party/issue-descriptions/sriSignatureInputHeaderValueNotInnerList.md +11 -0
  218. package/build/src/third_party/issue-descriptions/sriValidationFailedIntegrityMismatch.md +10 -0
  219. package/build/src/third_party/issue-descriptions/sriValidationFailedInvalidLength.md +5 -0
  220. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureExpired.md +6 -0
  221. package/build/src/third_party/issue-descriptions/sriValidationFailedSignatureMismatch.md +11 -0
  222. package/build/src/third_party/issue-descriptions/stylesheetLateImport.md +4 -0
  223. package/build/src/third_party/issue-descriptions/stylesheetRequestFailed.md +3 -0
  224. package/build/src/third_party/issue-descriptions/summaryElementAccessibilityInteractiveContentSummaryDescendant.md +3 -0
  225. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestLength.md +12 -0
  226. package/build/src/third_party/issue-descriptions/unencodedDigestIncorrectDigestType.md +17 -0
  227. package/build/src/third_party/issue-descriptions/unencodedDigestMalformedDictionary.md +14 -0
  228. package/build/src/third_party/issue-descriptions/unencodedDigestUnknownAlgorithm.md +15 -0
  229. package/build/src/tools/ToolDefinition.js +2 -2
  230. package/build/src/tools/categories.js +17 -9
  231. package/build/src/tools/console.js +73 -7
  232. package/build/src/tools/emulation.js +64 -38
  233. package/build/src/tools/input.js +113 -46
  234. package/build/src/tools/network.js +44 -14
  235. package/build/src/tools/pages.js +84 -52
  236. package/build/src/tools/performance.js +14 -12
  237. package/build/src/tools/screenshot.js +14 -11
  238. package/build/src/tools/script.js +29 -15
  239. package/build/src/tools/snapshot.js +27 -23
  240. package/build/src/tools/tools.js +29 -0
  241. package/build/src/trace-processing/parse.js +17 -26
  242. package/build/src/utils/keyboard.js +296 -0
  243. package/build/src/utils/types.js +6 -0
  244. package/package.json +34 -25
  245. package/build/node_modules/chrome-devtools-frontend/LICENSE +0 -27
  246. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/App.js +0 -4
  247. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/AppProvider.js +0 -17
  248. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Base64.js +0 -43
  249. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/CharacterIdMap.js +0 -27
  250. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Color.js +0 -2029
  251. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ColorConverter.js +0 -330
  252. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ColorUtils.js +0 -221
  253. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Console.js +0 -86
  254. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Debouncer.js +0 -14
  255. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/EventTarget.js +0 -14
  256. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Gzip.js +0 -64
  257. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/JavaScriptMetaData.js +0 -4
  258. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Lazy.js +0 -29
  259. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Linkifier.js +0 -34
  260. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/MapWithDefault.js +0 -20
  261. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Mutex.js +0 -49
  262. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Object.js +0 -86
  263. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ParsedURL.js +0 -459
  264. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Progress.js +0 -144
  265. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/QueryParamHandler.js +0 -4
  266. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ResolverBase.js +0 -69
  267. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ResourceType.js +0 -506
  268. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/ReturnToPanel.js +0 -13
  269. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Revealer.js +0 -159
  270. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Runnable.js +0 -24
  271. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SegmentedRange.js +0 -79
  272. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SettingRegistration.js +0 -164
  273. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Settings.js +0 -1252
  274. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/SimpleHistoryManager.js +0 -97
  275. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/StringOutputStream.js +0 -17
  276. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/TextDictionary.js +0 -40
  277. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Throttler.js +0 -71
  278. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Trie.js +0 -127
  279. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/Worker.js +0 -44
  280. package/build/node_modules/chrome-devtools-frontend/front_end/core/common/common.js +0 -44
  281. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/AidaClient.js +0 -415
  282. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/GdpClient.js +0 -186
  283. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHost.js +0 -513
  284. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/InspectorFrontendHostAPI.js +0 -66
  285. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/Platform.js +0 -59
  286. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/ResourceLoader.js +0 -232
  287. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/UserMetrics.js +0 -957
  288. package/build/node_modules/chrome-devtools-frontend/front_end/core/host/host.js +0 -12
  289. package/build/node_modules/chrome-devtools-frontend/front_end/core/i18n/i18n.js +0 -60
  290. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/ArrayUtilities.js +0 -199
  291. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Brand.js +0 -4
  292. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Constructor.js +0 -4
  293. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DOMUtilities.js +0 -122
  294. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DateUtilities.js +0 -13
  295. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/DevToolsPath.js +0 -27
  296. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/KeyboardUtilities.js +0 -21
  297. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/MapUtilities.js +0 -79
  298. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/MimeType.js +0 -143
  299. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/NumberUtilities.js +0 -72
  300. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/StringUtilities.js +0 -536
  301. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/Timing.js +0 -9
  302. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/TypedArrayUtilities.js +0 -157
  303. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/TypescriptUtilities.js +0 -24
  304. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/UIString.js +0 -4
  305. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/UserVisibleError.js +0 -22
  306. package/build/node_modules/chrome-devtools-frontend/front_end/core/platform/platform.js +0 -26
  307. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/InspectorBackend.js +0 -802
  308. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/NodeURL.js +0 -31
  309. package/build/node_modules/chrome-devtools-frontend/front_end/core/protocol_client/protocol_client.js +0 -13
  310. package/build/node_modules/chrome-devtools-frontend/front_end/core/root/Runtime.js +0 -4
  311. package/build/node_modules/chrome-devtools-frontend/front_end/core/root/root.js +0 -5
  312. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AccessibilityModel.js +0 -281
  313. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AnimationModel.js +0 -846
  314. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/AutofillModel.js +0 -155
  315. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CPUProfilerModel.js +0 -99
  316. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CPUThrottlingManager.js +0 -220
  317. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSContainerQuery.js +0 -98
  318. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSFontFace.js +0 -31
  319. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSLayer.js +0 -22
  320. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMatchedStyles.js +0 -1284
  321. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMedia.js +0 -100
  322. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSMetadata.js +0 -1518
  323. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSModel.js +0 -908
  324. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSProperty.js +0 -315
  325. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSPropertyParser.js +0 -572
  326. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSPropertyParserMatchers.js +0 -1336
  327. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSQuery.js +0 -53
  328. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSRule.js +0 -365
  329. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSScope.js +0 -22
  330. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStartingStyle.js +0 -21
  331. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStyleDeclaration.js +0 -275
  332. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSStyleSheetHeader.js +0 -166
  333. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CSSSupports.js +0 -24
  334. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CategorizedBreakpoint.js +0 -29
  335. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ChildTargetManager.js +0 -232
  336. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CompilerSourceMappingContentProvider.js +0 -47
  337. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Connections.js +0 -242
  338. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ConsoleModel.js +0 -629
  339. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ConsoleModelTypes.js +0 -14
  340. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Cookie.js +0 -241
  341. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CookieModel.js +0 -198
  342. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/CookieParser.js +0 -163
  343. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DOMDebuggerModel.js +0 -597
  344. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DOMModel.js +0 -1628
  345. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/DebuggerModel.js +0 -1231
  346. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EmulationModel.js +0 -527
  347. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EnhancedTracesParser.js +0 -350
  348. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/EventBreakpointsModel.js +0 -125
  349. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/FrameAssociated.js +0 -4
  350. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/FrameManager.js +0 -199
  351. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/HeapProfilerModel.js +0 -130
  352. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/HttpReasonPhraseStrings.js +0 -73
  353. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IOModel.js +0 -83
  354. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IsolateManager.js +0 -208
  355. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/IssuesModel.js +0 -41
  356. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/LayerTreeBase.js +0 -95
  357. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/LogModel.js +0 -34
  358. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkManager.js +0 -1916
  359. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/NetworkRequest.js +0 -1668
  360. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayColorGenerator.js +0 -48
  361. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayModel.js +0 -765
  362. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/OverlayPersistentHighlighter.js +0 -384
  363. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PageLoad.js +0 -25
  364. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PageResourceLoader.js +0 -300
  365. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PaintProfiler.js +0 -67
  366. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PerformanceMetricsModel.js +0 -62
  367. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/PreloadingModel.js +0 -563
  368. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RehydratingConnection.js +0 -290
  369. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RehydratingObject.js +0 -4
  370. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RemoteObject.js +0 -905
  371. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Resource.js +0 -163
  372. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ResourceTreeModel.js +0 -922
  373. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/RuntimeModel.js +0 -535
  374. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SDKModel.js +0 -45
  375. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ScreenCaptureModel.js +0 -174
  376. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Script.js +0 -395
  377. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SecurityOriginManager.js +0 -54
  378. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerSentEvents.js +0 -67
  379. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerSentEventsProtocol.js +0 -110
  380. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServerTiming.js +0 -216
  381. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServiceWorkerCacheModel.js +0 -271
  382. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/ServiceWorkerManager.js +0 -511
  383. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMap.js +0 -651
  384. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapCache.js +0 -41
  385. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapFunctionRanges.js +0 -132
  386. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapManager.js +0 -189
  387. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapScopeChainEntry.js +0 -156
  388. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/SourceMapScopesInfo.js +0 -276
  389. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/StorageBucketsModel.js +0 -143
  390. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/StorageKeyManager.js +0 -53
  391. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/Target.js +0 -262
  392. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/TargetManager.js +0 -386
  393. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/TraceObject.js +0 -52
  394. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/WebAuthnModel.js +0 -66
  395. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/sdk-meta.js +0 -1117
  396. package/build/node_modules/chrome-devtools-frontend/front_end/core/sdk/sdk.js +0 -90
  397. package/build/node_modules/chrome-devtools-frontend/front_end/generated/ARIAProperties.js +0 -1513
  398. package/build/node_modules/chrome-devtools-frontend/front_end/generated/Deprecation.js +0 -339
  399. package/build/node_modules/chrome-devtools-frontend/front_end/generated/InspectorBackendCommands.js +0 -1562
  400. package/build/node_modules/chrome-devtools-frontend/front_end/generated/SupportedCSSProperties.js +0 -7514
  401. package/build/node_modules/chrome-devtools-frontend/front_end/generated/protocol.js +0 -4
  402. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.js +0 -262
  403. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.js +0 -979
  404. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.js +0 -613
  405. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/data_formatters/UnitFormatters.js +0 -139
  406. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AICallTree.js +0 -372
  407. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AIContext.js +0 -132
  408. package/build/node_modules/chrome-devtools-frontend/front_end/models/ai_assistance/performance/AIQueries.js +0 -105
  409. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CSSWorkspaceBinding.js +0 -243
  410. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/CompilerScriptMapping.js +0 -407
  411. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ContentProviderBasedProject.js +0 -130
  412. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DebuggerLanguagePlugins.js +0 -992
  413. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DebuggerWorkspaceBinding.js +0 -574
  414. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/DefaultScriptMapping.js +0 -112
  415. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/FileUtils.js +0 -186
  416. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/LiveLocation.js +0 -60
  417. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/NetworkProject.js +0 -107
  418. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/PresentationConsoleMessageHelper.js +0 -244
  419. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceMapping.js +0 -473
  420. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceScriptMapping.js +0 -399
  421. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/ResourceUtils.js +0 -87
  422. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/SASSSourceMapping.js +0 -181
  423. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/StylesSourceMapping.js +0 -268
  424. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/TempFile.js +0 -55
  425. package/build/node_modules/chrome-devtools-frontend/front_end/models/bindings/bindings.js +0 -20
  426. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/CPUProfileDataModel.js +0 -514
  427. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/ProfileTreeModel.js +0 -90
  428. package/build/node_modules/chrome-devtools-frontend/front_end/models/cpu_profile/cpu_profile.js +0 -6
  429. package/build/node_modules/chrome-devtools-frontend/front_end/models/crux-manager/CrUXManager.js +0 -283
  430. package/build/node_modules/chrome-devtools-frontend/front_end/models/crux-manager/crux-manager.js +0 -4
  431. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/DeviceModeModel.js +0 -775
  432. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/EmulatedDevices.js +0 -1706
  433. package/build/node_modules/chrome-devtools-frontend/front_end/models/emulation/emulation.js +0 -6
  434. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/FormatterWorkerPool.js +0 -131
  435. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/ScriptFormatter.js +0 -77
  436. package/build/node_modules/chrome-devtools-frontend/front_end/models/formatter/formatter.js +0 -6
  437. package/build/node_modules/chrome-devtools-frontend/front_end/models/geometry/GeometryImpl.js +0 -347
  438. package/build/node_modules/chrome-devtools-frontend/front_end/models/geometry/geometry.js +0 -4
  439. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/LogManager.js +0 -67
  440. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/NetworkLog.js +0 -494
  441. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/RequestResolver.js +0 -49
  442. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/logs-meta.js +0 -73
  443. package/build/node_modules/chrome-devtools-frontend/front_end/models/logs/logs.js +0 -7
  444. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/Calculator.js +0 -4
  445. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/NetworkTimeCalculator.js +0 -256
  446. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/RequestTimeRanges.js +0 -120
  447. package/build/node_modules/chrome-devtools-frontend/front_end/models/network_time_calculator/network_time_calculator.js +0 -6
  448. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/NamesResolver.js +0 -626
  449. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/ScopeChainModel.js +0 -59
  450. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/ScopeTreeCache.js +0 -32
  451. package/build/node_modules/chrome-devtools-frontend/front_end/models/source_map_scopes/source_map_scopes.js +0 -7
  452. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTrace.js +0 -4
  453. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceImpl.js +0 -67
  454. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/StackTraceModel.js +0 -97
  455. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/Trie.js +0 -113
  456. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/stack_trace.js +0 -5
  457. package/build/node_modules/chrome-devtools-frontend/front_end/models/stack_trace/stack_trace_impl.js +0 -7
  458. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/CodeMirrorUtils.js +0 -32
  459. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/ContentData.js +0 -173
  460. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/ContentProvider.js +0 -30
  461. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/StaticContentProvider.js +0 -32
  462. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/StreamingContentData.js +0 -79
  463. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/Text.js +0 -69
  464. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextCursor.js +0 -35
  465. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextRange.js +0 -231
  466. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/TextUtils.js +0 -355
  467. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/WasmDisassembly.js +0 -68
  468. package/build/node_modules/chrome-devtools-frontend/front_end/models/text_utils/text_utils.js +0 -14
  469. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/EntityMapper.js +0 -122
  470. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/EventsSerializer.js +0 -81
  471. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/LanternComputationData.js +0 -370
  472. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/ModelImpl.js +0 -166
  473. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Name.js +0 -114
  474. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Processor.js +0 -555
  475. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/Styles.js +0 -815
  476. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/FilmStrip.js +0 -44
  477. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/MainThreadActivity.js +0 -76
  478. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/ScriptDuplication.js +0 -162
  479. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/StackTraceForEvent.js +0 -191
  480. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/ThirdParties.js +0 -118
  481. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/TraceFilter.js +0 -50
  482. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/TraceTree.js +0 -592
  483. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/extras/extras.js +0 -10
  484. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AnimationFramesHandler.js +0 -109
  485. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AnimationHandler.js +0 -26
  486. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AsyncJSCallsHandler.js +0 -187
  487. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/AuctionWorkletsHandler.js +0 -162
  488. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/DOMStatsHandler.js +0 -21
  489. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ExtensionTraceDataHandler.js +0 -263
  490. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/FlowsHandler.js +0 -148
  491. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/FramesHandler.js +0 -483
  492. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/GPUHandler.js +0 -35
  493. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ImagePaintingHandler.js +0 -147
  494. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/InitiatorsHandler.js +0 -180
  495. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/InvalidationsHandler.js +0 -126
  496. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LargestImagePaintHandler.js +0 -85
  497. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LargestTextPaintHandler.js +0 -27
  498. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LayerTreeHandler.js +0 -103
  499. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/LayoutShiftsHandler.js +0 -445
  500. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/MemoryHandler.js +0 -21
  501. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/MetaHandler.js +0 -401
  502. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ModelHandlers.js +0 -33
  503. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/NetworkRequestsHandler.js +0 -540
  504. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/PageFramesHandler.js +0 -42
  505. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/PageLoadMetricsHandler.js +0 -349
  506. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/RendererHandler.js +0 -346
  507. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/SamplesHandler.js +0 -207
  508. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ScreenshotsHandler.js +0 -97
  509. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/ScriptsHandler.js +0 -252
  510. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/SelectorStatsHandler.js +0 -71
  511. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/Threads.js +0 -101
  512. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/UserInteractionsHandler.js +0 -317
  513. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/UserTimingsHandler.js +0 -183
  514. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/WarningsHandler.js +0 -134
  515. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/WorkersHandler.js +0 -33
  516. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/handlers.js +0 -7
  517. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/helpers.js +0 -163
  518. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/handlers/types.js +0 -1
  519. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Extensions.js +0 -41
  520. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Network.js +0 -102
  521. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/SamplesIntegrator.js +0 -495
  522. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/SyntheticEvents.js +0 -74
  523. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Timing.js +0 -184
  524. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/Trace.js +0 -806
  525. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/TreeHelpers.js +0 -254
  526. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/helpers/helpers.js +0 -10
  527. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/CLSCulprits.js +0 -488
  528. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Cache.js +0 -208
  529. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Common.js +0 -340
  530. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DOMSize.js +0 -180
  531. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DocumentLatency.js +0 -257
  532. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/DuplicatedJavaScript.js +0 -89
  533. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/FontDisplay.js +0 -81
  534. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ForcedReflow.js +0 -160
  535. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/INPBreakdown.js +0 -117
  536. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ImageDelivery.js +0 -262
  537. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LCPBreakdown.js +0 -188
  538. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LCPDiscovery.js +0 -182
  539. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/LegacyJavaScript.js +0 -89
  540. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Models.js +0 -21
  541. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ModernHTTP.js +0 -199
  542. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/NetworkDependencyTree.js +0 -544
  543. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/RenderBlocking.js +0 -191
  544. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/SlowCSSSelector.js +0 -135
  545. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Statistics.js +0 -92
  546. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/ThirdParties.js +0 -97
  547. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/Viewport.js +0 -101
  548. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/insights.js +0 -9
  549. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/insights/types.js +0 -18
  550. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/LanternError.js +0 -6
  551. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/NetworkAnalyzer.js +0 -488
  552. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/core/core.js +0 -5
  553. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/BaseNode.js +0 -276
  554. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/CPUNode.js +0 -63
  555. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/NetworkNode.js +0 -82
  556. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/PageDependencyGraph.js +0 -551
  557. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/graph/graph.js +0 -7
  558. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/lantern.js +0 -9
  559. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/FirstContentfulPaint.js +0 -136
  560. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/Interactive.js +0 -67
  561. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/LargestContentfulPaint.js +0 -68
  562. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/MaxPotentialFID.js +0 -48
  563. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/Metric.js +0 -68
  564. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/SpeedIndex.js +0 -101
  565. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/TBTUtils.js +0 -64
  566. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/TotalBlockingTime.js +0 -78
  567. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/metrics/metrics.js +0 -11
  568. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/ConnectionPool.js +0 -115
  569. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/Constants.js +0 -42
  570. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/DNSCache.js +0 -47
  571. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/SimulationTimingMap.js +0 -134
  572. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/Simulator.js +0 -450
  573. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/TCPConnection.js +0 -154
  574. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/simulation/simulation.js +0 -9
  575. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/types/Lantern.js +0 -24
  576. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/lantern/types/types.js +0 -4
  577. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/trace.js +0 -17
  578. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Configuration.js +0 -18
  579. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Extensions.js +0 -37
  580. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/File.js +0 -57
  581. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Overlays.js +0 -4
  582. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/Timing.js +0 -15
  583. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/TraceEvents.js +0 -574
  584. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace/types/types.js +0 -9
  585. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace_source_maps_resolver/SourceMapsResolver.js +0 -201
  586. package/build/node_modules/chrome-devtools-frontend/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.js +0 -4
  587. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/FileManager.js +0 -64
  588. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/IgnoreListManager.js +0 -511
  589. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/SearchConfig.js +0 -113
  590. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/UISourceCode.js +0 -563
  591. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/WorkspaceImpl.js +0 -204
  592. package/build/node_modules/chrome-devtools-frontend/front_end/models/workspace/workspace.js +0 -9
  593. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/codemirror.next/codemirror.next.js +0 -1
  594. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/LICENSE +0 -202
  595. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/legacy-javascript.js +0 -2
  596. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/legacy-javascript/lib/legacy-javascript.js +0 -940
  597. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/LICENSE +0 -26
  598. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/builder/builder.js +0 -196
  599. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/builder/safe_builder.js +0 -226
  600. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/codec.js +0 -4
  601. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/decode/decode.js +0 -394
  602. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/encode/encode.js +0 -24
  603. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/encode/encoder.js +0 -283
  604. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/mod.js +0 -7
  605. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/util.js +0 -9
  606. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/package/src/vlq.js +0 -84
  607. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/source-map-scopes-codec/source-map-scopes-codec.js +0 -4
  608. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/LICENSE +0 -20
  609. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/lib/nostats-subset.js +0 -146
  610. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/httparchive-nostats-subset.js +0 -2
  611. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/httparchive-subset.js +0 -2
  612. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +0 -118
  613. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +0 -40
  614. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/entities.test.js +0 -26
  615. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/index.js +0 -4
  616. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/index.test.js +0 -215
  617. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/httparchive-nostats.js +0 -4
  618. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/httparchive.js +0 -4
  619. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/lib/subsets/nostats.js +0 -4
  620. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/package/nostats-subset.js +0 -2
  621. package/build/node_modules/chrome-devtools-frontend/front_end/third_party/third-party-web/third-party-web.js +0 -2
@@ -1,136 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Graph from '../graph/graph.js';
5
- import { Metric } from './Metric.js';
6
- class FirstContentfulPaint extends Metric {
7
- static get coefficients() {
8
- return {
9
- intercept: 0,
10
- optimistic: 0.5,
11
- pessimistic: 0.5,
12
- };
13
- }
14
- /**
15
- * Computes the set of URLs that *appeared* to be render-blocking based on our filter,
16
- * *but definitely were not* render-blocking based on the timing of their EvaluateScript task.
17
- * It also computes the set of corresponding CPU node ids that were needed for the paint at the
18
- * given timestamp.
19
- */
20
- static getRenderBlockingNodeData(graph, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
21
- /** A map of blocking script URLs to the earliest EvaluateScript task node that executed them. */
22
- const scriptUrlToNodeMap = new Map();
23
- const cpuNodes = [];
24
- graph.traverse(node => {
25
- if (node.type === Graph.BaseNode.types.CPU) {
26
- // A task is *possibly* render blocking if it *started* before cutoffTimestamp.
27
- // We use startTime here because the paint event can be *inside* the task that was render blocking.
28
- if (node.startTime <= cutoffTimestamp) {
29
- cpuNodes.push(node);
30
- }
31
- // Build our script URL map to find the earliest EvaluateScript task node.
32
- const scriptUrls = node.getEvaluateScriptURLs();
33
- for (const url of scriptUrls) {
34
- // Use the earliest CPU node we find.
35
- const existing = scriptUrlToNodeMap.get(url) || node;
36
- scriptUrlToNodeMap.set(url, node.startTime < existing.startTime ? node : existing);
37
- }
38
- }
39
- });
40
- cpuNodes.sort((a, b) => a.startTime - b.startTime);
41
- // A script is *possibly* render blocking if it finished loading before cutoffTimestamp.
42
- const possiblyRenderBlockingScriptUrls = Metric.getScriptUrls(graph, node => {
43
- // The optimistic LCP treatNodeAsRenderBlocking fn wants to exclude some images in the graph,
44
- // but here it only receives scripts to evaluate. It's a no-op in this case, but it will
45
- // matter below in the getFirstPaintBasedGraph clone operation.
46
- return node.endTime <= cutoffTimestamp && treatNodeAsRenderBlocking(node);
47
- });
48
- // A script is *definitely not* render blocking if its EvaluateScript task started after cutoffTimestamp.
49
- const definitelyNotRenderBlockingScriptUrls = new Set();
50
- const renderBlockingCpuNodeIds = new Set();
51
- for (const url of possiblyRenderBlockingScriptUrls) {
52
- // Lookup the CPU node that had the earliest EvaluateScript for this URL.
53
- const cpuNodeForUrl = scriptUrlToNodeMap.get(url);
54
- // If we can't find it at all, we can't conclude anything, so just skip it.
55
- if (!cpuNodeForUrl) {
56
- continue;
57
- }
58
- // If we found it and it was in our `cpuNodes` set that means it finished before cutoffTimestamp, so it really is render-blocking.
59
- if (cpuNodes.includes(cpuNodeForUrl)) {
60
- renderBlockingCpuNodeIds.add(cpuNodeForUrl.id);
61
- continue;
62
- }
63
- // We couldn't find the evaluate script in the set of CPU nodes that ran before our paint, so
64
- // it must not have been necessary for the paint.
65
- definitelyNotRenderBlockingScriptUrls.add(url);
66
- }
67
- // The first layout, first paint, and first ParseHTML are almost always necessary for first paint,
68
- // so we always include those CPU nodes.
69
- const firstLayout = cpuNodes.find(node => node.didPerformLayout());
70
- if (firstLayout) {
71
- renderBlockingCpuNodeIds.add(firstLayout.id);
72
- }
73
- const firstPaint = cpuNodes.find(node => node.childEvents.some(e => e.name === 'Paint'));
74
- if (firstPaint) {
75
- renderBlockingCpuNodeIds.add(firstPaint.id);
76
- }
77
- const firstParse = cpuNodes.find(node => node.childEvents.some(e => e.name === 'ParseHTML'));
78
- if (firstParse) {
79
- renderBlockingCpuNodeIds.add(firstParse.id);
80
- }
81
- // If a CPU filter was passed in, we also want to include those extra nodes.
82
- if (additionalCpuNodesToTreatAsRenderBlocking) {
83
- cpuNodes.filter(additionalCpuNodesToTreatAsRenderBlocking).forEach(node => renderBlockingCpuNodeIds.add(node.id));
84
- }
85
- return {
86
- definitelyNotRenderBlockingScriptUrls,
87
- renderBlockingCpuNodeIds,
88
- };
89
- }
90
- /**
91
- * Computes the graph required for the first paint of interest.
92
- */
93
- static getFirstPaintBasedGraph(dependencyGraph, { cutoffTimestamp, treatNodeAsRenderBlocking, additionalCpuNodesToTreatAsRenderBlocking }) {
94
- const rbData = this.getRenderBlockingNodeData(dependencyGraph, {
95
- cutoffTimestamp,
96
- treatNodeAsRenderBlocking,
97
- additionalCpuNodesToTreatAsRenderBlocking,
98
- });
99
- const { definitelyNotRenderBlockingScriptUrls, renderBlockingCpuNodeIds } = rbData;
100
- return dependencyGraph.cloneWithRelationships(node => {
101
- if (node.type === Graph.BaseNode.types.NETWORK) {
102
- // Exclude all nodes that ended after cutoffTimestamp (except for the main document which we always consider necessary)
103
- // endTime is negative if request does not finish, make sure startTime isn't after cutoffTimestamp in this case.
104
- const endedAfterPaint = node.endTime > cutoffTimestamp || node.startTime > cutoffTimestamp;
105
- if (endedAfterPaint && !node.isMainDocument()) {
106
- return false;
107
- }
108
- const url = node.request.url;
109
- // If the URL definitely wasn't render-blocking then we filter it out.
110
- if (definitelyNotRenderBlockingScriptUrls.has(url)) {
111
- return false;
112
- }
113
- // Lastly, build up the FCP graph of all nodes we consider render blocking
114
- return treatNodeAsRenderBlocking(node);
115
- }
116
- // If it's a CPU node, just check if it was blocking.
117
- return renderBlockingCpuNodeIds.has(node.id);
118
- });
119
- }
120
- static getOptimisticGraph(dependencyGraph, processedNavigation) {
121
- return this.getFirstPaintBasedGraph(dependencyGraph, {
122
- cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
123
- // In the optimistic graph we exclude resources that appeared to be render blocking but were
124
- // initiated by a script. While they typically have a very high importance and tend to have a
125
- // significant impact on the page's content, these resources don't technically block rendering.
126
- treatNodeAsRenderBlocking: node => node.hasRenderBlockingPriority() && node.initiatorType !== 'script',
127
- });
128
- }
129
- static getPessimisticGraph(dependencyGraph, processedNavigation) {
130
- return this.getFirstPaintBasedGraph(dependencyGraph, {
131
- cutoffTimestamp: processedNavigation.timestamps.firstContentfulPaint,
132
- treatNodeAsRenderBlocking: node => node.hasRenderBlockingPriority(),
133
- });
134
- }
135
- }
136
- export { FirstContentfulPaint };
@@ -1,67 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import * as Graph from '../graph/graph.js';
6
- import { Metric, } from './Metric.js';
7
- // Any CPU task of 20 ms or more will end up being a critical long task on mobile
8
- const CRITICAL_LONG_TASK_THRESHOLD = 20;
9
- class Interactive extends Metric {
10
- static get coefficients() {
11
- return {
12
- intercept: 0,
13
- optimistic: 0.45,
14
- pessimistic: 0.55,
15
- };
16
- }
17
- static getOptimisticGraph(dependencyGraph) {
18
- // Adjust the critical long task threshold for microseconds
19
- const minimumCpuTaskDuration = CRITICAL_LONG_TASK_THRESHOLD * 1000;
20
- return dependencyGraph.cloneWithRelationships(node => {
21
- // Include everything that might be a long task
22
- if (node.type === Graph.BaseNode.types.CPU) {
23
- return node.duration > minimumCpuTaskDuration;
24
- }
25
- // Include all scripts and high priority requests, exclude all images
26
- const isImage = node.request.resourceType === 'Image';
27
- const isScript = node.request.resourceType === 'Script';
28
- return (!isImage && (isScript || node.request.priority === 'High' || node.request.priority === 'VeryHigh'));
29
- });
30
- }
31
- static getPessimisticGraph(dependencyGraph) {
32
- return dependencyGraph;
33
- }
34
- static getEstimateFromSimulation(simulationResult, extras) {
35
- if (!extras.lcpResult) {
36
- throw new Core.LanternError('missing lcpResult');
37
- }
38
- const lastTaskAt = Interactive.getLastLongTaskEndTime(simulationResult.nodeTimings);
39
- const minimumTime = extras.optimistic ? extras.lcpResult.optimisticEstimate.timeInMs :
40
- extras.lcpResult.pessimisticEstimate.timeInMs;
41
- return {
42
- timeInMs: Math.max(minimumTime, lastTaskAt),
43
- nodeTimings: simulationResult.nodeTimings,
44
- };
45
- }
46
- static compute(data, extras) {
47
- const lcpResult = extras?.lcpResult;
48
- if (!lcpResult) {
49
- throw new Core.LanternError('LCP is required to calculate the Interactive metric');
50
- }
51
- const metricResult = super.compute(data, extras);
52
- metricResult.timing = Math.max(metricResult.timing, lcpResult.timing);
53
- return metricResult;
54
- }
55
- static getLastLongTaskEndTime(nodeTimings, duration = 50) {
56
- return Array.from(nodeTimings.entries())
57
- .filter(([node, timing]) => {
58
- if (node.type !== Graph.BaseNode.types.CPU) {
59
- return false;
60
- }
61
- return timing.duration > duration;
62
- })
63
- .map(([_, timing]) => timing.endTime)
64
- .reduce((max, x) => Math.max(max || 0, x || 0), 0);
65
- }
66
- }
67
- export { Interactive };
@@ -1,68 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import { FirstContentfulPaint } from './FirstContentfulPaint.js';
6
- import { Metric, } from './Metric.js';
7
- class LargestContentfulPaint extends Metric {
8
- static get coefficients() {
9
- return {
10
- intercept: 0,
11
- optimistic: 0.5,
12
- pessimistic: 0.5,
13
- };
14
- }
15
- /**
16
- * Low priority image nodes are usually offscreen and very unlikely to be the
17
- * resource that is required for LCP. Our LCP graphs include everything except for these images.
18
- */
19
- static isNotLowPriorityImageNode(node) {
20
- if (node.type !== 'network') {
21
- return true;
22
- }
23
- const isImage = node.request.resourceType === 'Image';
24
- const isLowPriority = node.request.priority === 'Low' || node.request.priority === 'VeryLow';
25
- return !isImage || !isLowPriority;
26
- }
27
- static getOptimisticGraph(dependencyGraph, processedNavigation) {
28
- const lcp = processedNavigation.timestamps.largestContentfulPaint;
29
- if (!lcp) {
30
- throw new Core.LanternError('NO_LCP');
31
- }
32
- return FirstContentfulPaint.getFirstPaintBasedGraph(dependencyGraph, {
33
- cutoffTimestamp: lcp,
34
- treatNodeAsRenderBlocking: LargestContentfulPaint.isNotLowPriorityImageNode,
35
- });
36
- }
37
- static getPessimisticGraph(dependencyGraph, processedNavigation) {
38
- const lcp = processedNavigation.timestamps.largestContentfulPaint;
39
- if (!lcp) {
40
- throw new Core.LanternError('NO_LCP');
41
- }
42
- return FirstContentfulPaint.getFirstPaintBasedGraph(dependencyGraph, {
43
- cutoffTimestamp: lcp,
44
- treatNodeAsRenderBlocking: _ => true,
45
- // For pessimistic LCP we'll include *all* layout nodes
46
- additionalCpuNodesToTreatAsRenderBlocking: node => node.didPerformLayout(),
47
- });
48
- }
49
- static getEstimateFromSimulation(simulationResult) {
50
- const nodeTimesNotOffscreenImages = Array.from(simulationResult.nodeTimings.entries())
51
- .filter(entry => LargestContentfulPaint.isNotLowPriorityImageNode(entry[0]))
52
- .map(entry => entry[1].endTime);
53
- return {
54
- timeInMs: Math.max(...nodeTimesNotOffscreenImages),
55
- nodeTimings: simulationResult.nodeTimings,
56
- };
57
- }
58
- static compute(data, extras) {
59
- const fcpResult = extras?.fcpResult;
60
- if (!fcpResult) {
61
- throw new Core.LanternError('FCP is required to calculate the LCP metric');
62
- }
63
- const metricResult = super.compute(data, extras);
64
- metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
65
- return metricResult;
66
- }
67
- }
68
- export { LargestContentfulPaint };
@@ -1,48 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import * as Graph from '../graph/graph.js';
6
- import { Metric, } from './Metric.js';
7
- class MaxPotentialFID extends Metric {
8
- static get coefficients() {
9
- return {
10
- intercept: 0,
11
- optimistic: 0.5,
12
- pessimistic: 0.5,
13
- };
14
- }
15
- static getOptimisticGraph(dependencyGraph) {
16
- return dependencyGraph;
17
- }
18
- static getPessimisticGraph(dependencyGraph) {
19
- return dependencyGraph;
20
- }
21
- static getEstimateFromSimulation(simulation, extras) {
22
- if (!extras.fcpResult) {
23
- throw new Core.LanternError('missing fcpResult');
24
- }
25
- // Intentionally use the opposite FCP estimate, a more pessimistic FCP means that more tasks
26
- // are excluded from the FID computation, so a higher FCP means lower FID for same work.
27
- const fcpTimeInMs = extras.optimistic ? extras.fcpResult.pessimisticEstimate.timeInMs :
28
- extras.fcpResult.optimisticEstimate.timeInMs;
29
- const timings = MaxPotentialFID.getTimingsAfterFCP(simulation.nodeTimings, fcpTimeInMs);
30
- return {
31
- timeInMs: Math.max(...timings.map(timing => timing.duration), 16),
32
- nodeTimings: simulation.nodeTimings,
33
- };
34
- }
35
- static compute(data, extras) {
36
- const fcpResult = extras?.fcpResult;
37
- if (!fcpResult) {
38
- throw new Core.LanternError('FCP is required to calculate the Max Potential FID metric');
39
- }
40
- return super.compute(data, extras);
41
- }
42
- static getTimingsAfterFCP(nodeTimings, fcpTimeInMs) {
43
- return Array.from(nodeTimings.entries())
44
- .filter(([node, timing]) => node.type === Graph.BaseNode.types.CPU && timing.endTime > fcpTimeInMs)
45
- .map(([_, timing]) => timing);
46
- }
47
- }
48
- export { MaxPotentialFID };
@@ -1,68 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import * as Graph from '../graph/graph.js';
6
- class Metric {
7
- static getScriptUrls(dependencyGraph, treatNodeAsRenderBlocking) {
8
- const scriptUrls = new Set();
9
- dependencyGraph.traverse(node => {
10
- if (node.type !== Graph.BaseNode.types.NETWORK) {
11
- return;
12
- }
13
- if (node.request.resourceType !== 'Script') {
14
- return;
15
- }
16
- if (treatNodeAsRenderBlocking?.(node)) {
17
- scriptUrls.add(node.request.url);
18
- }
19
- });
20
- return scriptUrls;
21
- }
22
- static get coefficients() {
23
- throw new Core.LanternError('coefficients unimplemented!');
24
- }
25
- /**
26
- * Returns the coefficients, scaled by the throttling settings if needed by the metric.
27
- * Some lantern metrics (speed-index) use components in their estimate that are not
28
- * from the simulator. In this case, we need to adjust the coefficients as the target throttling
29
- * settings change.
30
- */
31
- static getScaledCoefficients(_rttMs) {
32
- return this.coefficients;
33
- }
34
- static getOptimisticGraph(_dependencyGraph, _processedNavigation) {
35
- throw new Core.LanternError('Optimistic graph unimplemented!');
36
- }
37
- static getPessimisticGraph(_dependencyGraph, _processedNavigation) {
38
- throw new Core.LanternError('Pessmistic graph unimplemented!');
39
- }
40
- static getEstimateFromSimulation(simulationResult, _extras) {
41
- return simulationResult;
42
- }
43
- static compute(data, extras) {
44
- const { simulator, graph, processedNavigation } = data;
45
- const metricName = this.name.replace('Lantern', '');
46
- const optimisticGraph = this.getOptimisticGraph(graph, processedNavigation);
47
- const pessimisticGraph = this.getPessimisticGraph(graph, processedNavigation);
48
- let simulateOptions = { label: `optimistic${metricName}` };
49
- const optimisticSimulation = simulator.simulate(optimisticGraph, simulateOptions);
50
- simulateOptions = { label: `pessimistic${metricName}` };
51
- const pessimisticSimulation = simulator.simulate(pessimisticGraph, simulateOptions);
52
- const optimisticEstimate = this.getEstimateFromSimulation(optimisticSimulation, { ...extras, optimistic: true });
53
- const pessimisticEstimate = this.getEstimateFromSimulation(pessimisticSimulation, { ...extras, optimistic: false });
54
- const coefficients = this.getScaledCoefficients(simulator.rtt);
55
- // Estimates under 1s don't really follow the normal curve fit, minimize the impact of the intercept
56
- const interceptMultiplier = coefficients.intercept > 0 ? Math.min(1, optimisticEstimate.timeInMs / 1000) : 1;
57
- const timing = coefficients.intercept * interceptMultiplier +
58
- coefficients.optimistic * optimisticEstimate.timeInMs + coefficients.pessimistic * pessimisticEstimate.timeInMs;
59
- return {
60
- timing,
61
- optimisticEstimate,
62
- pessimisticEstimate,
63
- optimisticGraph,
64
- pessimisticGraph,
65
- };
66
- }
67
- }
68
- export { Metric };
@@ -1,101 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import * as Graph from '../graph/graph.js';
6
- import { Metric, } from './Metric.js';
7
- const mobileSlow4GRtt = 150;
8
- class SpeedIndex extends Metric {
9
- static get coefficients() {
10
- return {
11
- // Note that the optimistic estimate is based on the real observed speed index rather than a
12
- // real lantern graph (and the final estimate will be Math.max(FCP, Speed Index)).
13
- intercept: 0,
14
- optimistic: 1.4,
15
- pessimistic: 0.4,
16
- };
17
- }
18
- static getScaledCoefficients(rttMs) {
19
- // We want to scale our default coefficients based on the speed of the connection.
20
- // We will linearly interpolate coefficients for the passed-in rttMs based on two pre-determined points:
21
- // 1. Baseline point of 30 ms RTT where Speed Index should be a ~50/50 blend of optimistic/pessimistic.
22
- // 30 ms was based on a typical home WiFi connection's actual RTT.
23
- // Coefficients here follow from the fact that the optimistic estimate should be very close
24
- // to reality at this connection speed and the pessimistic estimate compensates for minor
25
- // connection speed differences.
26
- // 2. Default throttled point of 150 ms RTT where the default coefficients have been determined to be most accurate.
27
- // Coefficients here were determined through thorough analysis and linear regression on the
28
- // lantern test data set. See core/scripts/test-lantern.sh for more detail.
29
- // While the coefficients haven't been analyzed at the interpolated points, it's our current best effort.
30
- const defaultCoefficients = this.coefficients;
31
- const defaultRttExcess = mobileSlow4GRtt - 30;
32
- const multiplier = Math.max((rttMs - 30) / defaultRttExcess, 0);
33
- return {
34
- intercept: defaultCoefficients.intercept * multiplier,
35
- optimistic: 0.5 + (defaultCoefficients.optimistic - 0.5) * multiplier,
36
- pessimistic: 0.5 + (defaultCoefficients.pessimistic - 0.5) * multiplier,
37
- };
38
- }
39
- static getOptimisticGraph(dependencyGraph) {
40
- return dependencyGraph;
41
- }
42
- static getPessimisticGraph(dependencyGraph) {
43
- return dependencyGraph;
44
- }
45
- static getEstimateFromSimulation(simulationResult, extras) {
46
- if (!extras.fcpResult) {
47
- throw new Core.LanternError('missing fcpResult');
48
- }
49
- if (extras.observedSpeedIndex === undefined) {
50
- throw new Core.LanternError('missing observedSpeedIndex');
51
- }
52
- const fcpTimeInMs = extras.fcpResult.pessimisticEstimate.timeInMs;
53
- const estimate = extras.optimistic ?
54
- extras.observedSpeedIndex :
55
- SpeedIndex.computeLayoutBasedSpeedIndex(simulationResult.nodeTimings, fcpTimeInMs);
56
- return {
57
- timeInMs: estimate,
58
- nodeTimings: simulationResult.nodeTimings,
59
- };
60
- }
61
- static compute(data, extras) {
62
- const fcpResult = extras?.fcpResult;
63
- if (!fcpResult) {
64
- throw new Core.LanternError('FCP is required to calculate the SpeedIndex metric');
65
- }
66
- const metricResult = super.compute(data, extras);
67
- metricResult.timing = Math.max(metricResult.timing, fcpResult.timing);
68
- return metricResult;
69
- }
70
- /**
71
- * Approximate speed index using layout events from the simulated node timings.
72
- * The layout-based speed index is the weighted average of the endTime of CPU nodes that contained
73
- * a 'Layout' task. log(duration) is used as the weight to stand for "significance" to the page.
74
- *
75
- * If no layout events can be found or the endTime of a CPU task is too early, FCP is used instead.
76
- *
77
- * This approach was determined after evaluating the accuracy/complexity tradeoff of many
78
- * different methods. Read more in the evaluation doc.
79
- *
80
- * @see https://docs.google.com/document/d/1qJWXwxoyVLVadezIp_Tgdk867G3tDNkkVRvUJSH3K1E/edit#
81
- */
82
- static computeLayoutBasedSpeedIndex(nodeTimings, fcpTimeInMs) {
83
- const layoutWeights = [];
84
- for (const [node, timing] of nodeTimings.entries()) {
85
- if (node.type !== Graph.BaseNode.types.CPU) {
86
- continue;
87
- }
88
- if (node.childEvents.some(x => x.name === 'Layout')) {
89
- const timingWeight = Math.max(Math.log2(timing.endTime - timing.startTime), 0);
90
- layoutWeights.push({ time: timing.endTime, weight: timingWeight });
91
- }
92
- }
93
- const totalWeightedTime = layoutWeights.map(evt => evt.weight * Math.max(evt.time, fcpTimeInMs)).reduce((a, b) => a + b, 0);
94
- const totalWeight = layoutWeights.map(evt => evt.weight).reduce((a, b) => a + b, 0);
95
- if (!totalWeight) {
96
- return fcpTimeInMs;
97
- }
98
- return totalWeightedTime / totalWeight;
99
- }
100
- }
101
- export { SpeedIndex };
@@ -1,64 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- const BLOCKING_TIME_THRESHOLD = 50;
5
- /**
6
- * For TBT, We only want to consider tasks that fall in our time range
7
- * - FCP and TTI for navigation mode
8
- * - Trace start and trace end for timespan mode
9
- *
10
- * FCP is picked as `startTimeMs` because there is little risk of user input happening
11
- * before FCP so Long Queuing Qelay regions do not harm user experience. Developers should be
12
- * optimizing to reach FCP as fast as possible without having to worry about task lengths.
13
- *
14
- * TTI is picked as `endTimeMs` because we want a well defined end point for page load.
15
- *
16
- * @param startTimeMs Should be FCP in navigation mode and the trace start time in timespan mode
17
- * @param endTimeMs Should be TTI in navigation mode and the trace end time in timespan mode
18
- * @param topLevelEvent Leave unset if `event` is top level. Has no effect if `event` has the same duration as `topLevelEvent`.
19
- */
20
- function calculateTbtImpactForEvent(event, startTimeMs, endTimeMs, topLevelEvent) {
21
- let threshold = BLOCKING_TIME_THRESHOLD;
22
- // If a task is not top level, it doesn't make sense to subtract the entire 50ms
23
- // blocking threshold from the event.
24
- //
25
- // e.g. A 80ms top level task with two 40ms children should attribute some blocking
26
- // time to the 40ms tasks even though they do not meet the 50ms threshold.
27
- //
28
- // The solution is to scale the threshold for child events to be considered blocking.
29
- if (topLevelEvent) {
30
- threshold *= (event.duration / topLevelEvent.duration);
31
- }
32
- if (event.duration < threshold) {
33
- return 0;
34
- }
35
- if (event.end < startTimeMs) {
36
- return 0;
37
- }
38
- if (event.start > endTimeMs) {
39
- return 0;
40
- }
41
- // Perform the clipping and then calculate Blocking Region. So if we have a 150ms task
42
- // [0, 150] and `startTimeMs` is at 50ms, we first clip the task to [50, 150], and then
43
- // calculate the Blocking Region to be [100, 150]. The rational here is that tasks before
44
- // the start time are unimportant, so we care whether the main thread is busy more than
45
- // 50ms at a time only after the start time.
46
- const clippedStart = Math.max(event.start, startTimeMs);
47
- const clippedEnd = Math.min(event.end, endTimeMs);
48
- const clippedDuration = clippedEnd - clippedStart;
49
- if (clippedDuration < threshold) {
50
- return 0;
51
- }
52
- return clippedDuration - threshold;
53
- }
54
- function calculateSumOfBlockingTime(topLevelEvents, startTimeMs, endTimeMs) {
55
- if (endTimeMs <= startTimeMs) {
56
- return 0;
57
- }
58
- let sumBlockingTime = 0;
59
- for (const event of topLevelEvents) {
60
- sumBlockingTime += calculateTbtImpactForEvent(event, startTimeMs, endTimeMs);
61
- }
62
- return sumBlockingTime;
63
- }
64
- export { BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime, calculateTbtImpactForEvent, };
@@ -1,78 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- import * as Core from '../core/core.js';
5
- import * as Graph from '../graph/graph.js';
6
- import { Metric, } from './Metric.js';
7
- import { BLOCKING_TIME_THRESHOLD, calculateSumOfBlockingTime } from './TBTUtils.js';
8
- class TotalBlockingTime extends Metric {
9
- static get coefficients() {
10
- return {
11
- intercept: 0,
12
- optimistic: 0.5,
13
- pessimistic: 0.5,
14
- };
15
- }
16
- static getOptimisticGraph(dependencyGraph) {
17
- return dependencyGraph;
18
- }
19
- static getPessimisticGraph(dependencyGraph) {
20
- return dependencyGraph;
21
- }
22
- static getEstimateFromSimulation(simulation, extras) {
23
- if (!extras.fcpResult) {
24
- throw new Core.LanternError('missing fcpResult');
25
- }
26
- if (!extras.interactiveResult) {
27
- throw new Core.LanternError('missing interactiveResult');
28
- }
29
- // Intentionally use the opposite FCP estimate. A pessimistic FCP is higher than equal to an
30
- // optimistic FCP, which means potentially more tasks are excluded from the Total Blocking Time
31
- // computation. So a more pessimistic FCP gives a more optimistic Total Blocking Time for the
32
- // same work.
33
- const fcpTimeInMs = extras.optimistic ? extras.fcpResult.pessimisticEstimate.timeInMs :
34
- extras.fcpResult.optimisticEstimate.timeInMs;
35
- // Similarly, we always have pessimistic TTI >= optimistic TTI. Therefore, picking optimistic
36
- // TTI means our window of interest is smaller and thus potentially more tasks are excluded from
37
- // Total Blocking Time computation, yielding a lower (more optimistic) Total Blocking Time value
38
- // for the same work.
39
- const interactiveTimeMs = extras.optimistic ? extras.interactiveResult.optimisticEstimate.timeInMs :
40
- extras.interactiveResult.pessimisticEstimate.timeInMs;
41
- const minDurationMs = BLOCKING_TIME_THRESHOLD;
42
- const events = TotalBlockingTime.getTopLevelEvents(simulation.nodeTimings, minDurationMs);
43
- return {
44
- timeInMs: calculateSumOfBlockingTime(events, fcpTimeInMs, interactiveTimeMs),
45
- nodeTimings: simulation.nodeTimings,
46
- };
47
- }
48
- static compute(data, extras) {
49
- const fcpResult = extras?.fcpResult;
50
- if (!fcpResult) {
51
- throw new Core.LanternError('FCP is required to calculate the TBT metric');
52
- }
53
- const interactiveResult = extras?.fcpResult;
54
- if (!interactiveResult) {
55
- throw new Core.LanternError('Interactive is required to calculate the TBT metric');
56
- }
57
- return super.compute(data, extras);
58
- }
59
- static getTopLevelEvents(nodeTimings, minDurationMs) {
60
- const events = [];
61
- for (const [node, timing] of nodeTimings.entries()) {
62
- if (node.type !== Graph.BaseNode.types.CPU) {
63
- continue;
64
- }
65
- // Filtering out events below minimum duration.
66
- if (timing.duration < minDurationMs) {
67
- continue;
68
- }
69
- events.push({
70
- start: timing.startTime,
71
- end: timing.endTime,
72
- duration: timing.duration,
73
- });
74
- }
75
- return events;
76
- }
77
- }
78
- export { TotalBlockingTime };
@@ -1,11 +0,0 @@
1
- // Copyright 2024 The Chromium Authors
2
- // Use of this source code is governed by a BSD-style license that can be
3
- // found in the LICENSE file.
4
- export * from './FirstContentfulPaint.js';
5
- export * from './Interactive.js';
6
- export * from './LargestContentfulPaint.js';
7
- export * from './MaxPotentialFID.js';
8
- export * from './Metric.js';
9
- export * from './SpeedIndex.js';
10
- export * from './TotalBlockingTime.js';
11
- export * as TBTUtils from './TBTUtils.js';