chrome-devtools-frontend 1.0.925655 → 1.0.927419
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/.stylelintignore +1 -0
- package/AUTHORS +1 -0
- package/config/gni/devtools_grd_files.gni +10 -3
- package/front_end/core/common/Color.ts +6 -0
- package/front_end/core/common/SettingRegistration.ts +8 -0
- package/front_end/core/host/InspectorFrontendHost.ts +3 -0
- package/front_end/core/host/InspectorFrontendHostAPI.ts +3 -0
- package/front_end/core/host/UserMetrics.ts +7 -3
- package/front_end/core/i18n/locales/en-US.json +71 -14
- package/front_end/core/i18n/locales/en-XL.json +71 -14
- package/front_end/core/platform/keyboard-utilities.ts +1 -0
- package/front_end/core/root/Runtime.ts +1 -0
- package/front_end/core/sdk/ConsoleModel.ts +3 -0
- package/front_end/core/sdk/DebuggerModel.ts +2 -0
- package/front_end/core/sdk/NetworkManager.ts +12 -2
- package/front_end/core/sdk/NetworkRequest.ts +20 -5
- package/front_end/core/sdk/OverlayModel.ts +21 -0
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +55 -3
- package/front_end/devtools_compatibility.js +11 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -2
- package/front_end/entrypoints/main/main-meta.ts +16 -0
- package/front_end/generated/InspectorBackendCommands.js +8 -7
- package/front_end/generated/SupportedCSSProperties.js +7 -1
- package/front_end/generated/protocol-mapping.d.ts +5 -24
- package/front_end/generated/protocol-proxy-api.d.ts +6 -29
- package/front_end/generated/protocol.d.ts +51 -46
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +0 -6
- package/front_end/models/issues_manager/CorsIssue.ts +4 -0
- package/front_end/models/logs/LogManager.ts +1 -0
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +6 -4
- package/front_end/models/persistence/workspaceSettingsTab.css +18 -18
- package/front_end/models/timeline_model/TimelineFrameModel.ts +107 -28
- package/front_end/panels/application/ReportingApiReportsView.ts +89 -0
- package/front_end/panels/application/ReportingApiTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiView.ts +27 -0
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/EndpointsGrid.ts +55 -0
- package/front_end/panels/application/components/ReportsGrid.ts +144 -0
- package/front_end/panels/application/components/components.ts +4 -2
- package/front_end/panels/application/components/reportingApiGrid.css +35 -0
- package/front_end/panels/application/reportingApiReportsView.css +13 -0
- package/front_end/panels/console/ConsoleView.ts +17 -0
- package/front_end/panels/console/console-meta.ts +26 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +19 -0
- package/front_end/panels/elements/PropertiesWidget.ts +1 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +28 -0
- package/front_end/panels/elements/StylePropertyUtils.ts +13 -0
- package/front_end/panels/elements/components/nodeText.css +4 -4
- package/front_end/panels/elements/elements.ts +2 -0
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/issues/CorsIssueDetailsView.ts +4 -2
- package/front_end/panels/network/RequestCookiesView.ts +13 -4
- package/front_end/panels/screencast/screencastView.css +2 -6
- package/front_end/panels/search/SearchResultsPane.ts +1 -1
- package/front_end/panels/settings/SettingsScreen.ts +3 -0
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +8 -3
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -10
- package/front_end/panels/sources/GoToLineQuickOpen.ts +50 -10
- package/front_end/panels/sources/UISourceCodeFrame.ts +0 -13
- package/front_end/panels/sources/sources-legacy.ts +0 -11
- package/front_end/panels/sources/sources-meta.ts +22 -20
- package/front_end/panels/sources/sources.ts +0 -2
- package/front_end/third_party/codemirror.next/LICENSE +21 -0
- package/front_end/third_party/codemirror.next/README.chromium +18 -0
- package/front_end/third_party/codemirror.next/bundle-tsconfig.json +21 -0
- package/front_end/third_party/codemirror.next/bundle.ts +87 -0
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -0
- package/front_end/third_party/codemirror.next/chunk/cpp.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/css.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/html.js +4 -0
- package/front_end/third_party/codemirror.next/chunk/java.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/javascript.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/json.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -0
- package/front_end/third_party/codemirror.next/chunk/markdown.js +6 -0
- package/front_end/third_party/codemirror.next/chunk/php.js +6 -0
- package/front_end/third_party/codemirror.next/chunk/python.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/wast.js +2 -0
- package/front_end/third_party/codemirror.next/chunk/xml.js +2 -0
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +5467 -0
- package/front_end/third_party/codemirror.next/codemirror.next.js +2 -0
- package/front_end/third_party/codemirror.next/package.json +39 -0
- package/front_end/third_party/codemirror.next/rebuild.sh +6 -0
- package/front_end/third_party/codemirror.next/rollup.config.js +45 -0
- package/front_end/ui/components/buttons/Button.ts +33 -5
- package/front_end/ui/components/buttons/button.css +32 -2
- package/front_end/ui/components/code_highlighter/CodeHighlighter.ts +137 -0
- package/front_end/ui/components/code_highlighter/codeHighlighter.css +51 -0
- package/front_end/ui/components/code_highlighter/code_highlighter.ts +11 -0
- package/front_end/ui/components/docs/button/basic.html +1 -0
- package/front_end/ui/components/docs/button/basic.ts +47 -4
- package/front_end/ui/components/docs/text_editor/basic.html +28 -0
- package/front_end/ui/components/docs/text_editor/basic.ts +14 -0
- package/front_end/ui/components/docs/text_prompt/basic.html +35 -0
- package/front_end/ui/components/docs/text_prompt/basic.ts +19 -0
- package/front_end/ui/components/render_coordinator/RenderCoordinator.ts +17 -0
- package/front_end/ui/components/text_editor/TextEditor.ts +161 -0
- package/front_end/ui/components/text_editor/config.ts +264 -0
- package/front_end/ui/components/text_editor/text_editor.ts +6 -0
- package/front_end/ui/components/text_editor/theme.ts +113 -0
- package/front_end/ui/components/text_prompt/TextPrompt.ts +144 -0
- package/front_end/ui/components/text_prompt/textPrompt.css +33 -0
- package/front_end/ui/components/text_prompt/text_prompt.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +9 -1
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +8 -3
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +39 -39
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +10 -4
- package/front_end/ui/legacy/components/quick_open/QuickOpen.ts +31 -14
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +7 -8
- package/front_end/ui/legacy/components/source_frame/source_frame-legacy.ts +0 -6
- package/front_end/ui/legacy/components/source_frame/source_frame.ts +0 -2
- package/front_end/ui/legacy/components/utils/JSPresentationUtils.ts +11 -9
- package/front_end/ui/legacy/filter.css +1 -0
- package/front_end/ui/legacy/inspectorSyntaxHighlight.css +3 -8
- package/front_end/ui/legacy/inspectorSyntaxHighlightDark.css +11 -16
- package/front_end/ui/legacy/themeColors.css +60 -0
- package/inspector_overlay/debug/tool_persistent_isolated_element.html +75 -0
- package/inspector_overlay/drag_resize_handler.ts +142 -0
- package/inspector_overlay/highlight_isolated_element.ts +62 -0
- package/inspector_overlay/main.ts +4 -1
- package/inspector_overlay/tool_highlight.ts +6 -0
- package/inspector_overlay/tool_paused.ts +2 -0
- package/inspector_overlay/tool_persistent.ts +110 -0
- package/inspector_overlay/tool_screenshot.ts +8 -1
- package/package.json +1 -1
- package/front_end/panels/application/components/ReportingApiView.ts +0 -24
- package/front_end/panels/sources/GutterDiffPlugin.ts +0 -282
- package/front_end/ui/legacy/components/source_frame/SourceCodeDiff.ts +0 -140
|
@@ -44,6 +44,7 @@ export class TimelineFrameModel {
|
|
|
44
44
|
private frameById!: {
|
|
45
45
|
[x: number]: TimelineFrame,
|
|
46
46
|
};
|
|
47
|
+
private beginFrameQueue!: TimelineFrameBeginFrameQueue;
|
|
47
48
|
private minimumRecordTime!: number;
|
|
48
49
|
private lastFrame!: TimelineFrame|null;
|
|
49
50
|
private mainFrameCommitted!: boolean;
|
|
@@ -115,6 +116,7 @@ export class TimelineFrameModel {
|
|
|
115
116
|
this.minimumRecordTime = Infinity;
|
|
116
117
|
this.frames = [];
|
|
117
118
|
this.frameById = {};
|
|
119
|
+
this.beginFrameQueue = new TimelineFrameBeginFrameQueue();
|
|
118
120
|
this.lastFrame = null;
|
|
119
121
|
this.lastLayerTree = null;
|
|
120
122
|
this.mainFrameCommitted = false;
|
|
@@ -130,21 +132,28 @@ export class TimelineFrameModel {
|
|
|
130
132
|
this.currentTaskTimeByCategory = {};
|
|
131
133
|
}
|
|
132
134
|
|
|
133
|
-
handleBeginFrame(startTime: number): void {
|
|
135
|
+
handleBeginFrame(startTime: number, seqId: number): void {
|
|
134
136
|
if (!this.lastFrame) {
|
|
135
137
|
this.startFrame(startTime);
|
|
136
138
|
}
|
|
137
139
|
this.lastBeginFrame = startTime;
|
|
140
|
+
|
|
141
|
+
this.beginFrameQueue.addFrameIfNotExists(seqId, startTime, false);
|
|
138
142
|
}
|
|
139
143
|
|
|
140
|
-
handleDroppedFrame(startTime: number): void {
|
|
144
|
+
handleDroppedFrame(startTime: number, seqId: number): void {
|
|
141
145
|
if (!this.lastFrame) {
|
|
142
146
|
this.startFrame(startTime);
|
|
143
147
|
}
|
|
144
|
-
|
|
148
|
+
|
|
149
|
+
// This line handles the case where no BeginFrame event is issued for
|
|
150
|
+
// the dropped frame. In this situation, add a BeginFrame to the queue
|
|
151
|
+
// as if it actually occurred.
|
|
152
|
+
this.beginFrameQueue.addFrameIfNotExists(seqId, startTime, true);
|
|
153
|
+
this.beginFrameQueue.setDropped(seqId, true);
|
|
145
154
|
}
|
|
146
155
|
|
|
147
|
-
handleDrawFrame(startTime: number): void {
|
|
156
|
+
handleDrawFrame(startTime: number, seqId: number): void {
|
|
148
157
|
if (!this.lastFrame) {
|
|
149
158
|
this.startFrame(startTime);
|
|
150
159
|
return;
|
|
@@ -158,20 +167,27 @@ export class TimelineFrameModel {
|
|
|
158
167
|
(this.lastBeginFrame || this.lastNeedsBeginFrame);
|
|
159
168
|
if (idleTimeEnd > this.lastFrame.startTime) {
|
|
160
169
|
this.lastFrame.idle = true;
|
|
161
|
-
this.startFrame(idleTimeEnd);
|
|
162
|
-
if (this.framePendingActivation) {
|
|
163
|
-
this.commitPendingFrame();
|
|
164
|
-
}
|
|
165
170
|
this.lastBeginFrame = null;
|
|
166
171
|
}
|
|
167
172
|
this.lastNeedsBeginFrame = null;
|
|
168
173
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
174
|
+
|
|
175
|
+
const framesToVisualize = this.beginFrameQueue.processPendingBeginFramesOnDrawFrame(seqId);
|
|
176
|
+
|
|
177
|
+
// Visualize the current frame and all pending frames before it.
|
|
178
|
+
for (const frame of framesToVisualize) {
|
|
179
|
+
const isLastFrameIdle = this.lastFrame.idle;
|
|
180
|
+
|
|
181
|
+
// If |frame| is the first frame after an idle period, the CPU time
|
|
182
|
+
// will be logged ("committed") under |frame| if applicable.
|
|
183
|
+
this.startFrame(frame.startTime);
|
|
184
|
+
if (isLastFrameIdle && this.framePendingActivation) {
|
|
185
|
+
this.commitPendingFrame();
|
|
186
|
+
}
|
|
187
|
+
if (frame.isDropped) {
|
|
188
|
+
this.lastFrame.dropped = true;
|
|
189
|
+
}
|
|
173
190
|
}
|
|
174
|
-
this.startFrame(startTime);
|
|
175
191
|
}
|
|
176
192
|
this.mainFrameCommitted = false;
|
|
177
193
|
}
|
|
@@ -292,21 +308,9 @@ export class TimelineFrameModel {
|
|
|
292
308
|
|
|
293
309
|
const timestamp = event.startTime;
|
|
294
310
|
if (event.name === RecordType.BeginFrame) {
|
|
295
|
-
this.handleBeginFrame(timestamp);
|
|
311
|
+
this.handleBeginFrame(timestamp, event.args['frameSeqId']);
|
|
296
312
|
} else if (event.name === RecordType.DrawFrame) {
|
|
297
|
-
|
|
298
|
-
// Legacy behavior: If DrawFrame is an instant event, then it is not
|
|
299
|
-
// supposed to contain frame presentation info; use the event time of
|
|
300
|
-
// DrawFrame in this case.
|
|
301
|
-
// TODO(mjzhang): Remove this legacy support when the migration to
|
|
302
|
-
// using presentation time as frame boundary is stablized.
|
|
303
|
-
this.handleDrawFrame(timestamp);
|
|
304
|
-
} else if (event.args['presentationTimestamp']) {
|
|
305
|
-
// Current behavior: Use the presentation timestamp. If the non-instant
|
|
306
|
-
// DrawFrame event contains no such timestamp, then the presentation did
|
|
307
|
-
// not happen and therefore the event will not be processed.
|
|
308
|
-
this.handleDrawFrame(event.args['presentationTimestamp'] / 1000);
|
|
309
|
-
}
|
|
313
|
+
this.handleDrawFrame(timestamp, event.args['frameSeqId']);
|
|
310
314
|
} else if (event.name === RecordType.ActivateLayerTree) {
|
|
311
315
|
this.handleActivateLayerTree();
|
|
312
316
|
} else if (event.name === RecordType.RequestMainThreadFrame) {
|
|
@@ -314,7 +318,7 @@ export class TimelineFrameModel {
|
|
|
314
318
|
} else if (event.name === RecordType.NeedsBeginFrameChanged) {
|
|
315
319
|
this.handleNeedFrameChanged(timestamp, event.args['data'] && event.args['data']['needsBeginFrame']);
|
|
316
320
|
} else if (event.name === RecordType.DroppedFrame) {
|
|
317
|
-
this.handleDroppedFrame(timestamp);
|
|
321
|
+
this.handleDroppedFrame(timestamp, event.args['frameSeqId']);
|
|
318
322
|
}
|
|
319
323
|
}
|
|
320
324
|
|
|
@@ -535,3 +539,78 @@ export class PendingFrame {
|
|
|
535
539
|
this.triggerTime = triggerTime;
|
|
536
540
|
}
|
|
537
541
|
}
|
|
542
|
+
|
|
543
|
+
// The parameters of an impl-side BeginFrame.
|
|
544
|
+
class BeginFrameInfo {
|
|
545
|
+
seqId: number;
|
|
546
|
+
startTime: number;
|
|
547
|
+
isDropped: boolean;
|
|
548
|
+
constructor(seqId: number, startTime: number, isDropped: boolean) {
|
|
549
|
+
this.seqId = seqId;
|
|
550
|
+
this.startTime = startTime;
|
|
551
|
+
this.isDropped = isDropped;
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
// A queue of BeginFrames pending visualization.
|
|
556
|
+
// BeginFrames are added into this queue as they occur; later when their
|
|
557
|
+
// corresponding DrawFrames occur (or lack thereof), the BeginFrames are removed
|
|
558
|
+
// from the queue and their timestamps are used for visualization.
|
|
559
|
+
export class TimelineFrameBeginFrameQueue {
|
|
560
|
+
private queueFrames!: number[];
|
|
561
|
+
|
|
562
|
+
// Maps frameSeqId to BeginFrameInfo.
|
|
563
|
+
private mapFrames!: {
|
|
564
|
+
[x: number]: BeginFrameInfo,
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
constructor() {
|
|
568
|
+
this.queueFrames = [];
|
|
569
|
+
this.mapFrames = {};
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
// Add a BeginFrame to the queue, if it does not already exit.
|
|
573
|
+
addFrameIfNotExists(seqId: number, startTime: number, isDropped: boolean): void {
|
|
574
|
+
if (!(seqId in this.mapFrames)) {
|
|
575
|
+
this.mapFrames[seqId] = new BeginFrameInfo(seqId, startTime, isDropped);
|
|
576
|
+
this.queueFrames.push(seqId);
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
// Set a BeginFrame in queue as dropped.
|
|
581
|
+
setDropped(seqId: number, isDropped: boolean): void {
|
|
582
|
+
if (seqId in this.mapFrames) {
|
|
583
|
+
this.mapFrames[seqId].isDropped = isDropped;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
processPendingBeginFramesOnDrawFrame(seqId: number): BeginFrameInfo[] {
|
|
588
|
+
const framesToVisualize: BeginFrameInfo[] = [];
|
|
589
|
+
|
|
590
|
+
// Do not visualize this frame in the rare case where the current DrawFrame
|
|
591
|
+
// does not have a corresponding BeginFrame.
|
|
592
|
+
if (seqId in this.mapFrames) {
|
|
593
|
+
// Pop all BeginFrames before the current frame, and add only the dropped
|
|
594
|
+
// ones in |frames_to_visualize|.
|
|
595
|
+
// Non-dropped frames popped here are BeginFrames that are never
|
|
596
|
+
// drawn (but not considered dropped either for some reason).
|
|
597
|
+
// Those frames do not require an proactive visualization effort and will
|
|
598
|
+
// be naturally presented as continuationss of other frames.
|
|
599
|
+
while (this.queueFrames[0] !== seqId) {
|
|
600
|
+
const currentSeqId = this.queueFrames[0];
|
|
601
|
+
if (this.mapFrames[currentSeqId].isDropped) {
|
|
602
|
+
framesToVisualize.push(this.mapFrames[currentSeqId]);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
delete this.mapFrames[currentSeqId];
|
|
606
|
+
this.queueFrames.shift();
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
// Pop the BeginFrame associated with the current DrawFrame.
|
|
610
|
+
framesToVisualize.push(this.mapFrames[seqId]);
|
|
611
|
+
delete this.mapFrames[seqId];
|
|
612
|
+
this.queueFrames.shift();
|
|
613
|
+
}
|
|
614
|
+
return framesToVisualize;
|
|
615
|
+
}
|
|
616
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
7
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
8
|
+
import type * as DataGrid from '../../ui/components/data_grid/data_grid.js';
|
|
9
|
+
import type * as Protocol from '../../generated/protocol.js';
|
|
10
|
+
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
11
|
+
import * as ApplicationComponents from './components/components.js';
|
|
12
|
+
|
|
13
|
+
import reportingApiReportsViewStyles from './reportingApiReportsView.css.js';
|
|
14
|
+
|
|
15
|
+
const UIStrings = {
|
|
16
|
+
/**
|
|
17
|
+
*@description Placeholder text instructing the user how to display a Reporting API
|
|
18
|
+
*report body (https://developers.google.com/web/updates/2018/09/reportingapi#sending).
|
|
19
|
+
*/
|
|
20
|
+
clickToDisplayBody: 'Click on any report to display its body',
|
|
21
|
+
};
|
|
22
|
+
const str_ = i18n.i18n.registerUIStrings('panels/application/ReportingApiReportsView.ts', UIStrings);
|
|
23
|
+
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
24
|
+
|
|
25
|
+
export class ReportingApiReportsView extends UI.SplitWidget.SplitWidget {
|
|
26
|
+
private readonly reportsGrid = new ApplicationComponents.ReportsGrid.ReportsGrid();
|
|
27
|
+
private reports: Protocol.Network.ReportingApiReport[] = [];
|
|
28
|
+
|
|
29
|
+
constructor(networkManager: SDK.NetworkManager.NetworkManager) {
|
|
30
|
+
super(/* isVertical: */ false, /* secondIsSidebar: */ true);
|
|
31
|
+
const topPanel = new UI.Widget.VBox();
|
|
32
|
+
const bottomPanel = new UI.Widget.VBox();
|
|
33
|
+
const resizer = topPanel.element.createChild('div');
|
|
34
|
+
this.setMainWidget(topPanel);
|
|
35
|
+
this.setSidebarWidget(bottomPanel);
|
|
36
|
+
this.installResizer(resizer);
|
|
37
|
+
|
|
38
|
+
topPanel.contentElement.appendChild(this.reportsGrid);
|
|
39
|
+
this.reportsGrid.addEventListener('cellfocused', this.onFocus.bind(this));
|
|
40
|
+
|
|
41
|
+
bottomPanel.contentElement.classList.add('placeholder');
|
|
42
|
+
const centered = bottomPanel.contentElement.createChild('div');
|
|
43
|
+
centered.textContent = i18nString(UIStrings.clickToDisplayBody);
|
|
44
|
+
|
|
45
|
+
networkManager.addEventListener(
|
|
46
|
+
SDK.NetworkManager.Events.ReportingApiReportAdded, event => this.onReportAdded(event.data), this);
|
|
47
|
+
networkManager.addEventListener(
|
|
48
|
+
SDK.NetworkManager.Events.ReportingApiReportUpdated, event => this.onReportUpdated(event.data), this);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
wasShown(): void {
|
|
52
|
+
super.wasShown();
|
|
53
|
+
const sbw = this.sidebarWidget();
|
|
54
|
+
if (sbw) {
|
|
55
|
+
sbw.registerCSSFiles([reportingApiReportsViewStyles]);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
private onReportAdded(report: Protocol.Network.ReportingApiReport): void {
|
|
60
|
+
this.reports.push(report);
|
|
61
|
+
this.reportsGrid.data = {reports: this.reports};
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
private onReportUpdated(report: Protocol.Network.ReportingApiReport): void {
|
|
65
|
+
const index = this.reports.findIndex(oldReport => oldReport.id === report.id);
|
|
66
|
+
this.reports[index] = report;
|
|
67
|
+
this.reportsGrid.data = {reports: this.reports};
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
private async onFocus(event: Event): Promise<void> {
|
|
71
|
+
const focusedEvent = event as DataGrid.DataGridEvents.BodyCellFocusedEvent;
|
|
72
|
+
const cell = focusedEvent.data.row.cells.find(cell => cell.columnId === 'id');
|
|
73
|
+
const report = cell && this.reports.find(report => report.id === cell.value);
|
|
74
|
+
if (report) {
|
|
75
|
+
const jsonView = await SourceFrame.JSONView.JSONView.createView(JSON.stringify(report.body));
|
|
76
|
+
if (jsonView) {
|
|
77
|
+
this.setSidebarWidget(jsonView);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
getReports(): Protocol.Network.ReportingApiReport[] {
|
|
83
|
+
return this.reports;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
getReportsGrid(): ApplicationComponents.ReportsGrid.ReportsGrid {
|
|
87
|
+
return this.reportsGrid;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -7,7 +7,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
7
7
|
|
|
8
8
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
|
9
9
|
import type {ResourcesPanel} from './ResourcesPanel.js';
|
|
10
|
-
import
|
|
10
|
+
import {ReportingApiView} from './ReportingApiView.js';
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/**
|
|
@@ -19,7 +19,7 @@ const str_ = i18n.i18n.registerUIStrings('panels/application/ReportingApiTreeEle
|
|
|
19
19
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
20
|
|
|
21
21
|
export class ReportingApiTreeElement extends ApplicationPanelTreeElement {
|
|
22
|
-
private view?:
|
|
22
|
+
private view?: ReportingApiView;
|
|
23
23
|
|
|
24
24
|
constructor(storagePanel: ResourcesPanel) {
|
|
25
25
|
super(storagePanel, i18nString(UIStrings.reportingApi), false);
|
|
@@ -34,7 +34,7 @@ export class ReportingApiTreeElement extends ApplicationPanelTreeElement {
|
|
|
34
34
|
onselect(selectedByUser?: boolean): boolean {
|
|
35
35
|
super.onselect(selectedByUser);
|
|
36
36
|
if (!this.view) {
|
|
37
|
-
this.view = new
|
|
37
|
+
this.view = new ReportingApiView();
|
|
38
38
|
}
|
|
39
39
|
this.showView(this.view);
|
|
40
40
|
return false;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as SDK from '../../core/sdk/sdk.js';
|
|
6
|
+
import * as UI from '../../ui/legacy/legacy.js';
|
|
7
|
+
import * as ApplicationComponents from './components/components.js';
|
|
8
|
+
|
|
9
|
+
import {ReportingApiReportsView} from './ReportingApiReportsView.js';
|
|
10
|
+
|
|
11
|
+
export class ReportingApiView extends UI.SplitWidget.SplitWidget {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(/* isVertical: */ false, /* secondIsSidebar: */ true);
|
|
14
|
+
const mainTarget = SDK.TargetManager.TargetManager.instance().mainTarget();
|
|
15
|
+
const networkManager = mainTarget && mainTarget.model(SDK.NetworkManager.NetworkManager);
|
|
16
|
+
if (networkManager) {
|
|
17
|
+
const reportingApiReportsView = new ReportingApiReportsView(networkManager);
|
|
18
|
+
const resizer = reportingApiReportsView.element.createChild('div');
|
|
19
|
+
const reportingApiEndpointsView = new UI.Widget.VBox();
|
|
20
|
+
reportingApiEndpointsView.contentElement.appendChild(new ApplicationComponents.EndpointsGrid.EndpointsGrid());
|
|
21
|
+
this.setMainWidget(reportingApiReportsView);
|
|
22
|
+
this.setSidebarWidget(reportingApiEndpointsView);
|
|
23
|
+
this.installResizer(resizer);
|
|
24
|
+
networkManager.enableReportingApi();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -15,6 +15,7 @@ import * as DOMStorageModel from './DOMStorageModel.js';
|
|
|
15
15
|
import * as IndexedDBModel from './IndexedDBModel.js';
|
|
16
16
|
import * as IndexedDBViews from './IndexedDBViews.js';
|
|
17
17
|
import * as OpenedWindowDetailsView from './OpenedWindowDetailsView.js';
|
|
18
|
+
import * as ReportingApiReportsView from './ReportingApiReportsView.js';
|
|
18
19
|
import * as ResourcesPanel from './ResourcesPanel.js';
|
|
19
20
|
import * as ServiceWorkerCacheViews from './ServiceWorkerCacheViews.js';
|
|
20
21
|
import * as ServiceWorkersView from './ServiceWorkersView.js';
|
|
@@ -36,6 +37,7 @@ export {
|
|
|
36
37
|
IndexedDBModel,
|
|
37
38
|
IndexedDBViews,
|
|
38
39
|
OpenedWindowDetailsView,
|
|
40
|
+
ReportingApiReportsView,
|
|
39
41
|
ResourcesPanel,
|
|
40
42
|
ServiceWorkerCacheViews,
|
|
41
43
|
ServiceWorkersView,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
+
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
7
|
+
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
8
|
+
|
|
9
|
+
import reportingApiGridStyles from './reportingApiGrid.css.js';
|
|
10
|
+
|
|
11
|
+
const UIStrings = {
|
|
12
|
+
/**
|
|
13
|
+
*@description Placeholder text when there are no Reporting API endpoints.
|
|
14
|
+
*(https://developers.google.com/web/updates/2018/09/reportingapi#tldr)
|
|
15
|
+
*/
|
|
16
|
+
noEndpointsToDisplay: 'No endpoints to display',
|
|
17
|
+
};
|
|
18
|
+
const str_ = i18n.i18n.registerUIStrings('panels/application/components/EndpointsGrid.ts', UIStrings);
|
|
19
|
+
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
20
|
+
|
|
21
|
+
const {render, html} = LitHtml;
|
|
22
|
+
|
|
23
|
+
export class EndpointsGrid extends HTMLElement {
|
|
24
|
+
static readonly litTagName = LitHtml.literal`devtools-resources-endpoints-grid`;
|
|
25
|
+
|
|
26
|
+
private readonly shadow = this.attachShadow({mode: 'open'});
|
|
27
|
+
|
|
28
|
+
connectedCallback(): void {
|
|
29
|
+
this.shadow.adoptedStyleSheets = [reportingApiGridStyles];
|
|
30
|
+
this.render();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// TODO(crbug.com/1200732): Display info about currently configured endpoints
|
|
34
|
+
private render(): void {
|
|
35
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
|
36
|
+
// clang-format off
|
|
37
|
+
render(html`
|
|
38
|
+
<div class="reporting-container">
|
|
39
|
+
<div class="reporting-header">Endpoints</div>
|
|
40
|
+
<div class="reporting-placeholder">
|
|
41
|
+
<div>${i18nString(UIStrings.noEndpointsToDisplay)}</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
`, this.shadow);
|
|
45
|
+
// clang-format on
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
ComponentHelpers.CustomElements.defineComponent('devtools-resources-endpoints-grid', EndpointsGrid);
|
|
50
|
+
|
|
51
|
+
declare global {
|
|
52
|
+
interface HTMLElementTagNameMap {
|
|
53
|
+
'devtools-resources-endpoints-grid': EndpointsGrid;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
// Copyright 2021 The Chromium Authors. All rights reserved.
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
6
|
+
import * as DataGrid from '../../../ui/components/data_grid/data_grid.js';
|
|
7
|
+
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
|
8
|
+
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
|
9
|
+
|
|
10
|
+
import type * as Protocol from '../../../generated/protocol.js';
|
|
11
|
+
import * as Root from '../../../core/root/root.js';
|
|
12
|
+
|
|
13
|
+
import reportingApiGridStyles from './reportingApiGrid.css.js';
|
|
14
|
+
|
|
15
|
+
const UIStrings = {
|
|
16
|
+
/**
|
|
17
|
+
*@description Placeholder text when there are no Reporting API reports.
|
|
18
|
+
*(https://developers.google.com/web/updates/2018/09/reportingapi#sending)
|
|
19
|
+
*/
|
|
20
|
+
noReportsToDisplay: 'No reports to display',
|
|
21
|
+
};
|
|
22
|
+
const str_ = i18n.i18n.registerUIStrings('panels/application/components/ReportsGrid.ts', UIStrings);
|
|
23
|
+
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
24
|
+
|
|
25
|
+
const {render, html} = LitHtml;
|
|
26
|
+
|
|
27
|
+
export interface ReportsGridData {
|
|
28
|
+
reports: Protocol.Network.ReportingApiReport[];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class ReportsGrid extends HTMLElement {
|
|
32
|
+
static readonly litTagName = LitHtml.literal`devtools-resources-reports-grid`;
|
|
33
|
+
|
|
34
|
+
private readonly shadow = this.attachShadow({mode: 'open'});
|
|
35
|
+
private reports: Protocol.Network.ReportingApiReport[] = [];
|
|
36
|
+
private protocolMonitorExperimentEnabled = false;
|
|
37
|
+
|
|
38
|
+
connectedCallback(): void {
|
|
39
|
+
this.shadow.adoptedStyleSheets = [reportingApiGridStyles];
|
|
40
|
+
this.protocolMonitorExperimentEnabled = Root.Runtime.experiments.isEnabled('protocolMonitor');
|
|
41
|
+
this.render();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
set data(data: ReportsGridData) {
|
|
45
|
+
this.reports = data.reports;
|
|
46
|
+
this.render();
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
private render(): void {
|
|
50
|
+
const reportsGridData: DataGrid.DataGridController.DataGridControllerData = {
|
|
51
|
+
columns: [
|
|
52
|
+
{
|
|
53
|
+
id: 'url',
|
|
54
|
+
title: i18n.i18n.lockedString('URL'),
|
|
55
|
+
widthWeighting: 30,
|
|
56
|
+
hideable: false,
|
|
57
|
+
visible: true,
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 'type',
|
|
61
|
+
title: i18n.i18n.lockedString('Type'),
|
|
62
|
+
widthWeighting: 10,
|
|
63
|
+
hideable: false,
|
|
64
|
+
visible: true,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'status',
|
|
68
|
+
title: i18n.i18n.lockedString('Status'),
|
|
69
|
+
widthWeighting: 10,
|
|
70
|
+
hideable: false,
|
|
71
|
+
visible: true,
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: 'destination',
|
|
75
|
+
title: i18n.i18n.lockedString('Destination'),
|
|
76
|
+
widthWeighting: 10,
|
|
77
|
+
hideable: false,
|
|
78
|
+
visible: true,
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: 'timestamp',
|
|
82
|
+
title: i18n.i18n.lockedString('Timestamp'),
|
|
83
|
+
widthWeighting: 20,
|
|
84
|
+
hideable: false,
|
|
85
|
+
visible: true,
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
id: 'body',
|
|
89
|
+
title: i18n.i18n.lockedString('Body'),
|
|
90
|
+
widthWeighting: 20,
|
|
91
|
+
hideable: false,
|
|
92
|
+
visible: true,
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
rows: this.buildReportRows(),
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
if (this.protocolMonitorExperimentEnabled) {
|
|
99
|
+
reportsGridData.columns.unshift(
|
|
100
|
+
{id: 'id', title: 'ID', widthWeighting: 30, hideable: false, visible: true},
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
|
105
|
+
// clang-format off
|
|
106
|
+
render(html`
|
|
107
|
+
<div class="reporting-container">
|
|
108
|
+
<div class="reporting-header">Reports</div>
|
|
109
|
+
${this.reports.length > 0 ? html`
|
|
110
|
+
<${DataGrid.DataGridController.DataGridController.litTagName} .data=${
|
|
111
|
+
reportsGridData as DataGrid.DataGridController.DataGridControllerData}>
|
|
112
|
+
</${DataGrid.DataGridController.DataGridController.litTagName}>
|
|
113
|
+
` : html`
|
|
114
|
+
<div class="reporting-placeholder">
|
|
115
|
+
<div>${i18nString(UIStrings.noReportsToDisplay)}</div>
|
|
116
|
+
</div>
|
|
117
|
+
`}
|
|
118
|
+
</div>
|
|
119
|
+
`, this.shadow);
|
|
120
|
+
// clang-format on
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
private buildReportRows(): DataGrid.DataGridUtils.Row[] {
|
|
124
|
+
return this.reports.map(report => ({
|
|
125
|
+
cells: [
|
|
126
|
+
{columnId: 'id', value: report.id},
|
|
127
|
+
{columnId: 'url', value: report.initiatorUrl},
|
|
128
|
+
{columnId: 'type', value: report.type},
|
|
129
|
+
{columnId: 'status', value: report.status},
|
|
130
|
+
{columnId: 'destination', value: report.destination},
|
|
131
|
+
{columnId: 'timestamp', value: new Date(report.timestamp * 1000).toLocaleString()},
|
|
132
|
+
{columnId: 'body', value: JSON.stringify(report.body)},
|
|
133
|
+
],
|
|
134
|
+
}));
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
ComponentHelpers.CustomElements.defineComponent('devtools-resources-reports-grid', ReportsGrid);
|
|
139
|
+
|
|
140
|
+
declare global {
|
|
141
|
+
interface HTMLElementTagNameMap {
|
|
142
|
+
'devtools-resources-reports-grid': ReportsGrid;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as EndpointsGrid from './EndpointsGrid.js';
|
|
5
6
|
import * as FrameDetailsView from './FrameDetailsView.js';
|
|
6
7
|
import * as OriginTrialTreeView from './OriginTrialTreeView.js';
|
|
7
|
-
import * as
|
|
8
|
+
import * as ReportsGrid from './ReportsGrid.js';
|
|
8
9
|
import * as StackTrace from './StackTrace.js';
|
|
9
10
|
import * as TrustTokensView from './TrustTokensView.js';
|
|
10
11
|
|
|
11
12
|
export {
|
|
13
|
+
EndpointsGrid,
|
|
12
14
|
FrameDetailsView,
|
|
13
15
|
OriginTrialTreeView,
|
|
14
|
-
|
|
16
|
+
ReportsGrid,
|
|
15
17
|
StackTrace,
|
|
16
18
|
TrustTokensView,
|
|
17
19
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 The Chromium Authors. All rights reserved.
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
overflow: auto;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.reporting-container {
|
|
13
|
+
height: 100%;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.reporting-header {
|
|
19
|
+
font-size: 15px;
|
|
20
|
+
background-color: var(--color-background-elevation-1);
|
|
21
|
+
padding: 1px 4px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.reporting-placeholder {
|
|
25
|
+
flex-grow: 1;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
font-size: 13px;
|
|
30
|
+
color: var(--color-text-secondary);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
devtools-data-grid-controller {
|
|
34
|
+
border: 1px solid var(--color-details-hairline);
|
|
35
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2021 The Chromium Authors. All rights reserved.
|
|
3
|
+
* Use of this source code is governed by a BSD-style license that can be
|
|
4
|
+
* found in the LICENSE file.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.placeholder {
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
font-size: 13px;
|
|
12
|
+
color: var(--color-text-secondary);
|
|
13
|
+
}
|
|
@@ -93,6 +93,10 @@ const UIStrings = {
|
|
|
93
93
|
*/
|
|
94
94
|
groupSimilarMessagesInConsole: 'Group similar messages in console',
|
|
95
95
|
/**
|
|
96
|
+
*@description Title of a setting under the Console category that can be invoked through the Command Menu
|
|
97
|
+
*/
|
|
98
|
+
showCorsErrorsInConsole: 'Show `CORS` errors in console',
|
|
99
|
+
/**
|
|
96
100
|
* @description Tooltip for the the console sidebar toggle in the Console panel. Command to
|
|
97
101
|
* open/show the sidebar.
|
|
98
102
|
*/
|
|
@@ -257,6 +261,7 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
257
261
|
private readonly showSettingsPaneButton: UI.Toolbar.ToolbarSettingToggle;
|
|
258
262
|
private readonly progressToolbarItem: UI.Toolbar.ToolbarItem;
|
|
259
263
|
private readonly groupSimilarSetting: Common.Settings.Setting<boolean>;
|
|
264
|
+
private readonly showCorsErrorsSetting: Common.Settings.Setting<boolean>;
|
|
260
265
|
private readonly preserveLogCheckbox: UI.Toolbar.ToolbarSettingCheckbox;
|
|
261
266
|
private readonly hideNetworkMessagesCheckbox: UI.Toolbar.ToolbarSettingCheckbox;
|
|
262
267
|
private readonly timestampsSetting: Common.Settings.Setting<unknown>;
|
|
@@ -366,6 +371,13 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
366
371
|
this.groupSimilarSetting.addChangeListener(() => this.updateMessageList());
|
|
367
372
|
const groupSimilarToggle = new UI.Toolbar.ToolbarSettingCheckbox(
|
|
368
373
|
this.groupSimilarSetting, i18nString(UIStrings.groupSimilarMessagesInConsole));
|
|
374
|
+
this.showCorsErrorsSetting = Common.Settings.Settings.instance().moduleSetting('consoleShowsCorsErrors');
|
|
375
|
+
this.showCorsErrorsSetting.addChangeListener(() => {
|
|
376
|
+
Host.userMetrics.showCorsErrorsSettingChanged(this.showCorsErrorsSetting.get());
|
|
377
|
+
this.updateMessageList();
|
|
378
|
+
});
|
|
379
|
+
const showCorsErrorsToggle = new UI.Toolbar.ToolbarSettingCheckbox(
|
|
380
|
+
this.showCorsErrorsSetting, i18nString(UIStrings.showCorsErrorsInConsole));
|
|
369
381
|
|
|
370
382
|
const toolbar = new UI.Toolbar.Toolbar('console-main-toolbar', this.consoleToolbarContainer);
|
|
371
383
|
toolbar.makeWrappable(true);
|
|
@@ -428,6 +440,7 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
428
440
|
settingsToolbarLeft.appendToolbarItem(this.preserveLogCheckbox);
|
|
429
441
|
settingsToolbarLeft.appendToolbarItem(filterByExecutionContextCheckbox);
|
|
430
442
|
settingsToolbarLeft.appendToolbarItem(groupSimilarToggle);
|
|
443
|
+
settingsToolbarLeft.appendToolbarItem(showCorsErrorsToggle);
|
|
431
444
|
|
|
432
445
|
const settingsToolbarRight = new UI.Toolbar.Toolbar('', settingsPane.element);
|
|
433
446
|
settingsToolbarRight.makeVertical();
|
|
@@ -862,6 +875,10 @@ export class ConsoleView extends UI.Widget.VBox implements UI.SearchableView.Sea
|
|
|
862
875
|
}
|
|
863
876
|
|
|
864
877
|
private appendMessageToEnd(viewMessage: ConsoleViewMessage, preventCollapse?: boolean): void {
|
|
878
|
+
if (viewMessage.consoleMessage().category === Protocol.Log.LogEntryCategory.Cors &&
|
|
879
|
+
!this.showCorsErrorsSetting.get()) {
|
|
880
|
+
return;
|
|
881
|
+
}
|
|
865
882
|
if (!this.shouldMessageBeVisible(viewMessage)) {
|
|
866
883
|
this.hiddenByFilterCount++;
|
|
867
884
|
return;
|