chrome-devtools-frontend 1.0.944427 → 1.0.944903
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/gni/devtools_grd_files.gni +3 -0
- package/front_end/core/common/ParsedURL.ts +1 -1
- package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -5
- package/front_end/core/i18n/locales/en-US.json +3 -15
- package/front_end/core/i18n/locales/en-XL.json +15 -27
- package/front_end/core/protocol_client/NodeURL.ts +1 -0
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +2 -3
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -3
- package/front_end/core/sdk/Cookie.ts +17 -0
- package/front_end/core/sdk/CookieModel.ts +1 -0
- package/front_end/core/sdk/DebuggerModel.ts +5 -4
- package/front_end/core/sdk/NetworkManager.ts +4 -1
- package/front_end/core/sdk/NetworkRequest.ts +2 -2
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/Script.ts +2 -3
- package/front_end/models/bindings/BreakpointManager.ts +3 -4
- package/front_end/models/bindings/ResourceMapping.ts +1 -2
- package/front_end/models/bindings/StylesSourceMapping.ts +1 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -6
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +10 -6
- package/front_end/models/persistence/PersistenceActions.ts +4 -1
- package/front_end/models/persistence/PlatformFileSystem.ts +3 -4
- package/front_end/models/text_utils/ContentProvider.ts +1 -2
- package/front_end/models/text_utils/StaticContentProvider.ts +2 -3
- package/front_end/models/workspace/UISourceCode.ts +2 -2
- package/front_end/panels/animation/animationTimeline.css +2 -0
- package/front_end/panels/application/ReportingApiView.ts +15 -1
- package/front_end/panels/application/components/EndpointsGrid.ts +63 -4
- package/front_end/panels/application/components/FrameDetailsView.ts +21 -34
- package/front_end/panels/snippets/ScriptSnippetFileSystem.ts +1 -1
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -1
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +3 -34
- package/front_end/panels/timeline/TimelineUIUtils.ts +51 -3
- package/front_end/services/window_bounds/WindowBoundsService.ts +27 -0
- package/front_end/services/window_bounds/window_bounds.ts +9 -0
- package/front_end/third_party/codemirror.next/bundle.ts +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +8 -1
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/package.json +1 -1
- package/front_end/third_party/lit-html/README.chromium +2 -2
- package/front_end/third_party/lit-html/package/CHANGELOG.md +216 -28
- package/front_end/third_party/lit-html/package/LICENSE +9 -9
- package/front_end/third_party/lit-html/package/README.md +12 -162
- package/front_end/third_party/lit-html/package/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/async-directive.js +2 -7
- package/front_end/third_party/lit-html/package/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts +23 -54
- package/front_end/third_party/lit-html/package/development/async-directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/async-directive.js +44 -194
- package/front_end/third_party/lit-html/package/development/async-directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/development/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive-helpers.js +25 -9
- package/front_end/third_party/lit-html/package/development/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/development/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directive.js +6 -1
- package/front_end/third_party/lit-html/package/development/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/development/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-append.js +17 -58
- package/front_end/third_party/lit-html/package/development/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/development/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js +57 -37
- package/front_end/third_party/lit-html/package/development/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/development/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/cache.js +4 -6
- package/front_end/third_party/lit-html/package/development/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/development/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/class-map.js +17 -7
- package/front_end/third_party/lit-html/package/development/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/guard.js +3 -2
- package/front_end/third_party/lit-html/package/development/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/development/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/live.js +5 -7
- package/front_end/third_party/lit-html/package/development/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js +85 -0
- package/front_end/third_party/lit-html/package/development/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/ref.js +13 -11
- package/front_end/third_party/lit-html/package/development/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/development/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/repeat.js +23 -9
- package/front_end/third_party/lit-html/package/development/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/style-map.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/development/directives/template-content.js +1 -2
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js +7 -5
- package/front_end/third_party/lit-html/package/development/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js +3 -0
- package/front_end/third_party/lit-html/package/development/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/development/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/directives/until.js +63 -23
- package/front_end/third_party/lit-html/package/development/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js +9 -8
- package/front_end/third_party/lit-html/package/development/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/development/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/lit-html.js +249 -76
- package/front_end/third_party/lit-html/package/development/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/development/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/polyfill-support.js +40 -21
- package/front_end/third_party/lit-html/package/development/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/development/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js +11 -3
- package/front_end/third_party/lit-html/package/development/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/development/static.js +6 -5
- package/front_end/third_party/lit-html/package/development/static.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts +6 -5
- package/front_end/third_party/lit-html/package/directive-helpers.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive-helpers.js +2 -2
- package/front_end/third_party/lit-html/package/directive-helpers.js.map +1 -1
- package/front_end/third_party/lit-html/package/directive.d.ts +3 -16
- package/front_end/third_party/lit-html/package/directive.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directive.js +1 -1
- package/front_end/third_party/lit-html/package/directive.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts +7 -14
- package/front_end/third_party/lit-html/package/directives/async-append.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-append.js +2 -6
- package/front_end/third_party/lit-html/package/directives/async-append.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts +9 -14
- package/front_end/third_party/lit-html/package/directives/async-replace.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/async-replace.js +2 -5
- package/front_end/third_party/lit-html/package/directives/async-replace.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.d.ts +2 -3
- package/front_end/third_party/lit-html/package/directives/cache.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/cache.js +2 -5
- package/front_end/third_party/lit-html/package/directives/cache.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts +2 -2
- package/front_end/third_party/lit-html/package/directives/class-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/class-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/class-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.d.ts +3 -2
- package/front_end/third_party/lit-html/package/directives/guard.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/guard.js +2 -4
- package/front_end/third_party/lit-html/package/directives/guard.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.d.ts +4 -3
- package/front_end/third_party/lit-html/package/directives/live.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/live.js +1 -4
- package/front_end/third_party/lit-html/package/directives/live.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts +58 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.d.ts.map +1 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js +7 -0
- package/front_end/third_party/lit-html/package/directives/private-async-helpers.js.map +1 -0
- package/front_end/third_party/lit-html/package/directives/ref.d.ts +14 -11
- package/front_end/third_party/lit-html/package/directives/ref.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/ref.js +2 -5
- package/front_end/third_party/lit-html/package/directives/ref.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts +8 -4
- package/front_end/third_party/lit-html/package/directives/repeat.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/repeat.js +2 -5
- package/front_end/third_party/lit-html/package/directives/repeat.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/style-map.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/style-map.js +2 -4
- package/front_end/third_party/lit-html/package/directives/style-map.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/template-content.d.ts +1 -2
- package/front_end/third_party/lit-html/package/directives/template-content.js +2 -4
- package/front_end/third_party/lit-html/package/directives/template-content.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts +6 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js +2 -4
- package/front_end/third_party/lit-html/package/directives/unsafe-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts +4 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/unsafe-svg.js.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.d.ts +12 -8
- package/front_end/third_party/lit-html/package/directives/until.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/directives/until.js +2 -6
- package/front_end/third_party/lit-html/package/directives/until.js.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/experimental-hydrate.js +2 -5
- package/front_end/third_party/lit-html/package/experimental-hydrate.js.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.d.ts +81 -136
- package/front_end/third_party/lit-html/package/lit-html.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js +1 -1
- package/front_end/third_party/lit-html/package/lit-html.js.map +1 -1
- package/front_end/third_party/lit-html/package/package.json +75 -24
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts +1 -41
- package/front_end/third_party/lit-html/package/polyfill-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js +1 -1
- package/front_end/third_party/lit-html/package/polyfill-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts +12 -10
- package/front_end/third_party/lit-html/package/private-ssr-support.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/private-ssr-support.js +2 -2
- package/front_end/third_party/lit-html/package/private-ssr-support.js.map +1 -1
- package/front_end/third_party/lit-html/package/static.d.ts.map +1 -1
- package/front_end/third_party/lit-html/package/static.js +1 -1
- package/front_end/third_party/lit-html/package/static.js.map +1 -1
- package/front_end/third_party/marked/README.chromium +2 -2
- package/front_end/third_party/marked/marked.ts +2 -2
- package/front_end/third_party/marked/package/README.md +7 -1
- package/front_end/third_party/marked/package/bin/marked.js +214 -0
- package/front_end/third_party/marked/package/lib/marked.cjs +2907 -0
- package/front_end/third_party/marked/package/lib/marked.esm.d.ts +1 -3
- package/front_end/third_party/marked/package/lib/marked.esm.js +627 -586
- package/front_end/third_party/marked/package/lib/marked.umd.js +2913 -0
- package/front_end/third_party/marked/package/man/marked.1 +5 -24
- package/front_end/third_party/marked/package/man/marked.1.txt +21 -31
- package/front_end/third_party/marked/package/marked.min.js +1 -1
- package/front_end/third_party/marked/package/package.json +41 -32
- package/front_end/third_party/marked/package/src/Lexer.js +109 -108
- package/front_end/third_party/marked/package/src/Parser.js +38 -15
- package/front_end/third_party/marked/package/src/Renderer.js +5 -5
- package/front_end/third_party/marked/package/src/Slugger.js +2 -2
- package/front_end/third_party/marked/package/src/TextRenderer.js +2 -2
- package/front_end/third_party/marked/package/src/Tokenizer.js +215 -190
- package/front_end/third_party/marked/package/src/defaults.js +6 -9
- package/front_end/third_party/marked/package/src/helpers.js +16 -27
- package/front_end/third_party/marked/package/src/marked.js +146 -63
- package/front_end/third_party/marked/package/src/rules.js +20 -45
- package/front_end/third_party/wasmparser/README.chromium +2 -2
- package/front_end/third_party/wasmparser/package/.github/workflows/main.yml +47 -0
- package/front_end/third_party/wasmparser/package/CHANGELOG.md +12 -0
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/cjs/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js +53 -53
- package/front_end/third_party/wasmparser/package/dist/esm/WasmParser.js.map +1 -1
- package/front_end/third_party/wasmparser/package/package.json +1 -1
- package/front_end/third_party/wasmparser/package/src/WasmParser.ts +53 -53
- package/front_end/ui/components/text_editor/TextEditor.ts +29 -0
- package/front_end/ui/components/text_editor/config.ts +4 -2
- package/front_end/ui/legacy/ViewManager.ts +6 -0
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +20 -0
- package/package.json +1 -1
|
@@ -1877,7 +1877,7 @@ export class BinaryReader {
|
|
|
1877
1877
|
shift += 7;
|
|
1878
1878
|
if ((byte & 0x80) === 0) break;
|
|
1879
1879
|
}
|
|
1880
|
-
return result;
|
|
1880
|
+
return result >>> 0;
|
|
1881
1881
|
}
|
|
1882
1882
|
private readVarInt64(): Int64 {
|
|
1883
1883
|
var result = new Uint8Array(8);
|
|
@@ -1951,7 +1951,7 @@ export class BinaryReader {
|
|
|
1951
1951
|
return new Type(TypeKind.unspecified, func_index);
|
|
1952
1952
|
}
|
|
1953
1953
|
private readStringBytes(): Uint8Array {
|
|
1954
|
-
var length = this.readVarUint32()
|
|
1954
|
+
var length = this.readVarUint32();
|
|
1955
1955
|
return this.readBytes(length);
|
|
1956
1956
|
}
|
|
1957
1957
|
private readBytes(length: number): Uint8Array {
|
|
@@ -1965,7 +1965,7 @@ export class BinaryReader {
|
|
|
1965
1965
|
private hasStringBytes(): boolean {
|
|
1966
1966
|
if (!this.hasVarIntBytes()) return false;
|
|
1967
1967
|
var pos = this._pos;
|
|
1968
|
-
var length = this.readVarUint32()
|
|
1968
|
+
var length = this.readVarUint32();
|
|
1969
1969
|
var result = this.hasBytes(length);
|
|
1970
1970
|
this._pos = pos;
|
|
1971
1971
|
return result;
|
|
@@ -1974,7 +1974,7 @@ export class BinaryReader {
|
|
|
1974
1974
|
return this.hasBytes(this._sectionRange.end - this._pos);
|
|
1975
1975
|
}
|
|
1976
1976
|
private readFuncType(): ITypeEntry {
|
|
1977
|
-
var paramCount = this.readVarUint32()
|
|
1977
|
+
var paramCount = this.readVarUint32();
|
|
1978
1978
|
var paramTypes = new Array(paramCount);
|
|
1979
1979
|
for (var i = 0; i < paramCount; i++) paramTypes[i] = this.readType();
|
|
1980
1980
|
var returnCount = this.readVarUint1();
|
|
@@ -1993,7 +1993,7 @@ export class BinaryReader {
|
|
|
1993
1993
|
return result;
|
|
1994
1994
|
}
|
|
1995
1995
|
private readStructType(): ITypeEntry {
|
|
1996
|
-
var fieldCount = this.readVarUint32()
|
|
1996
|
+
var fieldCount = this.readVarUint32();
|
|
1997
1997
|
var fieldTypes = new Array(fieldCount);
|
|
1998
1998
|
var fieldMutabilities = new Array(fieldCount);
|
|
1999
1999
|
for (var i = 0; i < fieldCount; i++) {
|
|
@@ -2028,21 +2028,21 @@ export class BinaryReader {
|
|
|
2028
2028
|
return result;
|
|
2029
2029
|
}
|
|
2030
2030
|
private readResizableLimits(maxPresent: boolean): IResizableLimits {
|
|
2031
|
-
var initial = this.readVarUint32()
|
|
2031
|
+
var initial = this.readVarUint32();
|
|
2032
2032
|
var maximum;
|
|
2033
2033
|
if (maxPresent) {
|
|
2034
|
-
maximum = this.readVarUint32()
|
|
2034
|
+
maximum = this.readVarUint32();
|
|
2035
2035
|
}
|
|
2036
2036
|
return { initial: initial, maximum: maximum };
|
|
2037
2037
|
}
|
|
2038
2038
|
private readTableType(): ITableType {
|
|
2039
2039
|
var elementType = this.readType();
|
|
2040
|
-
var flags = this.readVarUint32()
|
|
2040
|
+
var flags = this.readVarUint32();
|
|
2041
2041
|
var limits = this.readResizableLimits(!!(flags & 0x01));
|
|
2042
2042
|
return { elementType: elementType, limits: limits };
|
|
2043
2043
|
}
|
|
2044
2044
|
private readMemoryType(): IMemoryType {
|
|
2045
|
-
var flags = this.readVarUint32()
|
|
2045
|
+
var flags = this.readVarUint32();
|
|
2046
2046
|
var shared = !!(flags & 0x02);
|
|
2047
2047
|
return {
|
|
2048
2048
|
limits: this.readResizableLimits(!!(flags & 0x01)),
|
|
@@ -2063,8 +2063,8 @@ export class BinaryReader {
|
|
|
2063
2063
|
return { contentType: contentType, mutability: mutability };
|
|
2064
2064
|
}
|
|
2065
2065
|
private readEventType(): IEventType {
|
|
2066
|
-
var attribute = this.readVarUint32()
|
|
2067
|
-
var typeIndex = this.readVarUint32()
|
|
2066
|
+
var attribute = this.readVarUint32();
|
|
2067
|
+
var typeIndex = this.readVarUint32();
|
|
2068
2068
|
return {
|
|
2069
2069
|
attribute: attribute,
|
|
2070
2070
|
typeIndex: typeIndex,
|
|
@@ -2115,7 +2115,7 @@ export class BinaryReader {
|
|
|
2115
2115
|
var type: ITableType | IMemoryType | IGlobalType | IEventType;
|
|
2116
2116
|
switch (kind) {
|
|
2117
2117
|
case ExternalKind.Function:
|
|
2118
|
-
funcTypeIndex = this.readVarUint32()
|
|
2118
|
+
funcTypeIndex = this.readVarUint32();
|
|
2119
2119
|
break;
|
|
2120
2120
|
case ExternalKind.Table:
|
|
2121
2121
|
type = this.readTableType();
|
|
@@ -2147,7 +2147,7 @@ export class BinaryReader {
|
|
|
2147
2147
|
}
|
|
2148
2148
|
var field = this.readStringBytes();
|
|
2149
2149
|
var kind = this.readUint8();
|
|
2150
|
-
var index = this.readVarUint32()
|
|
2150
|
+
var index = this.readVarUint32();
|
|
2151
2151
|
this.state = BinaryReaderState.EXPORT_SECTION_ENTRY;
|
|
2152
2152
|
this.result = { field: field, kind: kind, index: index };
|
|
2153
2153
|
this._sectionEntriesLeft--;
|
|
@@ -2158,7 +2158,7 @@ export class BinaryReader {
|
|
|
2158
2158
|
this.skipSection();
|
|
2159
2159
|
return this.read();
|
|
2160
2160
|
}
|
|
2161
|
-
var typeIndex = this.readVarUint32()
|
|
2161
|
+
var typeIndex = this.readVarUint32();
|
|
2162
2162
|
this.state = BinaryReaderState.FUNCTION_SECTION_ENTRY;
|
|
2163
2163
|
this.result = { typeIndex: typeIndex };
|
|
2164
2164
|
this._sectionEntriesLeft--;
|
|
@@ -2345,8 +2345,8 @@ export class BinaryReader {
|
|
|
2345
2345
|
return true;
|
|
2346
2346
|
}
|
|
2347
2347
|
private readMemoryImmediate(): IMemoryAddress {
|
|
2348
|
-
var flags = this.readVarUint32()
|
|
2349
|
-
var offset = this.readVarUint32()
|
|
2348
|
+
var flags = this.readVarUint32();
|
|
2349
|
+
var offset = this.readVarUint32();
|
|
2350
2350
|
return { flags: flags, offset: offset };
|
|
2351
2351
|
}
|
|
2352
2352
|
private readNameMap(): INaming[] {
|
|
@@ -2473,7 +2473,7 @@ export class BinaryReader {
|
|
|
2473
2473
|
}
|
|
2474
2474
|
if (!this.hasVarIntBytes()) return false;
|
|
2475
2475
|
var pos = this._pos;
|
|
2476
|
-
var type: LinkingType = this.readVarUint32()
|
|
2476
|
+
var type: LinkingType = this.readVarUint32();
|
|
2477
2477
|
var index;
|
|
2478
2478
|
switch (type) {
|
|
2479
2479
|
case LinkingType.StackPointer:
|
|
@@ -2570,11 +2570,11 @@ export class BinaryReader {
|
|
|
2570
2570
|
case OperatorCode.br_on_non_data:
|
|
2571
2571
|
case OperatorCode.br_on_i31:
|
|
2572
2572
|
case OperatorCode.br_on_non_i31:
|
|
2573
|
-
brDepth = this.readVarUint32()
|
|
2573
|
+
brDepth = this.readVarUint32();
|
|
2574
2574
|
break;
|
|
2575
2575
|
case OperatorCode.br_on_cast_static:
|
|
2576
2576
|
case OperatorCode.br_on_cast_static_fail:
|
|
2577
|
-
brDepth = this.readVarUint32()
|
|
2577
|
+
brDepth = this.readVarUint32();
|
|
2578
2578
|
refType = this.readHeapType();
|
|
2579
2579
|
break;
|
|
2580
2580
|
case OperatorCode.array_get:
|
|
@@ -2613,7 +2613,7 @@ export class BinaryReader {
|
|
|
2613
2613
|
refType = this.readHeapType();
|
|
2614
2614
|
// This really is the "length" value. Overload "brDepth" to keep the
|
|
2615
2615
|
// IOperatorInformation interface a little leaner.
|
|
2616
|
-
brDepth = this.readVarUint32()
|
|
2616
|
+
brDepth = this.readVarUint32();
|
|
2617
2617
|
break;
|
|
2618
2618
|
case OperatorCode.ref_is_func:
|
|
2619
2619
|
case OperatorCode.ref_is_data:
|
|
@@ -2682,25 +2682,25 @@ export class BinaryReader {
|
|
|
2682
2682
|
reserved = this.readVarUint1();
|
|
2683
2683
|
break;
|
|
2684
2684
|
case OperatorCode.table_init:
|
|
2685
|
-
segmentIndex = this.readVarUint32()
|
|
2686
|
-
tableIndex = this.readVarUint32()
|
|
2685
|
+
segmentIndex = this.readVarUint32();
|
|
2686
|
+
tableIndex = this.readVarUint32();
|
|
2687
2687
|
break;
|
|
2688
2688
|
case OperatorCode.table_copy:
|
|
2689
|
-
tableIndex = this.readVarUint32()
|
|
2690
|
-
destinationIndex = this.readVarUint32()
|
|
2689
|
+
tableIndex = this.readVarUint32();
|
|
2690
|
+
destinationIndex = this.readVarUint32();
|
|
2691
2691
|
break;
|
|
2692
2692
|
case OperatorCode.table_grow:
|
|
2693
2693
|
case OperatorCode.table_size:
|
|
2694
2694
|
case OperatorCode.table_fill:
|
|
2695
|
-
tableIndex = this.readVarUint32()
|
|
2695
|
+
tableIndex = this.readVarUint32();
|
|
2696
2696
|
break;
|
|
2697
2697
|
case OperatorCode.memory_init:
|
|
2698
|
-
segmentIndex = this.readVarUint32()
|
|
2698
|
+
segmentIndex = this.readVarUint32();
|
|
2699
2699
|
reserved = this.readVarUint1();
|
|
2700
2700
|
break;
|
|
2701
2701
|
case OperatorCode.data_drop:
|
|
2702
2702
|
case OperatorCode.elem_drop:
|
|
2703
|
-
segmentIndex = this.readVarUint32()
|
|
2703
|
+
segmentIndex = this.readVarUint32();
|
|
2704
2704
|
break;
|
|
2705
2705
|
default:
|
|
2706
2706
|
this.error = new Error(
|
|
@@ -3218,10 +3218,10 @@ export class BinaryReader {
|
|
|
3218
3218
|
case OperatorCode.br_if:
|
|
3219
3219
|
case OperatorCode.br_on_null:
|
|
3220
3220
|
case OperatorCode.br_on_non_null:
|
|
3221
|
-
brDepth = this.readVarUint32()
|
|
3221
|
+
brDepth = this.readVarUint32();
|
|
3222
3222
|
break;
|
|
3223
3223
|
case OperatorCode.br_table:
|
|
3224
|
-
var tableCount = this.readVarUint32()
|
|
3224
|
+
var tableCount = this.readVarUint32();
|
|
3225
3225
|
if (!this.hasBytes(tableCount + 1)) {
|
|
3226
3226
|
// We need at least (tableCount + 1) bytes
|
|
3227
3227
|
this._pos = pos;
|
|
@@ -3234,12 +3234,12 @@ export class BinaryReader {
|
|
|
3234
3234
|
this._pos = pos;
|
|
3235
3235
|
return false;
|
|
3236
3236
|
}
|
|
3237
|
-
brTable.push(this.readVarUint32()
|
|
3237
|
+
brTable.push(this.readVarUint32());
|
|
3238
3238
|
}
|
|
3239
3239
|
break;
|
|
3240
3240
|
case OperatorCode.rethrow:
|
|
3241
3241
|
case OperatorCode.delegate:
|
|
3242
|
-
relativeDepth = this.readVarUint32()
|
|
3242
|
+
relativeDepth = this.readVarUint32();
|
|
3243
3243
|
break;
|
|
3244
3244
|
case OperatorCode.catch:
|
|
3245
3245
|
case OperatorCode.throw:
|
|
@@ -3251,25 +3251,25 @@ export class BinaryReader {
|
|
|
3251
3251
|
case OperatorCode.call:
|
|
3252
3252
|
case OperatorCode.return_call:
|
|
3253
3253
|
case OperatorCode.ref_func:
|
|
3254
|
-
funcIndex = this.readVarUint32()
|
|
3254
|
+
funcIndex = this.readVarUint32();
|
|
3255
3255
|
break;
|
|
3256
3256
|
case OperatorCode.call_indirect:
|
|
3257
3257
|
case OperatorCode.return_call_indirect:
|
|
3258
|
-
typeIndex = this.readVarUint32()
|
|
3258
|
+
typeIndex = this.readVarUint32();
|
|
3259
3259
|
reserved = this.readVarUint1();
|
|
3260
3260
|
break;
|
|
3261
3261
|
case OperatorCode.local_get:
|
|
3262
3262
|
case OperatorCode.local_set:
|
|
3263
3263
|
case OperatorCode.local_tee:
|
|
3264
|
-
localIndex = this.readVarUint32()
|
|
3264
|
+
localIndex = this.readVarUint32();
|
|
3265
3265
|
break;
|
|
3266
3266
|
case OperatorCode.global_get:
|
|
3267
3267
|
case OperatorCode.global_set:
|
|
3268
|
-
globalIndex = this.readVarUint32()
|
|
3268
|
+
globalIndex = this.readVarUint32();
|
|
3269
3269
|
break;
|
|
3270
3270
|
case OperatorCode.table_get:
|
|
3271
3271
|
case OperatorCode.table_set:
|
|
3272
|
-
tableIndex = this.readVarUint32()
|
|
3272
|
+
tableIndex = this.readVarUint32();
|
|
3273
3273
|
break;
|
|
3274
3274
|
case OperatorCode.i32_load:
|
|
3275
3275
|
case OperatorCode.i64_load:
|
|
@@ -3532,20 +3532,20 @@ export class BinaryReader {
|
|
|
3532
3532
|
}
|
|
3533
3533
|
if (!this.hasVarIntBytes()) return false;
|
|
3534
3534
|
var pos = this._pos;
|
|
3535
|
-
var size = this.readVarUint32()
|
|
3535
|
+
var size = this.readVarUint32();
|
|
3536
3536
|
var bodyEnd = this._pos + size;
|
|
3537
3537
|
if (!this.hasVarIntBytes()) {
|
|
3538
3538
|
this._pos = pos;
|
|
3539
3539
|
return false;
|
|
3540
3540
|
}
|
|
3541
|
-
var localCount = this.readVarUint32()
|
|
3541
|
+
var localCount = this.readVarUint32();
|
|
3542
3542
|
var locals: Array<ILocals> = [];
|
|
3543
3543
|
for (var i = 0; i < localCount; i++) {
|
|
3544
3544
|
if (!this.hasVarIntBytes()) {
|
|
3545
3545
|
this._pos = pos;
|
|
3546
3546
|
return false;
|
|
3547
3547
|
}
|
|
3548
|
-
var count = this.readVarUint32()
|
|
3548
|
+
var count = this.readVarUint32();
|
|
3549
3549
|
if (!this.hasVarIntBytes()) {
|
|
3550
3550
|
this._pos = pos;
|
|
3551
3551
|
return false;
|
|
@@ -3588,7 +3588,7 @@ export class BinaryReader {
|
|
|
3588
3588
|
this._pos = sectionStart;
|
|
3589
3589
|
return false;
|
|
3590
3590
|
}
|
|
3591
|
-
var payloadLength = this.readVarUint32()
|
|
3591
|
+
var payloadLength = this.readVarUint32();
|
|
3592
3592
|
var name = null;
|
|
3593
3593
|
var payloadEnd = this._pos + payloadLength;
|
|
3594
3594
|
if (id == 0) {
|
|
@@ -3625,31 +3625,31 @@ export class BinaryReader {
|
|
|
3625
3625
|
switch (currentSection.id) {
|
|
3626
3626
|
case SectionCode.Type:
|
|
3627
3627
|
if (!this.hasSectionPayload()) return false;
|
|
3628
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3628
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3629
3629
|
return this.readTypeEntry();
|
|
3630
3630
|
case SectionCode.Import:
|
|
3631
3631
|
if (!this.hasSectionPayload()) return false;
|
|
3632
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3632
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3633
3633
|
return this.readImportEntry();
|
|
3634
3634
|
case SectionCode.Export:
|
|
3635
3635
|
if (!this.hasSectionPayload()) return false;
|
|
3636
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3636
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3637
3637
|
return this.readExportEntry();
|
|
3638
3638
|
case SectionCode.Function:
|
|
3639
3639
|
if (!this.hasSectionPayload()) return false;
|
|
3640
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3640
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3641
3641
|
return this.readFunctionEntry();
|
|
3642
3642
|
case SectionCode.Table:
|
|
3643
3643
|
if (!this.hasSectionPayload()) return false;
|
|
3644
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3644
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3645
3645
|
return this.readTableEntry();
|
|
3646
3646
|
case SectionCode.Memory:
|
|
3647
3647
|
if (!this.hasSectionPayload()) return false;
|
|
3648
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3648
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3649
3649
|
return this.readMemoryEntry();
|
|
3650
3650
|
case SectionCode.Global:
|
|
3651
3651
|
if (!this.hasVarIntBytes()) return false;
|
|
3652
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3652
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3653
3653
|
return this.readGlobalEntry();
|
|
3654
3654
|
case SectionCode.Start:
|
|
3655
3655
|
if (!this.hasVarIntBytes()) return false;
|
|
@@ -3658,20 +3658,20 @@ export class BinaryReader {
|
|
|
3658
3658
|
return true;
|
|
3659
3659
|
case SectionCode.Code:
|
|
3660
3660
|
if (!this.hasVarIntBytes()) return false;
|
|
3661
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3661
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3662
3662
|
this.state = BinaryReaderState.READING_FUNCTION_HEADER;
|
|
3663
3663
|
return this.readFunctionBody();
|
|
3664
3664
|
case SectionCode.Element:
|
|
3665
3665
|
if (!this.hasVarIntBytes()) return false;
|
|
3666
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3666
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3667
3667
|
return this.readElementEntry();
|
|
3668
3668
|
case SectionCode.Data:
|
|
3669
3669
|
if (!this.hasVarIntBytes()) return false;
|
|
3670
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3670
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3671
3671
|
return this.readDataEntry();
|
|
3672
3672
|
case SectionCode.Event:
|
|
3673
3673
|
if (!this.hasVarIntBytes()) return false;
|
|
3674
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3674
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3675
3675
|
return this.readEventEntry();
|
|
3676
3676
|
case SectionCode.Custom:
|
|
3677
3677
|
var customSectionName = bytesToString(currentSection.name);
|
|
@@ -3683,7 +3683,7 @@ export class BinaryReader {
|
|
|
3683
3683
|
}
|
|
3684
3684
|
if (customSectionName === "linking") {
|
|
3685
3685
|
if (!this.hasVarIntBytes()) return false;
|
|
3686
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3686
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3687
3687
|
return this.readLinkingEntry();
|
|
3688
3688
|
}
|
|
3689
3689
|
if (customSectionName === "sourceMappingURL") {
|
|
@@ -3827,7 +3827,7 @@ export class BinaryReader {
|
|
|
3827
3827
|
return this.readNameEntry();
|
|
3828
3828
|
case BinaryReaderState.RELOC_SECTION_HEADER:
|
|
3829
3829
|
if (!this.hasVarIntBytes()) return false;
|
|
3830
|
-
this._sectionEntriesLeft = this.readVarUint32()
|
|
3830
|
+
this._sectionEntriesLeft = this.readVarUint32();
|
|
3831
3831
|
return this.readRelocEntry();
|
|
3832
3832
|
case BinaryReaderState.LINKING_SECTION_ENTRY:
|
|
3833
3833
|
return this.readLinkingEntry();
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
|
6
|
+
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
|
6
7
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
7
8
|
import * as LitHtml from '../../lit-html/lit-html.js';
|
|
8
9
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
@@ -25,6 +26,18 @@ export class TextEditor extends HTMLElement {
|
|
|
25
26
|
private dynamicSettings: readonly DynamicSetting<unknown>[] = DynamicSetting.none;
|
|
26
27
|
private activeSettingListeners: [Common.Settings.Setting<unknown>, (event: {data: unknown}) => void][] = [];
|
|
27
28
|
private pendingState: CodeMirror.EditorState|undefined;
|
|
29
|
+
private lastScrollPos = {left: 0, top: 0};
|
|
30
|
+
private resizeTimeout = -1;
|
|
31
|
+
private devtoolsResizeObserver = new ResizeObserver(() => {
|
|
32
|
+
if (this.resizeTimeout < 0) {
|
|
33
|
+
this.resizeTimeout = window.setTimeout(() => {
|
|
34
|
+
this.resizeTimeout = -1;
|
|
35
|
+
if (this.activeEditor) {
|
|
36
|
+
CodeMirror.repositionTooltips(this.activeEditor);
|
|
37
|
+
}
|
|
38
|
+
}, 50);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
28
41
|
|
|
29
42
|
constructor(pendingState?: CodeMirror.EditorState) {
|
|
30
43
|
super();
|
|
@@ -44,7 +57,14 @@ export class TextEditor extends HTMLElement {
|
|
|
44
57
|
}
|
|
45
58
|
},
|
|
46
59
|
});
|
|
60
|
+
this.activeEditor.scrollDOM.scrollTop = this.lastScrollPos.top;
|
|
61
|
+
this.activeEditor.scrollDOM.scrollLeft = this.lastScrollPos.left;
|
|
62
|
+
this.activeEditor.scrollDOM.addEventListener('scroll', (event): void => {
|
|
63
|
+
this.lastScrollPos.left = (event.target as HTMLElement).scrollLeft;
|
|
64
|
+
this.lastScrollPos.top = (event.target as HTMLElement).scrollTop;
|
|
65
|
+
});
|
|
47
66
|
this.ensureSettingListeners();
|
|
67
|
+
this.startObservingResize();
|
|
48
68
|
return this.activeEditor;
|
|
49
69
|
}
|
|
50
70
|
|
|
@@ -83,6 +103,7 @@ export class TextEditor extends HTMLElement {
|
|
|
83
103
|
disconnectedCallback(): void {
|
|
84
104
|
if (this.activeEditor) {
|
|
85
105
|
this.pendingState = this.activeEditor.state;
|
|
106
|
+
this.devtoolsResizeObserver.disconnect();
|
|
86
107
|
this.activeEditor.destroy();
|
|
87
108
|
this.activeEditor = undefined;
|
|
88
109
|
this.ensureSettingListeners();
|
|
@@ -121,6 +142,14 @@ export class TextEditor extends HTMLElement {
|
|
|
121
142
|
}
|
|
122
143
|
}
|
|
123
144
|
|
|
145
|
+
private startObservingResize(): void {
|
|
146
|
+
const devtoolsElement =
|
|
147
|
+
WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();
|
|
148
|
+
if (devtoolsElement) {
|
|
149
|
+
this.devtoolsResizeObserver.observe(devtoolsElement);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
124
153
|
revealPosition(selection: CodeMirror.EditorSelection, highlight: boolean = true): void {
|
|
125
154
|
const view = this.activeEditor;
|
|
126
155
|
if (!view) {
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
|
6
6
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
7
|
+
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
|
7
8
|
import * as CM from '../../../third_party/codemirror.next/codemirror.next.js';
|
|
8
9
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
|
9
10
|
|
|
@@ -207,9 +208,10 @@ let sideBarElement: HTMLElement|null = null;
|
|
|
207
208
|
|
|
208
209
|
function getTooltipSpace(): DOMRect {
|
|
209
210
|
if (!sideBarElement) {
|
|
210
|
-
sideBarElement =
|
|
211
|
+
sideBarElement =
|
|
212
|
+
WindowBoundsService.WindowBoundsService.WindowBoundsServiceImpl.instance().getDevToolsBoundingElement();
|
|
211
213
|
}
|
|
212
|
-
return
|
|
214
|
+
return sideBarElement.getBoundingClientRect();
|
|
213
215
|
}
|
|
214
216
|
|
|
215
217
|
export function baseConfiguration(text: string): CM.Extension {
|
|
@@ -828,6 +828,12 @@ export class _TabbedLocation extends Location implements TabbedViewLocation {
|
|
|
828
828
|
this.tabOrderSetting.set(tabOrders);
|
|
829
829
|
}
|
|
830
830
|
|
|
831
|
+
// TODO(crbug.com/1172300) Ignored during the jsdoc to ts migration
|
|
832
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
833
|
+
getCloseableTabSetting(): Common.Settings.Setting<any> {
|
|
834
|
+
return this.closeableTabSetting.get();
|
|
835
|
+
}
|
|
836
|
+
|
|
831
837
|
static orderStep = 10; // Keep in sync with descriptors.
|
|
832
838
|
}
|
|
833
839
|
|
|
@@ -103,6 +103,10 @@ const UIStrings = {
|
|
|
103
103
|
* @example {9001628746521180} seconds
|
|
104
104
|
*/
|
|
105
105
|
timeAfterTooltip: 'The expiration timestamp is {seconds}, which corresponds to a date after {date}',
|
|
106
|
+
/**
|
|
107
|
+
* @description Text to be show in the Partition Key column in case it is an opaque origin.
|
|
108
|
+
*/
|
|
109
|
+
opaquePartitionKey: '(opaque)',
|
|
106
110
|
};
|
|
107
111
|
const str_ = i18n.i18n.registerUIStrings('ui/legacy/components/cookie_table/CookiesTable.ts', UIStrings);
|
|
108
112
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
@@ -215,6 +219,13 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
215
219
|
dataType: DataGrid.DataGrid.DataType.Boolean,
|
|
216
220
|
editable: editable,
|
|
217
221
|
},
|
|
222
|
+
{
|
|
223
|
+
id: SDK.Cookie.Attributes.PartitionKey,
|
|
224
|
+
title: 'Partition Key',
|
|
225
|
+
sortable: true,
|
|
226
|
+
weight: 7,
|
|
227
|
+
editable: editable,
|
|
228
|
+
},
|
|
218
229
|
{
|
|
219
230
|
id: SDK.Cookie.Attributes.Priority,
|
|
220
231
|
title: 'Priority',
|
|
@@ -462,6 +473,8 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
462
473
|
return String(cookie.sameSite());
|
|
463
474
|
case SDK.Cookie.Attributes.SameParty:
|
|
464
475
|
return String(cookie.sameParty());
|
|
476
|
+
case SDK.Cookie.Attributes.PartitionKey:
|
|
477
|
+
return cookie.partitionKeyOpaque() ? i18nString(UIStrings.opaquePartitionKey) : String(cookie.partitionKey());
|
|
465
478
|
case SDK.Cookie.Attributes.SourceScheme:
|
|
466
479
|
return String(cookie.sourceScheme());
|
|
467
480
|
default:
|
|
@@ -570,6 +583,7 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
570
583
|
data[SDK.Cookie.Attributes.SourcePort] = cookie.sourcePort();
|
|
571
584
|
data[SDK.Cookie.Attributes.SourceScheme] = cookie.sourceScheme();
|
|
572
585
|
data[SDK.Cookie.Attributes.Priority] = cookie.priority() || '';
|
|
586
|
+
data[SDK.Cookie.Attributes.PartitionKey] = cookie.partitionKey() || '';
|
|
573
587
|
|
|
574
588
|
const blockedReasons = this.cookieToBlockedReasons?.get(cookie);
|
|
575
589
|
const node = new DataGridNode(data, cookie, blockedReasons || null);
|
|
@@ -613,6 +627,9 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
613
627
|
if (node.data[SDK.Cookie.Attributes.Expires] === null) {
|
|
614
628
|
node.data[SDK.Cookie.Attributes.Expires] = expiresSessionValue();
|
|
615
629
|
}
|
|
630
|
+
if (node.data[SDK.Cookie.Attributes.PartitionKey] === null) {
|
|
631
|
+
node.data[SDK.Cookie.Attributes.PartitionKey] = '';
|
|
632
|
+
}
|
|
616
633
|
}
|
|
617
634
|
|
|
618
635
|
private saveNode(node: DataGridNode): void {
|
|
@@ -660,6 +677,9 @@ export class CookiesTable extends UI.Widget.VBox {
|
|
|
660
677
|
cookie.addAttribute(
|
|
661
678
|
SDK.Cookie.Attributes.SourcePort, Number.parseInt(data[SDK.Cookie.Attributes.SourcePort], 10) || undefined);
|
|
662
679
|
}
|
|
680
|
+
if (SDK.Cookie.Attributes.PartitionKey in data) {
|
|
681
|
+
cookie.addAttribute(SDK.Cookie.Attributes.PartitionKey, data[SDK.Cookie.Attributes.PartitionKey]);
|
|
682
|
+
}
|
|
663
683
|
cookie.setSize(data[SDK.Cookie.Attributes.Name].length + data[SDK.Cookie.Attributes.Value].length);
|
|
664
684
|
return cookie;
|
|
665
685
|
}
|
package/package.json
CHANGED