chrome-devtools-frontend 1.0.961907 → 1.0.964440

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 (61) hide show
  1. package/.eslintignore +5 -4
  2. package/AUTHORS +1 -0
  3. package/config/gni/devtools_grd_files.gni +1 -1
  4. package/docs/resource_management.md +119 -0
  5. package/docs/workflows.md +7 -0
  6. package/front_end/core/common/ParsedURL.ts +12 -10
  7. package/front_end/core/host/UserMetrics.ts +2 -1
  8. package/front_end/core/i18n/locales/en-US.json +2 -2
  9. package/front_end/core/i18n/locales/en-XL.json +2 -2
  10. package/front_end/core/protocol_client/InspectorBackend.ts +7 -7
  11. package/front_end/core/root/Runtime.ts +2 -0
  12. package/front_end/core/sdk/CSSProperty.ts +22 -110
  13. package/front_end/core/sdk/DOMModel.ts +2 -2
  14. package/front_end/core/sdk/DebuggerModel.ts +1 -1
  15. package/front_end/entrypoints/main/MainImpl.ts +7 -2
  16. package/front_end/generated/InspectorBackendCommands.js +8 -4
  17. package/front_end/generated/protocol-mapping.d.ts +12 -1
  18. package/front_end/generated/protocol-proxy-api.d.ts +11 -1
  19. package/front_end/generated/protocol-tsconfig.json +2 -2
  20. package/front_end/generated/protocol.ts +16787 -0
  21. package/front_end/models/javascript_metadata/NativeFunctions.js +7480 -4147
  22. package/front_end/models/persistence/IsolatedFileSystem.ts +3 -2
  23. package/front_end/models/persistence/PersistenceActions.ts +2 -2
  24. package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
  25. package/front_end/models/text_utils/text_utils.ts +0 -2
  26. package/front_end/models/workspace/UISourceCode.ts +4 -5
  27. package/front_end/panels/animation/AnimationUI.ts +2 -1
  28. package/front_end/panels/application/AppManifestView.ts +7 -1
  29. package/front_end/panels/application/components/BackForwardCacheStrings.ts +1 -1
  30. package/front_end/panels/application/components/FrameDetailsView.ts +1 -0
  31. package/front_end/panels/elements/StylePropertyTreeElement.ts +13 -0
  32. package/front_end/panels/elements/StylesSidebarPane.ts +73 -4
  33. package/front_end/panels/elements/stylesSectionTree.css +28 -0
  34. package/front_end/panels/media/PlayerListView.ts +2 -0
  35. package/front_end/panels/media/playerListView.css +3 -0
  36. package/front_end/panels/sensors/sensors-meta.ts +2 -2
  37. package/front_end/panels/sources/NavigatorView.ts +1 -1
  38. package/front_end/ui/components/diff_view/DiffView.ts +2 -2
  39. package/front_end/ui/components/docs/icon_button/basic.ts +1 -1
  40. package/front_end/ui/components/icon_button/IconButton.ts +1 -1
  41. package/front_end/ui/legacy/GlassPane.ts +2 -0
  42. package/front_end/ui/legacy/components/inline_editor/cssLength.css +1 -0
  43. package/front_end/ui/legacy/softDropDownButton.css +2 -0
  44. package/front_end/ui/legacy/themeColors.css +3 -1
  45. package/front_end/ui/legacy/toolbar.css +6 -0
  46. package/package.json +1 -1
  47. package/scripts/build/devtools_plugin.js +103 -0
  48. package/scripts/build/ninja/{rollup.gni → bundle.gni} +2 -2
  49. package/scripts/build/ninja/devtools_entrypoint.gni +32 -24
  50. package/scripts/build/rollup.config.js +3 -93
  51. package/scripts/devtools_paths.js +3 -2
  52. package/scripts/devtools_paths.py +4 -0
  53. package/scripts/javascript_natives/helpers.js +211 -0
  54. package/scripts/javascript_natives/index.js +57 -194
  55. package/scripts/javascript_natives/package.json +8 -3
  56. package/scripts/javascript_natives/test.d.ts +9 -0
  57. package/scripts/javascript_natives/tests.js +195 -0
  58. package/scripts/protocol_typescript/protocol_dts_generator.ts +4 -9
  59. package/scripts/whitespaces.txt +1 -0
  60. package/front_end/generated/protocol.d.ts +0 -16771
  61. package/front_end/models/text_utils/CodeMirrorUtils.ts +0 -77
@@ -1,77 +0,0 @@
1
- /*
2
- * Copyright (C) 2013 Google Inc. All rights reserved.
3
- *
4
- * Redistribution and use in source and binary forms, with or without
5
- * modification, are permitted provided that the following conditions are
6
- * met:
7
- *
8
- * * Redistributions of source code must retain the above copyright
9
- * notice, this list of conditions and the following disclaimer.
10
- * * Redistributions in binary form must reproduce the above
11
- * copyright notice, this list of conditions and the following disclaimer
12
- * in the documentation and/or other materials provided with the
13
- * distribution.
14
- * * Neither the name of Google Inc. nor the names of its
15
- * contributors may be used to endorse or promote products derived from
16
- * this software without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
- */
30
-
31
- /* eslint-disable @typescript-eslint/no-explicit-any */
32
-
33
- import type * as CodeMirrorModule from '../../third_party/codemirror/codemirror-legacy.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
34
- import '../../third_party/codemirror/package/addon/runmode/runmode-standalone.js';
35
- import '../../third_party/codemirror/package/mode/css/css.js';
36
-
37
- import type * as TextUtils from './TextUtils.js';
38
-
39
- let tokenizerFactoryInstance: TokenizerFactory;
40
-
41
- export type Tokenizer =
42
- (line: string, callback: (value: string, style: string|null, start: number, end: number) => void) => void;
43
-
44
- export class TokenizerFactory implements TextUtils.TokenizerFactory {
45
- static instance(opts: {forceNew: boolean|null} = {forceNew: null}): TokenizerFactory {
46
- const {forceNew} = opts;
47
- if (!tokenizerFactoryInstance || forceNew) {
48
- tokenizerFactoryInstance = new TokenizerFactory();
49
- }
50
-
51
- return tokenizerFactoryInstance;
52
- }
53
-
54
- // https://crbug.com/1151919 * = CodeMirror.Mode
55
- getMode(mimeType: string): any {
56
- return CodeMirror.getMode({indentUnit: 2}, mimeType);
57
- }
58
-
59
- // https://crbug.com/1151919 * = CodeMirror.Mode
60
- createTokenizer(mimeType: string): Tokenizer {
61
- const cmMode = CodeMirror.getMode({indentUnit: 2}, mimeType);
62
- const state = CodeMirror.startState(cmMode);
63
-
64
- function tokenize(
65
- line: string, callback: (value: string, style: string|null, start: number, end: number) => void): void {
66
- const stream = new CodeMirror.StringStream(line);
67
- while (!stream.eol()) {
68
- const style =
69
- (cmMode.token as (stream: CodeMirror.StringStream, state: unknown) => string | null)(stream, state);
70
- const value = stream.current();
71
- callback(value, style, stream.start, stream.start + value.length);
72
- stream.start = stream.pos;
73
- }
74
- }
75
- return tokenize;
76
- }
77
- }