chrome-devtools-frontend 1.0.1729750 → 1.0.1730971
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/AUTHORS +2 -0
- package/README.md +48 -26
- package/config/typescript/tsconfig.base.json +1 -0
- package/config/typescript/tsconfig.eslint.json +1 -0
- package/eslint.config.mjs +1 -90
- package/front_end/core/common/Color.ts +7 -7
- package/front_end/core/common/ParsedURL.ts +3 -3
- package/front_end/core/common/ResolverBase.ts +3 -3
- package/front_end/core/common/SegmentedRange.ts +3 -3
- package/front_end/core/common/SimpleHistoryManager.ts +14 -14
- package/front_end/core/common/Trie.ts +3 -3
- package/front_end/core/common/VersionController.ts +7 -7
- package/front_end/core/host/InspectorFrontendHost.ts +2 -2
- package/front_end/core/platform/StringUtilities.ts +9 -0
- package/front_end/core/protocol_client/DevToolsCDPConnection.ts +4 -5
- package/front_end/core/sdk/AccessibilityModel.ts +5 -5
- package/front_end/core/sdk/AnimationModel.ts +17 -19
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -3
- package/front_end/core/sdk/CSSMatchedStyles.ts +32 -14
- package/front_end/core/sdk/CSSMetadata.ts +7 -7
- package/front_end/core/sdk/CSSModel.ts +33 -33
- package/front_end/core/sdk/CSSProperty.ts +5 -5
- package/front_end/core/sdk/CSSRule.ts +6 -6
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/Connections.ts +16 -16
- package/front_end/core/sdk/ConsoleModel.ts +44 -47
- package/front_end/core/sdk/CookieParser.ts +11 -11
- package/front_end/core/sdk/EmulationModel.ts +35 -36
- package/front_end/core/sdk/EventBreakpointsModel.ts +11 -11
- package/front_end/core/sdk/FrameManager.ts +16 -16
- package/front_end/core/sdk/IsolateManager.ts +2 -2
- package/front_end/core/sdk/IssuesModel.ts +2 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -19
- package/front_end/core/sdk/PageResourceLoader.ts +14 -16
- package/front_end/core/sdk/RemoteObject.ts +9 -9
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/RuntimeModel.ts +7 -7
- package/front_end/core/sdk/Script.ts +6 -6
- package/front_end/core/sdk/SourceMap.ts +18 -20
- package/front_end/core/sdk/SourceMapManager.ts +2 -2
- package/front_end/core/sdk/TargetManager.ts +2 -2
- package/front_end/generated/SupportedCSSProperties.ts +1 -3
- package/front_end/models/ai_assistance/AiAgent2.ts +10 -7
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +105 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +218 -27
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +1 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +22 -24
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +60 -60
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +24 -24
- package/front_end/models/bindings/DefaultScriptMapping.ts +8 -8
- package/front_end/models/bindings/FileUtils.ts +13 -13
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +3 -3
- package/front_end/models/bindings/ResourceScriptMapping.ts +23 -23
- package/front_end/models/cpu_profile/CPUProfileDataModel.ts +14 -14
- package/front_end/models/cpu_profile/ProfileTreeModel.ts +4 -4
- package/front_end/models/emulation/EmulatedDevices.ts +12 -12
- package/front_end/models/har/HARFormat.ts +4 -4
- package/front_end/models/lighthouse/LighthouseReporterTypes.ts +57 -3
- package/front_end/models/logs/LogManager.ts +2 -2
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +24 -24
- package/front_end/models/persistence/NetworkPersistenceManager.ts +8 -3
- package/front_end/models/trace/LanternComputationData.ts +19 -8
- package/front_end/models/trace/Processor.ts +2 -1
- package/front_end/panels/accessibility/ARIAAttributesView.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +2 -6
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +6 -3
- package/front_end/panels/animation/animationTimeline.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +1 -1
- package/front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts +24 -24
- package/front_end/panels/changes/ChangesSidebar.ts +3 -3
- package/front_end/panels/comments/CommentsPane.ts +270 -102
- package/front_end/panels/comments/commentsPane.css +81 -11
- package/front_end/panels/common/CommentThreadWidget.ts +11 -0
- package/front_end/panels/common/DOMLinkifier.ts +30 -5
- package/front_end/panels/common/ExtensionPanel.ts +13 -4
- package/front_end/panels/common/ExtensionServer.ts +18 -2
- package/front_end/panels/common/PersistenceUtils.ts +3 -3
- package/front_end/panels/console/ConsolePinPane.ts +5 -6
- package/front_end/panels/console/ConsoleViewMessage.ts +16 -0
- package/front_end/panels/coverage/CoverageView.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +8 -8
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +12 -13
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +2 -2
- package/front_end/panels/issues/AffectedElementsView.ts +49 -18
- package/front_end/panels/issues/CorsIssueDetailsView.ts +5 -5
- package/front_end/panels/issues/GenericIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +5 -6
- package/front_end/panels/issues/issuesTree.css +0 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +156 -49
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +615 -464
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +43 -0
- package/front_end/panels/network/NetworkItemView.ts +27 -26
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +236 -97
- package/front_end/panels/network/RequestPayloadView.ts +0 -14
- package/front_end/panels/network/RequestTimingView.ts +4 -4
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +5 -6
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +4 -3
- package/front_end/panels/network/networkManageCustomHeadersView.css +27 -6
- package/front_end/panels/network/requestConditionsDrawer.css +1 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +375 -197
- package/front_end/panels/settings/KeybindsSettingsTab.ts +570 -414
- package/front_end/panels/settings/SettingsScreen.ts +310 -110
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +924 -578
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +9 -2
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +39 -0
- package/front_end/panels/settings/frameworkIgnoreListSettingsTab.css +37 -8
- package/front_end/panels/sources/BreakpointsView.ts +23 -2
- package/front_end/panels/sources/GoToLineQuickOpen.ts +8 -8
- package/front_end/panels/sources/NavigatorView.ts +279 -263
- package/front_end/panels/sources/PersistenceActions.ts +11 -12
- package/front_end/panels/sources/ProfilePlugin.ts +3 -3
- package/front_end/panels/sources/SourcesNavigator.ts +9 -9
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -6
- package/front_end/panels/timeline/StatusDialog.ts +3 -3
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +6 -7
- package/front_end/panels/timeline/TimelineDetailsView.ts +25 -5
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +1 -1
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +9 -9
- package/front_end/panels/timeline/TimelineTreeView.ts +4 -5
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +6 -7
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -1
- package/front_end/panels/timeline/timelineStatusDialog.css +1 -1
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/tsconfig.compatibility.json +1 -0
- package/front_end/tsconfig.json +3 -2
- package/front_end/ui/components/input/textInput.css +1 -1
- package/front_end/ui/components/lists/List.ts +26 -14
- package/front_end/ui/components/switch/switch.css +6 -6
- package/front_end/ui/components/tree_outline/treeOutline.css +7 -7
- package/front_end/ui/legacy/ForwardedInputEventHandler.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/KeyboardShortcut.ts +7 -7
- package/front_end/ui/legacy/TabbedPane.ts +148 -73
- package/front_end/ui/legacy/View.ts +3 -1
- package/front_end/ui/legacy/ViewManager.ts +49 -37
- package/front_end/ui/legacy/Widget.ts +30 -9
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +8 -8
- package/front_end/ui/legacy/components/inline_editor/BezierUI.ts +8 -9
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +2 -2
- package/front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts +10 -12
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -1
- package/front_end/ui/legacy/components/source_frame/ImageView.ts +9 -4
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +12 -1
- package/front_end/ui/legacy/smallBubble.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +2 -0
- package/package.json +1 -1
- package/front_end/generated/ARIAProperties.ts +0 -2686
package/AUTHORS
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
# Please keep the list sorted.
|
|
12
12
|
|
|
13
13
|
# BEGIN individuals section.
|
|
14
|
+
Aarush Jain <aarushjain1907@gmail.com>
|
|
14
15
|
AbdAlRahman Gad <abdobngad@gmail.com>
|
|
15
16
|
Ajay Panthagani <ajaypanthagani321@gmail.com>
|
|
16
17
|
Alesandro Ortiz <alesandro@alesandroortiz.com>
|
|
@@ -85,6 +86,7 @@ Mostafa Aboalkasim <mostafa.aboalkasim.offical@gmail.com>
|
|
|
85
86
|
Muhammad Mahad <mahadtxt@gmail.com>
|
|
86
87
|
Naoto Ono <onoto1998@gmail.com>
|
|
87
88
|
Navoda Munasinha <navoda.munasinha@codimite.com>
|
|
89
|
+
Ninad Sutrave <ninadsutrave@gmail.com>
|
|
88
90
|
Nourhan Hasan <nourhan.m.hasan@gmail.com>
|
|
89
91
|
Omar Ramadan <omar@blockcast.net>
|
|
90
92
|
Paras Awasthi <awasthiparas6@gmail.com>
|
package/README.md
CHANGED
|
@@ -6,54 +6,76 @@
|
|
|
6
6
|
|
|
7
7
|
<!-- [END badges] -->
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
This repository contains the client side of Chrome DevTools. It contains all
|
|
10
|
+
the TypeScript and CSS code that runs the DevTools web app.
|
|
10
11
|
|
|
11
12
|
### Source code and documentation
|
|
12
13
|
|
|
13
|
-
The
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
The source code is on [chromium.googlesource.com].
|
|
15
|
+
|
|
16
|
+
The [Chromium DevTools documentation] tells you how to do these tasks:
|
|
17
|
+
|
|
18
|
+
- [Set up] a DevTools frontend checkout.
|
|
19
|
+
- Use a DevTools frontend checkout.
|
|
20
|
+
- Maintain a DevTools frontend checkout.
|
|
21
|
+
|
|
22
|
+
The documentation also contains design guidelines and architecture
|
|
23
|
+
documentation.
|
|
24
|
+
|
|
25
|
+
Other documentation:
|
|
16
26
|
|
|
17
27
|
- DevTools user documentation: [devtools.chrome.com](https://devtools.chrome.com)
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
28
|
+
- Chrome DevTools Protocol documentation: [chromedevtools.github.io/devtools-protocol](https://chromedevtools.github.io/devtools-protocol)
|
|
29
|
+
- A list of Chrome DevTools resources: [github.com/paulirish/awesome-chrome-devtools](https://github.com/paulirish/awesome-chrome-devtools)
|
|
30
|
+
- How to contribute to Chrome DevTools: [goo.gle/devtools-contribution-guide](http://goo.gle/devtools-contribution-guide)
|
|
31
|
+
- How to contribute to the Chrome DevTools Protocol: [goo.gle/devtools-contribution-guide-cdp](https://goo.gle/devtools-contribution-guide-cdp)
|
|
22
32
|
|
|
23
33
|
### Source mirrors
|
|
24
34
|
|
|
25
|
-
DevTools frontend repository
|
|
35
|
+
There is a mirror of the DevTools frontend repository on
|
|
36
|
+
[GitHub](https://github.com/ChromeDevTools/devtools-frontend).
|
|
37
|
+
|
|
38
|
+
The DevTools frontend is also available on npm as the
|
|
39
|
+
[chrome-devtools-frontend](https://www.npmjs.com/package/chrome-devtools-frontend)
|
|
40
|
+
package. The package does not supply CJS modules or ES modules. Thus, it can be
|
|
41
|
+
difficult to use this package in other tools. For an example of how to use it,
|
|
42
|
+
see [this file](https://github.com/paulirish/devtools-timeline-model/blob/master/index.js).
|
|
26
43
|
|
|
27
|
-
|
|
44
|
+
The version number of the npm package (for example, `1.0.373466`) is the
|
|
45
|
+
Chromium commit position of the latest frontend Git commit. The version number
|
|
46
|
+
increases with each Chromium commit. But we publish the package only
|
|
47
|
+
approximately one time each day.
|
|
28
48
|
|
|
29
|
-
|
|
49
|
+
### Contact us
|
|
30
50
|
|
|
31
|
-
|
|
51
|
+
- Follow [@ChromeDevTools] on X (previously Twitter).
|
|
52
|
+
- Send a message to the Chrome DevTools mailing list: [g/google-chrome-developer-tools]
|
|
53
|
+
- Report a new DevTools bug: [goo.gle/devtools-bug]
|
|
32
54
|
|
|
33
|
-
|
|
34
|
-
- Chrome DevTools mailing list: [g/google-chrome-developer-tools]
|
|
35
|
-
- File a new DevTools ticket: [goo.gle/devtools-bug]
|
|
55
|
+
### Get the latest news
|
|
36
56
|
|
|
37
|
-
|
|
57
|
+
To get the latest news about DevTools development, do one or more of these
|
|
58
|
+
steps:
|
|
38
59
|
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
- Follow these
|
|
60
|
+
- Read [What's new in DevTools].
|
|
61
|
+
- Read [Umar's Dev Tips].
|
|
62
|
+
- Follow these accounts on X:
|
|
42
63
|
[@umaar](https://x.com/umaar),
|
|
43
64
|
[@malyw](https://x.com/malyw),
|
|
44
65
|
[@kdzwinel](https://x.com/kdzwinel),
|
|
45
66
|
[@addyosmani](https://x.com/addyosmani),
|
|
46
67
|
[@paul_irish](https://x.com/paul_irish),
|
|
47
68
|
[@samccone](https://x.com/samccone),
|
|
48
|
-
[@mathias](https://x.com/
|
|
69
|
+
[@mathias](https://x.com/mathias),
|
|
49
70
|
[@mattzeunert](https://x.com/mattzeunert),
|
|
50
71
|
[@PrashantPalikhe](https://x.com/PrashantPalikhe),
|
|
51
72
|
[@ziyunfei](https://x.com/ziyunfei), and
|
|
52
73
|
[@bmeurer](https://x.com/bmeurer).
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
-
|
|
56
|
-
-
|
|
74
|
+
- Join the [g/devtools-reviews@chromium.org] mailing list. This list shows all
|
|
75
|
+
pending code reviews.
|
|
76
|
+
- Read the [commit log], or follow [@DevToolsCommits] on X.
|
|
77
|
+
- See [all open DevTools bugs] on crbug.com.
|
|
78
|
+
- Use Chrome Canary and try the experiments.
|
|
57
79
|
|
|
58
80
|
[Chromium DevTools documentation]: http://goo.gle/chromium-devtools
|
|
59
81
|
[set up]: https://chromium.googlesource.com/devtools/devtools-frontend/+/main/docs/get_the_code.md
|
|
@@ -61,9 +83,9 @@ There are a few options to keep an eye on the latest and greatest of DevTools de
|
|
|
61
83
|
[What's new in DevTools]: https://developer.chrome.com/docs/devtools/news
|
|
62
84
|
[Umar's Dev Tips]: https://umaar.com/dev-tips
|
|
63
85
|
[g/devtools-reviews@chromium.org]: https://groups.google.com/a/chromium.org/forum/#!forum/devtools-reviews
|
|
64
|
-
[
|
|
86
|
+
[commit log]: https://chromium.googlesource.com/devtools/devtools-frontend/+log/main
|
|
65
87
|
[@ChromeDevTools]: http://x.com/ChromeDevTools
|
|
66
88
|
[@DevToolsCommits]: http://x.com/DevToolsCommits
|
|
67
|
-
[all open DevTools
|
|
89
|
+
[all open DevTools bugs]: http://goo.gle/devtools-bugs
|
|
68
90
|
[g/google-chrome-developer-tools]: https://groups.google.com/forum/#!forum/google-chrome-developer-tools
|
|
69
91
|
[goo.gle/devtools-bug]: http://goo.gle/devtools-bug
|
package/eslint.config.mjs
CHANGED
|
@@ -29,7 +29,6 @@ export default defineConfig([
|
|
|
29
29
|
'front_end/diff/diff_match_patch.js',
|
|
30
30
|
'front_end/models/javascript_metadata/NativeFunctions.ts',
|
|
31
31
|
// All of these scripts are auto-generated so don't lint them.
|
|
32
|
-
'front_end/generated/ARIAProperties.ts',
|
|
33
32
|
'front_end/generated/Deprecation.ts',
|
|
34
33
|
'front_end/generated/InspectorBackendCommands.ts',
|
|
35
34
|
'front_end/generated/protocol-mapping.d.ts',
|
|
@@ -848,96 +847,49 @@ export default defineConfig([
|
|
|
848
847
|
// code must use private class members instead of TypeScript 'private' keywords.
|
|
849
848
|
// As files are migrated, remove them from this list.
|
|
850
849
|
files: [
|
|
851
|
-
'front_end/core/common/Color.ts',
|
|
852
|
-
'front_end/core/common/ParsedURL.ts',
|
|
853
|
-
'front_end/core/common/ResolverBase.ts',
|
|
854
850
|
'front_end/core/common/Revealer.ts',
|
|
855
|
-
'front_end/core/common/SegmentedRange.ts',
|
|
856
851
|
'front_end/core/common/Settings.ts',
|
|
857
|
-
'front_end/core/common/SimpleHistoryManager.ts',
|
|
858
|
-
'front_end/core/common/Trie.ts',
|
|
859
|
-
'front_end/core/common/VersionController.ts',
|
|
860
|
-
'front_end/core/host/InspectorFrontendHost.ts',
|
|
861
852
|
'front_end/core/platform/MapUtilities.ts',
|
|
862
|
-
'front_end/core/protocol_client/DevToolsCDPConnection.ts',
|
|
863
853
|
'front_end/core/protocol_client/InspectorBackend.ts',
|
|
864
|
-
'front_end/core/sdk/AccessibilityModel.ts',
|
|
865
|
-
'front_end/core/sdk/AnimationModel.ts',
|
|
866
|
-
'front_end/core/sdk/CPUProfilerModel.ts',
|
|
867
854
|
'front_end/core/sdk/CSSMatchedStyles.ts',
|
|
868
|
-
'front_end/core/sdk/CSSMetadata.ts',
|
|
869
|
-
'front_end/core/sdk/CSSModel.ts',
|
|
870
|
-
'front_end/core/sdk/CSSProperty.ts',
|
|
871
855
|
'front_end/core/sdk/CSSPropertyParserMatchers.ts',
|
|
872
|
-
'front_end/core/sdk/CSSRule.ts',
|
|
873
|
-
'front_end/core/sdk/CSSStyleSheetHeader.ts',
|
|
874
856
|
'front_end/core/sdk/ChildTargetManager.ts',
|
|
875
|
-
'front_end/core/sdk/Connections.ts',
|
|
876
|
-
'front_end/core/sdk/ConsoleModel.ts',
|
|
877
|
-
'front_end/core/sdk/CookieParser.ts',
|
|
878
857
|
'front_end/core/sdk/DOMDebuggerModel.ts',
|
|
879
858
|
'front_end/core/sdk/DOMModel.ts',
|
|
880
859
|
'front_end/core/sdk/DOMStorageModel.ts',
|
|
881
860
|
'front_end/core/sdk/DebuggerModel.ts',
|
|
882
|
-
'front_end/core/sdk/EmulationModel.ts',
|
|
883
861
|
'front_end/core/sdk/EnhancedTracesParser.ts',
|
|
884
|
-
'front_end/core/sdk/EventBreakpointsModel.ts',
|
|
885
|
-
'front_end/core/sdk/FrameManager.ts',
|
|
886
|
-
'front_end/core/sdk/IsolateManager.ts',
|
|
887
|
-
'front_end/core/sdk/IssuesModel.ts',
|
|
888
862
|
'front_end/core/sdk/NetworkManager.ts',
|
|
889
863
|
'front_end/core/sdk/NetworkRequest.ts',
|
|
890
|
-
'front_end/core/sdk/OverlayModel.ts',
|
|
891
864
|
'front_end/core/sdk/OverlayPersistentHighlighter.ts',
|
|
892
865
|
'front_end/core/sdk/PageLoad.ts',
|
|
893
|
-
'front_end/core/sdk/PageResourceLoader.ts',
|
|
894
866
|
'front_end/core/sdk/PreloadingModel.ts',
|
|
895
867
|
'front_end/core/sdk/RehydratingConnection.ts',
|
|
896
|
-
'front_end/core/sdk/RemoteObject.ts',
|
|
897
|
-
'front_end/core/sdk/Resource.ts',
|
|
898
868
|
'front_end/core/sdk/ResourceTreeModel.ts',
|
|
899
|
-
'front_end/core/sdk/RuntimeModel.ts',
|
|
900
|
-
'front_end/core/sdk/Script.ts',
|
|
901
869
|
'front_end/core/sdk/ServiceWorkerCacheModel.ts',
|
|
902
870
|
'front_end/core/sdk/ServiceWorkerManager.ts',
|
|
903
|
-
'front_end/core/sdk/SourceMap.ts',
|
|
904
|
-
'front_end/core/sdk/SourceMapManager.ts',
|
|
905
871
|
'front_end/core/sdk/StorageBucketsModel.ts',
|
|
906
|
-
'front_end/core/sdk/TargetManager.ts',
|
|
907
872
|
'front_end/core/text_utils/TextUtils.ts',
|
|
908
|
-
'front_end/models/bindings/CSSWorkspaceBinding.ts',
|
|
909
873
|
'front_end/models/bindings/CompilerScriptMapping.ts',
|
|
910
|
-
'front_end/models/bindings/DebuggerLanguagePlugins.ts',
|
|
911
|
-
'front_end/models/bindings/DebuggerWorkspaceBinding.ts',
|
|
912
|
-
'front_end/models/bindings/DefaultScriptMapping.ts',
|
|
913
|
-
'front_end/models/bindings/FileUtils.ts',
|
|
914
|
-
'front_end/models/bindings/PresentationConsoleMessageHelper.ts',
|
|
915
874
|
'front_end/models/bindings/ResourceMapping.ts',
|
|
916
|
-
'front_end/models/bindings/ResourceScriptMapping.ts',
|
|
917
875
|
'front_end/models/bindings/SASSSourceMapping.ts',
|
|
918
876
|
'front_end/models/bindings/StylesSourceMapping.ts',
|
|
919
877
|
'front_end/models/breakpoints/BreakpointManager.ts',
|
|
920
878
|
'front_end/models/computed_style/ComputedStyleModel.ts',
|
|
921
|
-
'front_end/models/cpu_profile/CPUProfileDataModel.ts',
|
|
922
|
-
'front_end/models/cpu_profile/ProfileTreeModel.ts',
|
|
923
879
|
'front_end/models/elements/ElementUpdateRecord.ts',
|
|
924
880
|
'front_end/models/emulation/DeviceModeModel.ts',
|
|
925
|
-
'front_end/models/emulation/EmulatedDevices.ts',
|
|
926
881
|
'front_end/models/extensions/ExtensionEndpoint.ts',
|
|
927
882
|
'front_end/models/extensions/LanguageExtensionEndpoint.ts',
|
|
928
883
|
'front_end/models/extensions/RecorderExtensionEndpoint.ts',
|
|
929
884
|
'front_end/models/formatter/FormatterWorkerPool.ts',
|
|
930
885
|
'front_end/models/formatter/ScriptFormatter.ts',
|
|
931
|
-
'front_end/models/har/HARFormat.ts',
|
|
932
886
|
'front_end/models/har/Log.ts',
|
|
933
887
|
'front_end/models/issues_manager/IssuesManager.ts',
|
|
934
888
|
'front_end/models/issues_manager/SourceFrameIssuesManager.ts',
|
|
935
889
|
'front_end/models/javascript_metadata/JavaScriptMetadata.ts',
|
|
936
|
-
'front_end/models/logs/LogManager.ts',
|
|
937
890
|
'front_end/models/logs/NetworkLog.ts',
|
|
938
891
|
'front_end/models/logs/RequestResolver.ts',
|
|
939
892
|
'front_end/models/persistence/Automapping.ts',
|
|
940
|
-
'front_end/models/persistence/FileSystemWorkspaceBinding.ts',
|
|
941
893
|
'front_end/models/persistence/IsolatedFileSystem.ts',
|
|
942
894
|
'front_end/models/persistence/IsolatedFileSystemManager.ts',
|
|
943
895
|
'front_end/models/persistence/NetworkPersistenceManager.ts',
|
|
@@ -950,7 +902,6 @@ export default defineConfig([
|
|
|
950
902
|
'front_end/models/workspace/FileManager.ts',
|
|
951
903
|
'front_end/models/workspace/IgnoreListManager.ts',
|
|
952
904
|
'front_end/models/workspace_diff/WorkspaceDiff.ts',
|
|
953
|
-
'front_end/panels/accessibility/ARIAAttributesView.ts',
|
|
954
905
|
'front_end/panels/accessibility/ARIAMetadata.ts',
|
|
955
906
|
'front_end/panels/accessibility/AccessibilityNodeView.ts',
|
|
956
907
|
'front_end/panels/accessibility/AccessibilitySidebarView.ts',
|
|
@@ -983,16 +934,12 @@ export default defineConfig([
|
|
|
983
934
|
'front_end/panels/application/TrustTokensTreeElement.ts',
|
|
984
935
|
'front_end/panels/application/preloading/PreloadingView.ts',
|
|
985
936
|
'front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts',
|
|
986
|
-
'front_end/panels/browser_debugger/DOMBreakpointsSidebarPane.ts',
|
|
987
937
|
'front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts',
|
|
988
|
-
'front_end/panels/changes/ChangesSidebar.ts',
|
|
989
938
|
'front_end/panels/common/ExtensionPanel.ts',
|
|
990
939
|
'front_end/panels/common/ExtensionServer.ts',
|
|
991
940
|
'front_end/panels/common/ExtensionView.ts',
|
|
992
|
-
'front_end/panels/common/PersistenceUtils.ts',
|
|
993
941
|
'front_end/panels/console/ConsoleContextSelector.ts',
|
|
994
942
|
'front_end/panels/console/ConsolePanel.ts',
|
|
995
|
-
'front_end/panels/console/ConsolePinPane.ts',
|
|
996
943
|
'front_end/panels/console/ConsolePrompt.ts',
|
|
997
944
|
'front_end/panels/console/ConsoleView.ts',
|
|
998
945
|
'front_end/panels/console/ConsoleViewMessage.ts',
|
|
@@ -1000,8 +947,6 @@ export default defineConfig([
|
|
|
1000
947
|
'front_end/panels/console_counters/WarningErrorCounter.ts',
|
|
1001
948
|
'front_end/panels/coverage/CoverageDecorationManager.ts',
|
|
1002
949
|
'front_end/panels/coverage/CoverageModel.ts',
|
|
1003
|
-
'front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts',
|
|
1004
|
-
'front_end/panels/developer_resources/DeveloperResourcesView.ts',
|
|
1005
950
|
'front_end/panels/elements/AccessibilityTreeView.ts',
|
|
1006
951
|
'front_end/panels/elements/ClassesPaneWidget.ts',
|
|
1007
952
|
'front_end/panels/elements/ColorSwatchPopoverIcon.ts',
|
|
@@ -1024,12 +969,8 @@ export default defineConfig([
|
|
|
1024
969
|
'front_end/panels/emulation/AdvancedApp.ts',
|
|
1025
970
|
'front_end/panels/emulation/DeviceModeToolbar.ts',
|
|
1026
971
|
'front_end/panels/emulation/DeviceModeView.ts',
|
|
1027
|
-
'front_end/panels/emulation/InspectedPagePlaceholder.ts',
|
|
1028
972
|
'front_end/panels/emulation/MediaQueryInspector.ts',
|
|
1029
973
|
'front_end/panels/event_listeners/EventListenersView.ts',
|
|
1030
|
-
'front_end/panels/issues/CorsIssueDetailsView.ts',
|
|
1031
|
-
'front_end/panels/issues/GenericIssueDetailsView.ts',
|
|
1032
|
-
'front_end/panels/issues/IssueView.ts',
|
|
1033
974
|
'front_end/panels/layer_viewer/LayerDetailsView.ts',
|
|
1034
975
|
'front_end/panels/layer_viewer/LayerTreeOutline.ts',
|
|
1035
976
|
'front_end/panels/layer_viewer/LayerViewHost.ts',
|
|
@@ -1062,7 +1003,6 @@ export default defineConfig([
|
|
|
1062
1003
|
'front_end/panels/network/EventSourceMessagesView.ts',
|
|
1063
1004
|
'front_end/panels/network/NetworkDataGridNode.ts',
|
|
1064
1005
|
'front_end/panels/network/NetworkFrameGrouper.ts',
|
|
1065
|
-
'front_end/panels/network/NetworkItemView.ts',
|
|
1066
1006
|
'front_end/panels/network/NetworkLogView.ts',
|
|
1067
1007
|
'front_end/panels/network/NetworkLogViewColumns.ts',
|
|
1068
1008
|
'front_end/panels/network/NetworkManageCustomHeadersView.ts',
|
|
@@ -1072,12 +1012,8 @@ export default defineConfig([
|
|
|
1072
1012
|
'front_end/panels/network/NetworkWaterfallColumn.ts',
|
|
1073
1013
|
'front_end/panels/network/RequestConditionsDrawer.ts',
|
|
1074
1014
|
'front_end/panels/network/RequestCookiesView.ts',
|
|
1075
|
-
'front_end/panels/network/RequestPayloadView.ts',
|
|
1076
1015
|
'front_end/panels/network/RequestPreviewView.ts',
|
|
1077
|
-
'front_end/panels/network/RequestTimingView.ts',
|
|
1078
1016
|
'front_end/panels/network/ResourceChunkView.ts',
|
|
1079
|
-
'front_end/panels/network/ResourceDirectSocketChunkView.ts',
|
|
1080
|
-
'front_end/panels/network/ResourceWebSocketFrameView.ts',
|
|
1081
1017
|
'front_end/panels/network/SignedExchangeInfoView.ts',
|
|
1082
1018
|
'front_end/panels/performance_monitor/PerformanceMonitor.ts',
|
|
1083
1019
|
'front_end/panels/profiler/ProfileDataGrid.ts',
|
|
@@ -1103,23 +1039,15 @@ export default defineConfig([
|
|
|
1103
1039
|
'front_end/panels/sources/EditingLocationHistoryManager.ts',
|
|
1104
1040
|
'front_end/panels/sources/FilePathScoreFunction.ts',
|
|
1105
1041
|
'front_end/panels/sources/FilteredUISourceCodeListProvider.ts',
|
|
1106
|
-
'front_end/panels/sources/GoToLineQuickOpen.ts',
|
|
1107
1042
|
'front_end/panels/sources/NavigatorView.ts',
|
|
1108
1043
|
'front_end/panels/sources/OutlineQuickOpen.ts',
|
|
1109
|
-
'front_end/panels/sources/PersistenceActions.ts',
|
|
1110
|
-
'front_end/panels/sources/ProfilePlugin.ts',
|
|
1111
|
-
'front_end/panels/sources/SourcesNavigator.ts',
|
|
1112
1044
|
'front_end/panels/sources/SourcesPanel.ts',
|
|
1113
1045
|
'front_end/panels/sources/SourcesSearchScope.ts',
|
|
1114
1046
|
'front_end/panels/sources/SourcesView.ts',
|
|
1115
|
-
'front_end/panels/sources/ThreadsSidebarPane.ts',
|
|
1116
1047
|
'front_end/panels/sources/UISourceCodeFrame.ts',
|
|
1117
1048
|
'front_end/panels/sources/WatchExpressionsSidebarPane.ts',
|
|
1118
|
-
'front_end/panels/timeline/CompatibilityTracksAppender.ts',
|
|
1119
1049
|
'front_end/panels/timeline/CountersGraph.ts',
|
|
1120
1050
|
'front_end/panels/timeline/EventsTimelineTreeView.ts',
|
|
1121
|
-
'front_end/panels/timeline/StatusDialog.ts',
|
|
1122
|
-
'front_end/panels/timeline/ThirdPartyTreeView.ts',
|
|
1123
1051
|
'front_end/panels/timeline/TimelineController.ts',
|
|
1124
1052
|
'front_end/panels/timeline/TimelineDetailsView.ts',
|
|
1125
1053
|
'front_end/panels/timeline/TimelineEventOverview.ts',
|
|
@@ -1130,11 +1058,9 @@ export default defineConfig([
|
|
|
1130
1058
|
'front_end/panels/timeline/TimelineLoader.ts',
|
|
1131
1059
|
'front_end/panels/timeline/TimelinePaintProfilerView.ts',
|
|
1132
1060
|
'front_end/panels/timeline/TimelinePanel.ts',
|
|
1133
|
-
'front_end/panels/timeline/TimelineSelectorStatsView.ts',
|
|
1134
1061
|
'front_end/panels/timeline/TimelineTreeView.ts',
|
|
1135
1062
|
'front_end/panels/timeline/TimelineUIUtils.ts',
|
|
1136
1063
|
'front_end/panels/timeline/TracingLayerTree.ts',
|
|
1137
|
-
'front_end/panels/timeline/components/insights/SlowCSSSelector.ts',
|
|
1138
1064
|
'front_end/panels/web_audio/WebAudioModel.ts',
|
|
1139
1065
|
'front_end/panels/web_audio/WebAudioView.ts',
|
|
1140
1066
|
'front_end/testing/MockIssuesManager.ts',
|
|
@@ -1143,16 +1069,7 @@ export default defineConfig([
|
|
|
1143
1069
|
'front_end/testing/StubIssue.ts',
|
|
1144
1070
|
'front_end/third_party/i18n/i18n-impl.ts',
|
|
1145
1071
|
'front_end/third_party/i18n/localized-string-set.ts',
|
|
1146
|
-
'front_end/third_party/puppeteer
|
|
1147
|
-
'front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts',
|
|
1148
|
-
'front_end/third_party/puppeteer/package/src/bidi/core/Request.ts',
|
|
1149
|
-
'front_end/third_party/puppeteer/package/src/bidi/core/Session.ts',
|
|
1150
|
-
'front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts',
|
|
1151
|
-
'front_end/third_party/puppeteer/package/src/bidi/core/UserPrompt.ts',
|
|
1152
|
-
'front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts',
|
|
1153
|
-
'front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts',
|
|
1154
|
-
'front_end/third_party/puppeteer/package/src/cdp/Input.ts',
|
|
1155
|
-
'front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts',
|
|
1072
|
+
'front_end/third_party/puppeteer/**/*.ts',
|
|
1156
1073
|
'front_end/third_party/wasmparser/package/src/WasmDis.ts',
|
|
1157
1074
|
'front_end/third_party/wasmparser/package/src/WasmParser.ts',
|
|
1158
1075
|
'front_end/ui/components/text_editor/config.ts',
|
|
@@ -1164,12 +1081,10 @@ export default defineConfig([
|
|
|
1164
1081
|
'front_end/ui/legacy/DropTarget.ts',
|
|
1165
1082
|
'front_end/ui/legacy/FilterBar.ts',
|
|
1166
1083
|
'front_end/ui/legacy/FilterSuggestionBuilder.ts',
|
|
1167
|
-
'front_end/ui/legacy/ForwardedInputEventHandler.ts',
|
|
1168
1084
|
'front_end/ui/legacy/GlassPane.ts',
|
|
1169
1085
|
'front_end/ui/legacy/Infobar.ts',
|
|
1170
1086
|
'front_end/ui/legacy/InplaceEditor.ts',
|
|
1171
1087
|
'front_end/ui/legacy/InspectorView.ts',
|
|
1172
|
-
'front_end/ui/legacy/KeyboardShortcut.ts',
|
|
1173
1088
|
'front_end/ui/legacy/ListControl.ts',
|
|
1174
1089
|
'front_end/ui/legacy/ListModel.ts',
|
|
1175
1090
|
'front_end/ui/legacy/ListWidget.ts',
|
|
@@ -1201,21 +1116,17 @@ export default defineConfig([
|
|
|
1201
1116
|
'front_end/ui/legacy/components/data_grid/DataGrid.ts',
|
|
1202
1117
|
'front_end/ui/legacy/components/data_grid/ShowMoreDataGridNode.ts',
|
|
1203
1118
|
'front_end/ui/legacy/components/data_grid/ViewportDataGrid.ts',
|
|
1204
|
-
'front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts',
|
|
1205
1119
|
'front_end/ui/legacy/components/inline_editor/BezierEditor.ts',
|
|
1206
|
-
'front_end/ui/legacy/components/inline_editor/BezierUI.ts',
|
|
1207
1120
|
'front_end/ui/legacy/components/inline_editor/CSSAngle.ts',
|
|
1208
1121
|
'front_end/ui/legacy/components/inline_editor/CSSAngleEditor.ts',
|
|
1209
1122
|
'front_end/ui/legacy/components/inline_editor/CSSAngleSwatch.ts',
|
|
1210
1123
|
'front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts',
|
|
1211
1124
|
'front_end/ui/legacy/components/inline_editor/ColorMixSwatch.ts',
|
|
1212
1125
|
'front_end/ui/legacy/components/inline_editor/ColorSwatch.ts',
|
|
1213
|
-
'front_end/ui/legacy/components/inline_editor/LinkSwatch.ts',
|
|
1214
1126
|
'front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts',
|
|
1215
1127
|
'front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts',
|
|
1216
1128
|
'front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts',
|
|
1217
1129
|
'front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts',
|
|
1218
|
-
'front_end/ui/legacy/components/object_ui/RemoteObjectPreviewFormatter.ts',
|
|
1219
1130
|
'front_end/ui/legacy/components/perf_ui/ChartViewport.ts',
|
|
1220
1131
|
'front_end/ui/legacy/components/perf_ui/FilmStripView.ts',
|
|
1221
1132
|
'front_end/ui/legacy/components/perf_ui/FlameChart.ts',
|
|
@@ -2503,18 +2503,18 @@ export class Generator {
|
|
|
2503
2503
|
colorForID(id: string): string {
|
|
2504
2504
|
let color = this.#colors.get(id);
|
|
2505
2505
|
if (!color) {
|
|
2506
|
-
color = this
|
|
2506
|
+
color = this.#generateColorForID(id);
|
|
2507
2507
|
this.#colors.set(id, color);
|
|
2508
2508
|
}
|
|
2509
2509
|
return color;
|
|
2510
2510
|
}
|
|
2511
2511
|
|
|
2512
|
-
|
|
2512
|
+
#generateColorForID(id: string): string {
|
|
2513
2513
|
const hash = Platform.StringUtilities.hashCode(id);
|
|
2514
|
-
const h = this
|
|
2515
|
-
const s = this
|
|
2516
|
-
const l = this
|
|
2517
|
-
const a = this
|
|
2514
|
+
const h = this.#indexToValueInSpace(hash, this.#hueSpace);
|
|
2515
|
+
const s = this.#indexToValueInSpace(hash >> 8, this.#satSpace);
|
|
2516
|
+
const l = this.#indexToValueInSpace(hash >> 16, this.#lightnessSpace);
|
|
2517
|
+
const a = this.#indexToValueInSpace(hash >> 24, this.#alphaSpace);
|
|
2518
2518
|
const start = `hsl(${h}deg ${s}% ${l}%`;
|
|
2519
2519
|
if (a !== 1) {
|
|
2520
2520
|
return `${start} / ${Math.floor(a * 100)}%)`;
|
|
@@ -2522,7 +2522,7 @@ export class Generator {
|
|
|
2522
2522
|
return `${start})`;
|
|
2523
2523
|
}
|
|
2524
2524
|
|
|
2525
|
-
|
|
2525
|
+
#indexToValueInSpace(index: number, space: Space): number {
|
|
2526
2526
|
if (typeof space === 'number') {
|
|
2527
2527
|
return space;
|
|
2528
2528
|
}
|
|
@@ -507,16 +507,16 @@ export class ParsedURL {
|
|
|
507
507
|
return ParsedURL.substring(url as Platform.DevToolsPath.UrlString, 0, wasmFunctionIndex);
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
|
|
510
|
+
static #beginsWithWindowsDriveLetter(url: string): boolean {
|
|
511
511
|
return /^[A-Za-z]:/.test(url);
|
|
512
512
|
}
|
|
513
513
|
|
|
514
|
-
|
|
514
|
+
static #beginsWithScheme(url: string): boolean {
|
|
515
515
|
return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(url);
|
|
516
516
|
}
|
|
517
517
|
|
|
518
518
|
static isRelativeURL(url: string): boolean {
|
|
519
|
-
return !this
|
|
519
|
+
return !this.#beginsWithScheme(url) || this.#beginsWithWindowsDriveLetter(url);
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
get displayName(): string {
|
|
@@ -28,7 +28,7 @@ export abstract class ResolverBase<Id, T> {
|
|
|
28
28
|
async waitFor(id: Id): Promise<T> {
|
|
29
29
|
const obj = this.getForId(id);
|
|
30
30
|
if (!obj) {
|
|
31
|
-
return await this
|
|
31
|
+
return await this.#getOrCreatePromise(id);
|
|
32
32
|
}
|
|
33
33
|
return obj;
|
|
34
34
|
}
|
|
@@ -42,7 +42,7 @@ export abstract class ResolverBase<Id, T> {
|
|
|
42
42
|
const obj = this.getForId(id);
|
|
43
43
|
if (!obj) {
|
|
44
44
|
const swallowTheError = (): void => {};
|
|
45
|
-
void this
|
|
45
|
+
void this.#getOrCreatePromise(id).catch(swallowTheError).then(obj => {
|
|
46
46
|
if (obj) {
|
|
47
47
|
callback(obj);
|
|
48
48
|
}
|
|
@@ -63,7 +63,7 @@ export abstract class ResolverBase<Id, T> {
|
|
|
63
63
|
this.#unresolvedIds.clear();
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
#getOrCreatePromise(id: Id): Promise<T> {
|
|
67
67
|
const promiseInfo = this.#unresolvedIds.get(id);
|
|
68
68
|
if (promiseInfo) {
|
|
69
69
|
return promiseInfo.promise;
|
|
@@ -39,7 +39,7 @@ export class SegmentedRange<T> {
|
|
|
39
39
|
if (startIndex > 0) {
|
|
40
40
|
// 2. Try mering the preceding segment
|
|
41
41
|
const precedingSegment = this.#segments[startIndex - 1];
|
|
42
|
-
merged = this
|
|
42
|
+
merged = this.#tryMerge(precedingSegment, newSegment);
|
|
43
43
|
if (merged) {
|
|
44
44
|
--startIndex;
|
|
45
45
|
newSegment = merged;
|
|
@@ -59,7 +59,7 @@ export class SegmentedRange<T> {
|
|
|
59
59
|
}
|
|
60
60
|
// 4. Merge or adjust the succeeding segment if it overlaps.
|
|
61
61
|
if (endIndex < this.#segments.length) {
|
|
62
|
-
merged = this
|
|
62
|
+
merged = this.#tryMerge(newSegment, this.#segments[endIndex]);
|
|
63
63
|
if (merged) {
|
|
64
64
|
endIndex++;
|
|
65
65
|
newSegment = merged;
|
|
@@ -74,7 +74,7 @@ export class SegmentedRange<T> {
|
|
|
74
74
|
return this.#segments;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
#tryMerge(first: Segment<T>, second: Segment<T>): Segment<T>|null {
|
|
78
78
|
const merged = this.#mergeCallback && this.#mergeCallback(first, second);
|
|
79
79
|
if (!merged) {
|
|
80
80
|
return null;
|
|
@@ -24,15 +24,15 @@ export class SimpleHistoryManager {
|
|
|
24
24
|
this.#historyDepth = historyDepth;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
#readOnlyLock(): void {
|
|
28
28
|
++this.#coalescingReadonly;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
#releaseReadOnlyLock(): void {
|
|
32
32
|
--this.#coalescingReadonly;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
#getPreviousValidIndex(): number {
|
|
36
36
|
if (this.empty()) {
|
|
37
37
|
return -1;
|
|
38
38
|
}
|
|
@@ -48,7 +48,7 @@ export class SimpleHistoryManager {
|
|
|
48
48
|
return revealIndex;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
#getNextValidIndex(): number {
|
|
52
52
|
let revealIndex = this.#activeEntryIndex + 1;
|
|
53
53
|
|
|
54
54
|
while (revealIndex < this.#entries.length && !this.#entries[revealIndex].valid()) {
|
|
@@ -61,7 +61,7 @@ export class SimpleHistoryManager {
|
|
|
61
61
|
return revealIndex;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
|
|
64
|
+
#readOnly(): boolean {
|
|
65
65
|
return Boolean(this.#coalescingReadonly);
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -74,7 +74,7 @@ export class SimpleHistoryManager {
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
push(entry: HistoryEntry): void {
|
|
77
|
-
if (this
|
|
77
|
+
if (this.#readOnly()) {
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
80
|
if (!this.empty()) {
|
|
@@ -88,36 +88,36 @@ export class SimpleHistoryManager {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
canRollback(): boolean {
|
|
91
|
-
return this
|
|
91
|
+
return this.#getPreviousValidIndex() >= 0;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
canRollover(): boolean {
|
|
95
|
-
return this
|
|
95
|
+
return this.#getNextValidIndex() >= 0;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
rollback(): boolean {
|
|
99
|
-
const revealIndex = this
|
|
99
|
+
const revealIndex = this.#getPreviousValidIndex();
|
|
100
100
|
if (revealIndex === -1) {
|
|
101
101
|
return false;
|
|
102
102
|
}
|
|
103
|
-
this
|
|
103
|
+
this.#readOnlyLock();
|
|
104
104
|
this.#activeEntryIndex = revealIndex;
|
|
105
105
|
this.#entries[revealIndex].reveal();
|
|
106
|
-
this
|
|
106
|
+
this.#releaseReadOnlyLock();
|
|
107
107
|
|
|
108
108
|
return true;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
rollover(): boolean {
|
|
112
|
-
const revealIndex = this
|
|
112
|
+
const revealIndex = this.#getNextValidIndex();
|
|
113
113
|
if (revealIndex === -1) {
|
|
114
114
|
return false;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
this
|
|
117
|
+
this.#readOnlyLock();
|
|
118
118
|
this.#activeEntryIndex = revealIndex;
|
|
119
119
|
this.#entries[revealIndex].reveal();
|
|
120
|
-
this
|
|
120
|
+
this.#releaseReadOnlyLock();
|
|
121
121
|
|
|
122
122
|
return true;
|
|
123
123
|
}
|
|
@@ -111,18 +111,18 @@ export class Trie<T extends ArrayLike<ElementType<T>>> {
|
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
113
|
const results: T[] = [];
|
|
114
|
-
this
|
|
114
|
+
this.#dfs(node, prefix, results);
|
|
115
115
|
return results;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
|
|
118
|
+
#dfs(node: number, prefix: T, results: T[]): void {
|
|
119
119
|
if (this.#isWord[node]) {
|
|
120
120
|
results.push(prefix);
|
|
121
121
|
}
|
|
122
122
|
const edges = this.#edges[node];
|
|
123
123
|
for (const [edge, node] of edges) {
|
|
124
124
|
const newPrefix = this.#traitImpl.append(prefix, edge);
|
|
125
|
-
this
|
|
125
|
+
this.#dfs(node, newPrefix, results);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
|