chrome-devtools-frontend 1.0.1023108 → 1.0.1023618
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +3 -1
 - package/front_end/core/i18n/locales/en-US.json +9 -0
 - package/front_end/core/i18n/locales/en-XL.json +9 -0
 - package/front_end/generated/.clang-format +1 -0
 - package/front_end/generated/ARIAProperties.js +1515 -517
 - package/front_end/generated/InspectorBackendCommands.js +960 -3655
 - package/front_end/generated/SupportedCSSProperties.js +5719 -1314
 - package/front_end/generated/protocol-mapping.d.ts +1865 -608
 - package/front_end/generated/protocol-proxy-api.d.ts +384 -576
 - package/front_end/generated/protocol.ts +5 -12
 - package/front_end/panels/elements/DOMLinkifier.ts +5 -1
 - package/front_end/panels/network/components/RequestHeadersView.css +4 -0
 - package/front_end/panels/network/components/RequestHeadersView.ts +57 -14
 - package/front_end/ui/components/buttons/Button.ts +2 -2
 - package/package.json +1 -1
 - package/scripts/build/generate_aria.py +2 -1
 - package/scripts/build/generate_supported_css.py +6 -3
 
| 
         @@ -10,16 +10,12 @@ 
     | 
|
| 
       10 
10 
     | 
    
         | 
| 
       11 
11 
     | 
    
         
             
            export type integer = number;
         
     | 
| 
       12 
12 
     | 
    
         
             
            export type binary = string;
         
     | 
| 
       13 
     | 
    
         
            -
            export type EnumerableEnum<T> = {
         
     | 
| 
       14 
     | 
    
         
            -
              [K in keyof T]: T[K]
         
     | 
| 
       15 
     | 
    
         
            -
            };
         
     | 
| 
      
 13 
     | 
    
         
            +
            export type EnumerableEnum<T> = {[K in keyof T]: T[K]};
         
     | 
| 
       16 
14 
     | 
    
         
             
            export interface ProtocolResponseWithError {
         
     | 
| 
       17 
15 
     | 
    
         
             
              /** Returns an error message if the request failed. */
         
     | 
| 
       18 
16 
     | 
    
         
             
              getError(): string|undefined;
         
     | 
| 
       19 
17 
     | 
    
         
             
            }
         
     | 
| 
       20 
     | 
    
         
            -
            type OpaqueType<Tag extends string> = {
         
     | 
| 
       21 
     | 
    
         
            -
              protocolOpaqueTypeTag: Tag
         
     | 
| 
       22 
     | 
    
         
            -
            };
         
     | 
| 
      
 18 
     | 
    
         
            +
            type OpaqueType<Tag extends string> = {protocolOpaqueTypeTag: Tag};
         
     | 
| 
       23 
19 
     | 
    
         
             
            type OpaqueIdentifier<RepresentationType, Tag extends string> = RepresentationType&OpaqueType<Tag>;
         
     | 
| 
       24 
20 
     | 
    
         | 
| 
       25 
21 
     | 
    
         
             
            export namespace Accessibility {
         
     | 
| 
         @@ -1059,14 +1055,12 @@ export namespace Audits { 
     | 
|
| 
       1059 
1055 
     | 
    
         
             
                RequestedSubresourceWithEmbeddedCredentials = 'RequestedSubresourceWithEmbeddedCredentials',
         
     | 
| 
       1060 
1056 
     | 
    
         
             
                RTCConstraintEnableDtlsSrtpFalse = 'RTCConstraintEnableDtlsSrtpFalse',
         
     | 
| 
       1061 
1057 
     | 
    
         
             
                RTCConstraintEnableDtlsSrtpTrue = 'RTCConstraintEnableDtlsSrtpTrue',
         
     | 
| 
       1062 
     | 
    
         
            -
                RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics =
         
     | 
| 
       1063 
     | 
    
         
            -
                    'RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics',
         
     | 
| 
      
 1058 
     | 
    
         
            +
                RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics = 'RTCPeerConnectionComplexPlanBSdpUsingDefaultSdpSemantics',
         
     | 
| 
       1064 
1059 
     | 
    
         
             
                RTCPeerConnectionSdpSemanticsPlanB = 'RTCPeerConnectionSdpSemanticsPlanB',
         
     | 
| 
       1065 
1060 
     | 
    
         
             
                RtcpMuxPolicyNegotiate = 'RtcpMuxPolicyNegotiate',
         
     | 
| 
       1066 
1061 
     | 
    
         
             
                SharedArrayBufferConstructedWithoutIsolation = 'SharedArrayBufferConstructedWithoutIsolation',
         
     | 
| 
       1067 
1062 
     | 
    
         
             
                TextToSpeech_DisallowedByAutoplay = 'TextToSpeech_DisallowedByAutoplay',
         
     | 
| 
       1068 
     | 
    
         
            -
                V8SharedArrayBufferConstructedInExtensionWithoutIsolation =
         
     | 
| 
       1069 
     | 
    
         
            -
                    'V8SharedArrayBufferConstructedInExtensionWithoutIsolation',
         
     | 
| 
      
 1063 
     | 
    
         
            +
                V8SharedArrayBufferConstructedInExtensionWithoutIsolation = 'V8SharedArrayBufferConstructedInExtensionWithoutIsolation',
         
     | 
| 
       1070 
1064 
     | 
    
         
             
                XHRJSONEncodingDetection = 'XHRJSONEncodingDetection',
         
     | 
| 
       1071 
1065 
     | 
    
         
             
                XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload = 'XMLHttpRequestSynchronousInNonWorkerOutsideBeforeUnload',
         
     | 
| 
       1072 
1066 
     | 
    
         
             
                XRSupportsSession = 'XRSupportsSession',
         
     | 
| 
         @@ -11009,8 +11003,7 @@ export namespace Page { 
     | 
|
| 
       11009 
11003 
     | 
    
         
             
                EmbedderDomDistillerSelfDeletingRequestDelegate = 'EmbedderDomDistillerSelfDeletingRequestDelegate',
         
     | 
| 
       11010 
11004 
     | 
    
         
             
                EmbedderOomInterventionTabHelper = 'EmbedderOomInterventionTabHelper',
         
     | 
| 
       11011 
11005 
     | 
    
         
             
                EmbedderOfflinePage = 'EmbedderOfflinePage',
         
     | 
| 
       11012 
     | 
    
         
            -
                EmbedderChromePasswordManagerClientBindCredentialManager =
         
     | 
| 
       11013 
     | 
    
         
            -
                    'EmbedderChromePasswordManagerClientBindCredentialManager',
         
     | 
| 
      
 11006 
     | 
    
         
            +
                EmbedderChromePasswordManagerClientBindCredentialManager = 'EmbedderChromePasswordManagerClientBindCredentialManager',
         
     | 
| 
       11014 
11007 
     | 
    
         
             
                EmbedderPermissionRequestManager = 'EmbedderPermissionRequestManager',
         
     | 
| 
       11015 
11008 
     | 
    
         
             
                EmbedderModalDialog = 'EmbedderModalDialog',
         
     | 
| 
       11016 
11009 
     | 
    
         
             
                EmbedderExtensions = 'EmbedderExtensions',
         
     | 
| 
         @@ -95,7 +95,11 @@ export const linkifyNodeReference = function( 
     | 
|
| 
       95 
95 
     | 
    
         
             
              link.addEventListener('mouseleave', () => SDK.OverlayModel.OverlayModel.hideDOMNodeHighlight(), false);
         
     | 
| 
       96 
96 
     | 
    
         | 
| 
       97 
97 
     | 
    
         
             
              if (!options.preventKeyboardFocus) {
         
     | 
| 
       98 
     | 
    
         
            -
                link.addEventListener('keydown', event =>  
     | 
| 
      
 98 
     | 
    
         
            +
                link.addEventListener('keydown', event => {
         
     | 
| 
      
 99 
     | 
    
         
            +
                  if (event.key === 'Enter') {
         
     | 
| 
      
 100 
     | 
    
         
            +
                    void Common.Revealer.reveal(node, false);
         
     | 
| 
      
 101 
     | 
    
         
            +
                  }
         
     | 
| 
      
 102 
     | 
    
         
            +
                });
         
     | 
| 
       99 
103 
     | 
    
         
             
                link.tabIndex = 0;
         
     | 
| 
       100 
104 
     | 
    
         
             
                UI.ARIAUtils.markAsLink(link);
         
     | 
| 
       101 
105 
     | 
    
         
             
              }
         
     | 
| 
         @@ -74,6 +74,19 @@ const UIStrings = { 
     | 
|
| 
       74 
74 
     | 
    
         
             
              onlyChooseThisOptionIfAn:
         
     | 
| 
       75 
75 
     | 
    
         
             
                  'Only choose this option if an arbitrary website including this resource does not impose a security risk.',
         
     | 
| 
       76 
76 
     | 
    
         
             
              /**
         
     | 
| 
      
 77 
     | 
    
         
            +
              *@description Message to explain lack of raw headers for a particular network request
         
     | 
| 
      
 78 
     | 
    
         
            +
              */
         
     | 
| 
      
 79 
     | 
    
         
            +
              provisionalHeadersAreShownDisableCache: 'Provisional headers are shown. Disable cache to see full headers.',
         
     | 
| 
      
 80 
     | 
    
         
            +
              /**
         
     | 
| 
      
 81 
     | 
    
         
            +
              *@description Tooltip to explain lack of raw headers for a particular network request
         
     | 
| 
      
 82 
     | 
    
         
            +
              */
         
     | 
| 
      
 83 
     | 
    
         
            +
              onlyProvisionalHeadersAre:
         
     | 
| 
      
 84 
     | 
    
         
            +
                  'Only provisional headers are available because this request was not sent over the network and instead was served from a local cache, which doesn’t store the original request headers. Disable cache to see full request headers.',
         
     | 
| 
      
 85 
     | 
    
         
            +
              /**
         
     | 
| 
      
 86 
     | 
    
         
            +
              *@description Message to explain lack of raw headers for a particular network request
         
     | 
| 
      
 87 
     | 
    
         
            +
              */
         
     | 
| 
      
 88 
     | 
    
         
            +
              provisionalHeadersAreShown: 'Provisional headers are shown.',
         
     | 
| 
      
 89 
     | 
    
         
            +
              /**
         
     | 
| 
       77 
90 
     | 
    
         
             
              *@description Text in Request Headers View of the Network panel
         
     | 
| 
       78 
91 
     | 
    
         
             
              */
         
     | 
| 
       79 
92 
     | 
    
         
             
              referrerPolicy: 'Referrer Policy',
         
     | 
| 
         @@ -289,12 +302,44 @@ export class RequestHeadersComponent extends HTMLElement { 
     | 
|
| 
       289 
302 
     | 
    
         
             
                  >
         
     | 
| 
       290 
303 
     | 
    
         
             
                    ${(this.#showRequestHeadersText && requestHeadersText) ?
         
     | 
| 
       291 
304 
     | 
    
         
             
                        this.#renderRawHeaders(requestHeadersText, false) : html`
         
     | 
| 
      
 305 
     | 
    
         
            +
                      ${this.#maybeRenderProvisionalHeadersWarning()}
         
     | 
| 
       292 
306 
     | 
    
         
             
                      ${headers.map(header => this.#renderHeader({...header, headerNotSet: false}))}
         
     | 
| 
       293 
307 
     | 
    
         
             
                    `}
         
     | 
| 
       294 
308 
     | 
    
         
             
                  </${Category.litTagName}>
         
     | 
| 
       295 
309 
     | 
    
         
             
                `;
         
     | 
| 
       296 
310 
     | 
    
         
             
              }
         
     | 
| 
       297 
311 
     | 
    
         | 
| 
      
 312 
     | 
    
         
            +
              #maybeRenderProvisionalHeadersWarning(): LitHtml.LitTemplate {
         
     | 
| 
      
 313 
     | 
    
         
            +
                assertNotNullOrUndefined(this.#request);
         
     | 
| 
      
 314 
     | 
    
         
            +
                if (this.#request.requestHeadersText() !== undefined) {
         
     | 
| 
      
 315 
     | 
    
         
            +
                  return LitHtml.nothing;
         
     | 
| 
      
 316 
     | 
    
         
            +
                }
         
     | 
| 
      
 317 
     | 
    
         
            +
             
     | 
| 
      
 318 
     | 
    
         
            +
                let cautionText;
         
     | 
| 
      
 319 
     | 
    
         
            +
                let cautionTitle = '';
         
     | 
| 
      
 320 
     | 
    
         
            +
                if (this.#request.cachedInMemory() || this.#request.cached()) {
         
     | 
| 
      
 321 
     | 
    
         
            +
                  cautionText = i18nString(UIStrings.provisionalHeadersAreShownDisableCache);
         
     | 
| 
      
 322 
     | 
    
         
            +
                  cautionTitle = i18nString(UIStrings.onlyProvisionalHeadersAre);
         
     | 
| 
      
 323 
     | 
    
         
            +
                } else {
         
     | 
| 
      
 324 
     | 
    
         
            +
                  cautionText = i18nString(UIStrings.provisionalHeadersAreShown);
         
     | 
| 
      
 325 
     | 
    
         
            +
                }
         
     | 
| 
      
 326 
     | 
    
         
            +
                return html`
         
     | 
| 
      
 327 
     | 
    
         
            +
                  <div class="call-to-action">
         
     | 
| 
      
 328 
     | 
    
         
            +
                    <div class="call-to-action-body">
         
     | 
| 
      
 329 
     | 
    
         
            +
                      <div class="explanation" title=${cautionTitle}>
         
     | 
| 
      
 330 
     | 
    
         
            +
                        <${IconButton.Icon.Icon.litTagName} class="inline-icon" .data=${{
         
     | 
| 
      
 331 
     | 
    
         
            +
                          iconName: 'warning_icon',
         
     | 
| 
      
 332 
     | 
    
         
            +
                          width: '12px',
         
     | 
| 
      
 333 
     | 
    
         
            +
                          height: '12px',
         
     | 
| 
      
 334 
     | 
    
         
            +
                          } as IconButton.Icon.IconData}>
         
     | 
| 
      
 335 
     | 
    
         
            +
                        </${IconButton.Icon.Icon.litTagName}>
         
     | 
| 
      
 336 
     | 
    
         
            +
                        ${cautionText} <x-link href="https://developer.chrome.com/docs/devtools/network/reference/#provisional-headers" class="link">${i18nString(UIStrings.learnMore)}</x-link>
         
     | 
| 
      
 337 
     | 
    
         
            +
                      </div>
         
     | 
| 
      
 338 
     | 
    
         
            +
                    </div>
         
     | 
| 
      
 339 
     | 
    
         
            +
                  </div>
         
     | 
| 
      
 340 
     | 
    
         
            +
                `;
         
     | 
| 
      
 341 
     | 
    
         
            +
              }
         
     | 
| 
      
 342 
     | 
    
         
            +
             
     | 
| 
       298 
343 
     | 
    
         
             
              #renderHeader(header: HeaderDescriptor): LitHtml.TemplateResult {
         
     | 
| 
       299 
344 
     | 
    
         
             
                return html`
         
     | 
| 
       300 
345 
     | 
    
         
             
                  <div class="row">
         
     | 
| 
         @@ -310,20 +355,18 @@ export class RequestHeadersComponent extends HTMLElement { 
     | 
|
| 
       310 
355 
     | 
    
         
             
                  return LitHtml.nothing;
         
     | 
| 
       311 
356 
     | 
    
         
             
                }
         
     | 
| 
       312 
357 
     | 
    
         
             
                return html`
         
     | 
| 
       313 
     | 
    
         
            -
                  <div class=" 
     | 
| 
       314 
     | 
    
         
            -
                    <div class="call-to-action">
         
     | 
| 
       315 
     | 
    
         
            -
                      <div class=" 
     | 
| 
       316 
     | 
    
         
            -
             
     | 
| 
       317 
     | 
    
         
            -
                         
     | 
| 
       318 
     | 
    
         
            -
                          < 
     | 
| 
       319 
     | 
    
         
            -
             
     | 
| 
       320 
     | 
    
         
            -
                             
     | 
| 
       321 
     | 
    
         
            -
             
     | 
| 
       322 
     | 
    
         
            -
             
     | 
| 
       323 
     | 
    
         
            -
             
     | 
| 
       324 
     | 
    
         
            -
             
     | 
| 
       325 
     | 
    
         
            -
                        ${this.#maybeRenderHeaderDetailsLink(headerDetails)}
         
     | 
| 
       326 
     | 
    
         
            -
                      </div>
         
     | 
| 
      
 358 
     | 
    
         
            +
                  <div class="call-to-action">
         
     | 
| 
      
 359 
     | 
    
         
            +
                    <div class="call-to-action-body">
         
     | 
| 
      
 360 
     | 
    
         
            +
                      <div class="explanation">${headerDetails.explanation()}</div>
         
     | 
| 
      
 361 
     | 
    
         
            +
                      ${headerDetails.examples.map(example => html`
         
     | 
| 
      
 362 
     | 
    
         
            +
                        <div class="example">
         
     | 
| 
      
 363 
     | 
    
         
            +
                          <code>${example.codeSnippet}</code>
         
     | 
| 
      
 364 
     | 
    
         
            +
                          ${example.comment ? html`
         
     | 
| 
      
 365 
     | 
    
         
            +
                            <span class="comment">${example.comment()}</span>
         
     | 
| 
      
 366 
     | 
    
         
            +
                          ` : ''}
         
     | 
| 
      
 367 
     | 
    
         
            +
                        </div>
         
     | 
| 
      
 368 
     | 
    
         
            +
                      `)}
         
     | 
| 
      
 369 
     | 
    
         
            +
                      ${this.#maybeRenderHeaderDetailsLink(headerDetails)}
         
     | 
| 
       327 
370 
     | 
    
         
             
                    </div>
         
     | 
| 
       328 
371 
     | 
    
         
             
                  </div>
         
     | 
| 
       329 
372 
     | 
    
         
             
                `;
         
     | 
| 
         @@ -63,7 +63,7 @@ export type ButtonData = { 
     | 
|
| 
       63 
63 
     | 
    
         
             
            };
         
     | 
| 
       64 
64 
     | 
    
         | 
| 
       65 
65 
     | 
    
         
             
            interface ButtonElementInternals extends ElementInternals {
         
     | 
| 
       66 
     | 
    
         
            -
              readonly form 
     | 
| 
      
 66 
     | 
    
         
            +
              readonly form: HTMLFormElement|null;
         
     | 
| 
       67 
67 
     | 
    
         
             
              readonly validity: ValidityState;
         
     | 
| 
       68 
68 
     | 
    
         
             
              readonly willValidate: boolean;
         
     | 
| 
       69 
69 
     | 
    
         
             
              readonly validationMessage: string;
         
     | 
| 
         @@ -254,7 +254,7 @@ export class Button extends HTMLElement { 
     | 
|
| 
       254 
254 
     | 
    
         
             
              // The following properties and methods aren't strictly required,
         
     | 
| 
       255 
255 
     | 
    
         
             
              // but browser-level form controls provide them. Providing them helps
         
     | 
| 
       256 
256 
     | 
    
         
             
              // ensure consistency with browser-provided controls.
         
     | 
| 
       257 
     | 
    
         
            -
              get form(): HTMLFormElement| 
     | 
| 
      
 257 
     | 
    
         
            +
              get form(): HTMLFormElement|null {
         
     | 
| 
       258 
258 
     | 
    
         
             
                return this.#internals.form;
         
     | 
| 
       259 
259 
     | 
    
         
             
              }
         
     | 
| 
       260 
260 
     | 
    
         
             
              get name(): string|null {
         
     | 
    
        package/package.json
    CHANGED
    
    
| 
         @@ -32,4 +32,5 @@ with open(GENERATED_LOCATION, "w+") as f: 
     | 
|
| 
       32 
32 
     | 
    
         
             
                f.write('// Use of this source code is governed by a BSD-style license that can be\n')
         
     | 
| 
       33 
33 
     | 
    
         
             
                f.write('// found in the LICENSE file.\n')
         
     | 
| 
       34 
34 
     | 
    
         
             
                f.write('\n')
         
     | 
| 
       35 
     | 
    
         
            -
                f.write("export const config = %s;\n" % 
     | 
| 
      
 35 
     | 
    
         
            +
                f.write("export const config = %s;\n" %
         
     | 
| 
      
 36 
     | 
    
         
            +
                        json.dumps(ARIA_PROPERTIES, sort_keys=True, indent=1))
         
     | 
| 
         @@ -108,7 +108,10 @@ with open(GENERATED_LOCATION, "w+") as f: 
     | 
|
| 
       108 
108 
     | 
    
         
             
                f.write('// Use of this source code is governed by a BSD-style license that can be\n')
         
     | 
| 
       109 
109 
     | 
    
         
             
                f.write('// found in the LICENSE file.\n')
         
     | 
| 
       110 
110 
     | 
    
         
             
                f.write('\n')
         
     | 
| 
       111 
     | 
    
         
            -
                f.write("export const generatedProperties = %s;\n" % 
     | 
| 
      
 111 
     | 
    
         
            +
                f.write("export const generatedProperties = %s;\n" %
         
     | 
| 
      
 112 
     | 
    
         
            +
                        json.dumps(properties, sort_keys=True, indent=1))
         
     | 
| 
       112 
113 
     | 
    
         
             
                # sort keys to ensure entries are generated in a deterministic way to avoid inconsistencies across different OS
         
     | 
| 
       113 
     | 
    
         
            -
                f.write("export const generatedPropertyValues = %s;\n" % 
     | 
| 
       114 
     | 
    
         
            -
             
     | 
| 
      
 114 
     | 
    
         
            +
                f.write("export const generatedPropertyValues = %s;\n" %
         
     | 
| 
      
 115 
     | 
    
         
            +
                        json.dumps(property_values, sort_keys=True, indent=1))
         
     | 
| 
      
 116 
     | 
    
         
            +
                f.write("export const generatedAliasesFor = new Map(%s);\n" %
         
     | 
| 
      
 117 
     | 
    
         
            +
                        json.dumps(aliases_for, sort_keys=True, indent=1))
         
     |