chrome-devtools-frontend 1.0.961109 → 1.0.963415
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +5 -4
- package/AUTHORS +1 -0
- package/config/gni/devtools_grd_files.gni +1 -4
- package/front_end/core/common/ParsedURL.ts +12 -10
- package/front_end/core/host/UserMetrics.ts +2 -1
- package/front_end/core/i18n/locales/en-US.json +6 -24
- package/front_end/core/i18n/locales/en-XL.json +6 -24
- package/front_end/core/protocol_client/InspectorBackend.ts +7 -7
- package/front_end/core/root/Runtime.ts +2 -0
- package/front_end/core/sdk/CSSProperty.ts +22 -110
- package/front_end/core/sdk/DebuggerModel.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +7 -2
- package/front_end/generated/protocol-tsconfig.json +2 -2
- package/front_end/generated/protocol.ts +16772 -0
- package/front_end/models/emulation/EmulatedDevices.ts +3 -3
- package/front_end/models/issues_manager/IssuesManager.ts +0 -5
- package/front_end/models/issues_manager/issues_manager.ts +0 -2
- package/front_end/models/persistence/IsolatedFileSystem.ts +3 -2
- package/front_end/models/persistence/PersistenceActions.ts +2 -2
- package/front_end/models/text_utils/text_utils-legacy.ts +0 -5
- package/front_end/models/text_utils/text_utils.ts +0 -2
- package/front_end/panels/application/AppManifestView.ts +7 -1
- package/front_end/panels/application/components/FrameDetailsView.ts +6 -1
- package/front_end/panels/application/components/PermissionsPolicySection.ts +16 -4
- package/front_end/panels/elements/StylePropertyTreeElement.ts +13 -0
- package/front_end/panels/elements/StylesSidebarPane.ts +67 -0
- package/front_end/panels/elements/stylesSectionTree.css +28 -0
- package/front_end/panels/issues/IssueAggregator.ts +0 -10
- package/front_end/panels/issues/IssueView.ts +0 -2
- package/front_end/panels/media/PlayerListView.ts +2 -0
- package/front_end/panels/media/playerListView.css +3 -0
- package/front_end/panels/sensors/sensors-meta.ts +2 -2
- package/front_end/panels/sources/NavigatorView.ts +1 -1
- package/front_end/third_party/additional_readme_paths.json +1 -0
- package/front_end/ui/components/diff_view/DiffView.ts +2 -2
- package/front_end/ui/components/docs/icon_button/basic.ts +2 -7
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +8 -1
- package/front_end/ui/components/text_editor/config.ts +3 -2
- package/front_end/ui/legacy/GlassPane.ts +2 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/softDropDownButton.css +2 -0
- package/front_end/ui/legacy/themeColors.css +2 -0
- package/front_end/ui/legacy/toolbar.css +6 -0
- package/package.json +1 -1
- package/scripts/build/assert_third_party_readmes.py +2 -1
- package/scripts/build/ninja/devtools_entrypoint.gni +25 -17
- package/scripts/devtools_paths.py +4 -0
- package/scripts/protocol_typescript/protocol_dts_generator.ts +4 -9
- package/front_end/generated/protocol.d.ts +0 -16771
- package/front_end/models/issues_manager/WasmCrossOriginModuleSharingIssue.ts +0 -67
- package/front_end/models/issues_manager/descriptions/wasmCrossOriginModuleSharing.md +0 -5
- package/front_end/models/text_utils/CodeMirrorUtils.ts +0 -77
- package/front_end/panels/issues/WasmCrossOriginModuleSharingAffectedResourcesView.ts +0 -90
@@ -660,7 +660,7 @@ const emulatedDevices = [
|
|
660
660
|
},
|
661
661
|
'capabilities': ['touch', 'mobile'],
|
662
662
|
'user-agent':
|
663
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
663
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
664
664
|
'type': 'phone',
|
665
665
|
},
|
666
666
|
{
|
@@ -680,7 +680,7 @@ const emulatedDevices = [
|
|
680
680
|
},
|
681
681
|
'capabilities': ['touch', 'mobile'],
|
682
682
|
'user-agent':
|
683
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
683
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
684
684
|
'type': 'phone',
|
685
685
|
},
|
686
686
|
{
|
@@ -700,7 +700,7 @@ const emulatedDevices = [
|
|
700
700
|
},
|
701
701
|
'capabilities': ['touch', 'mobile'],
|
702
702
|
'user-agent':
|
703
|
-
'Mozilla/5.0 (iPhone; CPU iPhone OS
|
703
|
+
'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1',
|
704
704
|
'type': 'phone',
|
705
705
|
},
|
706
706
|
{
|
@@ -25,7 +25,6 @@ import {SameSiteCookieIssue} from './SameSiteCookieIssue.js';
|
|
25
25
|
import {SharedArrayBufferIssue} from './SharedArrayBufferIssue.js';
|
26
26
|
import {SourceFrameIssuesManager} from './SourceFrameIssuesManager.js';
|
27
27
|
import {TrustedWebActivityIssue} from './TrustedWebActivityIssue.js';
|
28
|
-
import {WasmCrossOriginModuleSharingIssue} from './WasmCrossOriginModuleSharingIssue.js';
|
29
28
|
|
30
29
|
export {Events} from './IssuesManagerEvents.js';
|
31
30
|
|
@@ -93,10 +92,6 @@ const issueCodeHandlers = new Map<
|
|
93
92
|
Protocol.Audits.InspectorIssueCode.AttributionReportingIssue,
|
94
93
|
AttributionReportingIssue.fromInspectorIssue,
|
95
94
|
],
|
96
|
-
[
|
97
|
-
Protocol.Audits.InspectorIssueCode.WasmCrossOriginModuleSharingIssue,
|
98
|
-
WasmCrossOriginModuleSharingIssue.fromInspectorIssue,
|
99
|
-
],
|
100
95
|
[
|
101
96
|
Protocol.Audits.InspectorIssueCode.GenericIssue,
|
102
97
|
GenericIssue.fromInspectorIssue,
|
@@ -24,7 +24,6 @@ import * as SameSiteCookieIssue from './SameSiteCookieIssue.js';
|
|
24
24
|
import * as SharedArrayBufferIssue from './SharedArrayBufferIssue.js';
|
25
25
|
import * as SourceFrameIssuesManager from './SourceFrameIssuesManager.js';
|
26
26
|
import * as TrustedWebActivityIssue from './TrustedWebActivityIssue.js';
|
27
|
-
import * as WasmCrossOriginModuleSharingIssue from './WasmCrossOriginModuleSharingIssue.js';
|
28
27
|
|
29
28
|
export {
|
30
29
|
AttributionReportingIssue,
|
@@ -49,5 +48,4 @@ export {
|
|
49
48
|
SharedArrayBufferIssue,
|
50
49
|
SourceFrameIssuesManager,
|
51
50
|
TrustedWebActivityIssue,
|
52
|
-
WasmCrossOriginModuleSharingIssue,
|
53
51
|
};
|
@@ -176,7 +176,7 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
176
176
|
this.initialGitFoldersInternal.add(parentFolder);
|
177
177
|
}
|
178
178
|
if (this.isFileExcluded(entry.fullPath + '/')) {
|
179
|
-
this.excludedEmbedderFolders.push(Common.ParsedURL.ParsedURL.
|
179
|
+
this.excludedEmbedderFolders.push(Common.ParsedURL.ParsedURL.urlToRawPathString(
|
180
180
|
this.path() + entry.fullPath as Platform.DevToolsPath.UrlString, Host.Platform.isWin()));
|
181
181
|
continue;
|
182
182
|
}
|
@@ -555,7 +555,8 @@ export class IsolatedFileSystem extends PlatformFileSystem {
|
|
555
555
|
|
556
556
|
tooltipForURL(url: string): string {
|
557
557
|
const path = Platform.StringUtilities.trimMiddle(
|
558
|
-
Common.ParsedURL.ParsedURL.
|
558
|
+
Common.ParsedURL.ParsedURL.urlToRawPathString(url as Platform.DevToolsPath.UrlString, Host.Platform.isWin()),
|
559
|
+
150);
|
559
560
|
return i18nString(UIStrings.linkedToS, {PH1: path});
|
560
561
|
}
|
561
562
|
|
@@ -94,8 +94,8 @@ export class ContextMenuProvider implements UI.ContextMenu.Provider {
|
|
94
94
|
const fileURL = binding ? binding.fileSystem.contentURL() : contentProvider.contentURL();
|
95
95
|
if (fileURL.startsWith('file://')) {
|
96
96
|
// TODO(crbug.com/1253323): Cast to UrlString will be removed when migration to branded types is complete.
|
97
|
-
const path =
|
98
|
-
|
97
|
+
const path = Common.ParsedURL.ParsedURL.urlToRawPathString(
|
98
|
+
fileURL as Platform.DevToolsPath.UrlString, Host.Platform.isWin());
|
99
99
|
contextMenu.revealSection().appendItem(
|
100
100
|
i18nString(UIStrings.openInContainingFolder),
|
101
101
|
() => Host.InspectorFrontendHost.InspectorFrontendHostInstance.showItemInFolder(path));
|
@@ -45,8 +45,3 @@ TextUtils.BalancedJSONTokenizer = TextUtilsModule.TextUtils.BalancedJSONTokenize
|
|
45
45
|
TextUtils.TokenizerFactory = TextUtilsModule.TextUtils.TokenizerFactory;
|
46
46
|
|
47
47
|
TextUtils.isMinified = TextUtilsModule.TextUtils.isMinified;
|
48
|
-
|
49
|
-
TextUtils.CodeMirrorUtils = {};
|
50
|
-
|
51
|
-
/** @constructor */
|
52
|
-
TextUtils.CodeMirrorUtils.TokenizerFactory = TextUtilsModule.CodeMirrorUtils.TokenizerFactory;
|
@@ -2,7 +2,6 @@
|
|
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 CodeMirrorUtils from './CodeMirrorUtils.js';
|
6
5
|
import * as ContentProvider from './ContentProvider.js';
|
7
6
|
import * as StaticContentProvider from './StaticContentProvider.js';
|
8
7
|
import * as Text from './Text.js';
|
@@ -11,7 +10,6 @@ import * as TextRange from './TextRange.js';
|
|
11
10
|
import * as TextUtils from './TextUtils.js';
|
12
11
|
|
13
12
|
export {
|
14
|
-
CodeMirrorUtils,
|
15
13
|
ContentProvider,
|
16
14
|
StaticContentProvider,
|
17
15
|
Text,
|
@@ -617,7 +617,13 @@ export class AppManifestView extends UI.Widget.VBox implements SDK.TargetManager
|
|
617
617
|
const copyButton = new IconButton.IconButton.IconButton();
|
618
618
|
copyButton.title = i18nString(UIStrings.copyToClipboard);
|
619
619
|
copyButton.data = {
|
620
|
-
groups: [{
|
620
|
+
groups: [{
|
621
|
+
iconName: 'copy_icon',
|
622
|
+
iconHeight: '12px',
|
623
|
+
iconWidth: '12px',
|
624
|
+
text: '',
|
625
|
+
iconColor: 'var(--color-text-primary)',
|
626
|
+
}],
|
621
627
|
clickHandler: (): void => {
|
622
628
|
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(recommendedId);
|
623
629
|
},
|
@@ -236,6 +236,10 @@ const UIStrings = {
|
|
236
236
|
*/
|
237
237
|
createdByAdScriptExplanation:
|
238
238
|
'There was an ad script in the `(async) stack` when this frame was created. Examining the creation `stack trace` of this frame might provide more insight.',
|
239
|
+
/**
|
240
|
+
*@description Label for a button which when clicked causes some information to be refreshed/updated.
|
241
|
+
*/
|
242
|
+
refresh: 'Refresh',
|
239
243
|
};
|
240
244
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/FrameDetailsView.ts', UIStrings);
|
241
245
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -337,7 +341,8 @@ export class FrameDetailsReportView extends HTMLElement {
|
|
337
341
|
groups: [
|
338
342
|
{
|
339
343
|
iconName: 'refresh_12x12_icon',
|
340
|
-
text:
|
344
|
+
text: i18nString(UIStrings.refresh),
|
345
|
+
iconColor: 'var(--color-text-primary)',
|
341
346
|
} as IconButton.IconButton.IconWithTextData,
|
342
347
|
],
|
343
348
|
} as IconButton.IconButton.IconButtonData}>
|
@@ -52,6 +52,10 @@ const UIStrings = {
|
|
52
52
|
*@description Text describing that a specific feature is blocked by a Permissions Policy specified in a request header.
|
53
53
|
*/
|
54
54
|
disabledByHeader: 'disabled by "`Permissions-Policy`" header',
|
55
|
+
/**
|
56
|
+
*@description Text describing that a specific feature is blocked by virtue of being inside a fenced frame tree.
|
57
|
+
*/
|
58
|
+
disabledByFencedFrame: 'disabled inside a `fencedframe`',
|
55
59
|
};
|
56
60
|
const str_ = i18n.i18n.registerUIStrings('panels/application/components/PermissionsPolicySection.ts', UIStrings);
|
57
61
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
@@ -144,10 +148,18 @@ export class PermissionsPolicySection extends HTMLElement {
|
|
144
148
|
const resource = frame && frame.resourceForURL(frame.url);
|
145
149
|
const linkTargetRequest =
|
146
150
|
blockReason === Protocol.Page.PermissionsPolicyBlockReason.Header && resource && resource.request;
|
147
|
-
const blockReasonText =
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
+
const blockReasonText = ((): String => {
|
152
|
+
switch (blockReason) {
|
153
|
+
case Protocol.Page.PermissionsPolicyBlockReason.IframeAttribute:
|
154
|
+
return i18nString(UIStrings.disabledByIframe);
|
155
|
+
case Protocol.Page.PermissionsPolicyBlockReason.Header:
|
156
|
+
return i18nString(UIStrings.disabledByHeader);
|
157
|
+
case Protocol.Page.PermissionsPolicyBlockReason.InFencedFrameTree:
|
158
|
+
return i18nString(UIStrings.disabledByFencedFrame);
|
159
|
+
default:
|
160
|
+
return '';
|
161
|
+
}
|
162
|
+
})();
|
151
163
|
const revealHeader = async(): Promise<void> => {
|
152
164
|
if (!linkTargetRequest) {
|
153
165
|
return;
|
@@ -477,6 +477,8 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
477
477
|
} else {
|
478
478
|
this.listItemElement.classList.remove('disabled');
|
479
479
|
}
|
480
|
+
|
481
|
+
this.listItemElement.classList.toggle('changed', this.parentPane().isPropertyChanged(this.property));
|
480
482
|
}
|
481
483
|
|
482
484
|
node(): SDK.DOMModel.DOMNode|null {
|
@@ -714,6 +716,14 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
714
716
|
UI.ARIAUtils.setAccessibleName(
|
715
717
|
enabledCheckboxElement, `${this.nameElement.textContent} ${this.valueElement.textContent}`);
|
716
718
|
}
|
719
|
+
|
720
|
+
const copyIcon = UI.Icon.Icon.create('largeicon-copy', 'copy');
|
721
|
+
UI.Tooltip.Tooltip.install(copyIcon, i18nString(UIStrings.copyDeclaration));
|
722
|
+
copyIcon.addEventListener('click', () => {
|
723
|
+
const propertyText = `${this.property.name}: ${this.property.value};`;
|
724
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.copyText(propertyText);
|
725
|
+
});
|
726
|
+
this.listItemElement.append(copyIcon);
|
717
727
|
this.listItemElement.insertBefore(enabledCheckboxElement, this.listItemElement.firstChild);
|
718
728
|
}
|
719
729
|
}
|
@@ -1470,6 +1480,9 @@ export class StylePropertyTreeElement extends UI.TreeOutline.TreeElement {
|
|
1470
1480
|
this.styleTextAppliedForTest();
|
1471
1481
|
return;
|
1472
1482
|
}
|
1483
|
+
if (updatedProperty) {
|
1484
|
+
this.listItemElement.classList.toggle('changed', this.parentPane().isPropertyChanged(updatedProperty));
|
1485
|
+
}
|
1473
1486
|
|
1474
1487
|
this.matchedStylesInternal.resetActiveProperties();
|
1475
1488
|
this.hasBeenEditedIncrementally = true;
|
@@ -40,6 +40,9 @@ import * as SDK from '../../core/sdk/sdk.js';
|
|
40
40
|
import * as Protocol from '../../generated/protocol.js';
|
41
41
|
import * as Bindings from '../../models/bindings/bindings.js';
|
42
42
|
import * as TextUtils from '../../models/text_utils/text_utils.js';
|
43
|
+
import * as Workspace from '../../models/workspace/workspace.js';
|
44
|
+
import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js';
|
45
|
+
import * as DiffView from '../../ui/components/diff_view/diff_view.js';
|
43
46
|
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
44
47
|
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
45
48
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
@@ -231,6 +234,8 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
231
234
|
private readonly resizeThrottler: Common.Throttler.Throttler;
|
232
235
|
private readonly imagePreviewPopover: ImagePreviewPopover;
|
233
236
|
activeCSSAngle: InlineEditor.CSSAngle.CSSAngle|null;
|
237
|
+
#changedLinesByURLs: Map<string, Set<number>> = new Map();
|
238
|
+
#uiSourceCodeToDiffCallbacks: Map<Workspace.UISourceCode.UISourceCode, () => void> = new Map();
|
234
239
|
|
235
240
|
static instance(): StylesSidebarPane {
|
236
241
|
if (!_stylesSidebarPaneInstance) {
|
@@ -834,7 +839,14 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
834
839
|
const blocks = [new SectionBlock(null)];
|
835
840
|
let sectionIdx = 0;
|
836
841
|
let lastParentNode: SDK.DOMModel.DOMNode|null = null;
|
842
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES)) {
|
843
|
+
this.resetChangedLinesTracking();
|
844
|
+
}
|
837
845
|
for (const style of matchedStyles.nodeStyles()) {
|
846
|
+
if (Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES) && style.parentRule) {
|
847
|
+
await this.trackChangedLines(style.parentRule.resourceURL());
|
848
|
+
}
|
849
|
+
|
838
850
|
const parentNode = matchedStyles.isInherited(style) ? matchedStyles.nodeForStyle(style) : null;
|
839
851
|
if (parentNode && parentNode !== lastParentNode) {
|
840
852
|
lastParentNode = parentNode;
|
@@ -987,6 +999,61 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
987
999
|
return sections;
|
988
1000
|
}
|
989
1001
|
|
1002
|
+
resetChangedLinesTracking(): void {
|
1003
|
+
this.#changedLinesByURLs.clear();
|
1004
|
+
for (const [uiSourceCode, callback] of this.#uiSourceCodeToDiffCallbacks) {
|
1005
|
+
WorkspaceDiff.WorkspaceDiff.workspaceDiff().unsubscribeFromDiffChange(uiSourceCode, callback);
|
1006
|
+
}
|
1007
|
+
this.#uiSourceCodeToDiffCallbacks.clear();
|
1008
|
+
}
|
1009
|
+
|
1010
|
+
async trackChangedLines(url: string): Promise<void> {
|
1011
|
+
if (!url || this.#changedLinesByURLs.has(url)) {
|
1012
|
+
return;
|
1013
|
+
}
|
1014
|
+
const uiSourceCode = Workspace.Workspace.WorkspaceImpl.instance().uiSourceCodeForURL(url);
|
1015
|
+
if (uiSourceCode) {
|
1016
|
+
await this.refreshChangedLines(uiSourceCode);
|
1017
|
+
const callback = this.refreshChangedLines.bind(this, uiSourceCode);
|
1018
|
+
WorkspaceDiff.WorkspaceDiff.workspaceDiff().subscribeToDiffChange(uiSourceCode, callback);
|
1019
|
+
this.#uiSourceCodeToDiffCallbacks.set(uiSourceCode, callback);
|
1020
|
+
}
|
1021
|
+
}
|
1022
|
+
|
1023
|
+
isPropertyChanged(property: SDK.CSSProperty.CSSProperty): boolean {
|
1024
|
+
if (!Root.Runtime.experiments.isEnabled(Root.Runtime.ExperimentName.STYLES_PANE_CSS_CHANGES)) {
|
1025
|
+
return false;
|
1026
|
+
}
|
1027
|
+
const url = property.ownerStyle.parentRule?.resourceURL();
|
1028
|
+
if (!url) {
|
1029
|
+
return false;
|
1030
|
+
}
|
1031
|
+
const changedLines = this.#changedLinesByURLs.get(url);
|
1032
|
+
if (!changedLines) {
|
1033
|
+
return false;
|
1034
|
+
}
|
1035
|
+
const uiLocation = Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance().propertyUILocation(property, true);
|
1036
|
+
if (!uiLocation) {
|
1037
|
+
return false;
|
1038
|
+
}
|
1039
|
+
// UILocation's lineNumber starts at 0, but changedLines start at 1.
|
1040
|
+
return changedLines.has(uiLocation.lineNumber + 1);
|
1041
|
+
}
|
1042
|
+
|
1043
|
+
private async refreshChangedLines(uiSourceCode: Workspace.UISourceCode.UISourceCode): Promise<void> {
|
1044
|
+
const diff = await WorkspaceDiff.WorkspaceDiff.workspaceDiff().requestDiff(uiSourceCode, {shouldFormatDiff: true});
|
1045
|
+
const changedLines = new Set<number>();
|
1046
|
+
if (diff && diff.length > 0) {
|
1047
|
+
const {rows} = DiffView.DiffView.buildDiffRows(diff);
|
1048
|
+
for (const row of rows) {
|
1049
|
+
if (row.type === DiffView.DiffView.RowType.Addition) {
|
1050
|
+
changedLines.add(row.currentLineNumber);
|
1051
|
+
}
|
1052
|
+
}
|
1053
|
+
}
|
1054
|
+
this.#changedLinesByURLs.set(uiSourceCode.url(), changedLines);
|
1055
|
+
}
|
1056
|
+
|
990
1057
|
private clipboardCopy(_event: Event): void {
|
991
1058
|
Host.userMetrics.actionTaken(Host.UserMetrics.Action.StyleRuleCopied);
|
992
1059
|
}
|
@@ -126,6 +126,34 @@ ol.expanded {
|
|
126
126
|
opacity: 50%;
|
127
127
|
}
|
128
128
|
|
129
|
+
.changed::after {
|
130
|
+
content: "";
|
131
|
+
position: absolute;
|
132
|
+
left: -4px;
|
133
|
+
width: 2px;
|
134
|
+
height: 100%;
|
135
|
+
background-color: var(--color-accent-green);
|
136
|
+
}
|
137
|
+
|
138
|
+
.copy {
|
139
|
+
display: none;
|
140
|
+
}
|
141
|
+
|
142
|
+
.changed:hover {
|
143
|
+
background-color: var(--color-accent-green-background);
|
144
|
+
}
|
145
|
+
|
146
|
+
.changed:hover .copy {
|
147
|
+
position: absolute;
|
148
|
+
right: -4px;
|
149
|
+
top: 0;
|
150
|
+
bottom: 0;
|
151
|
+
margin: auto;
|
152
|
+
display: inline-block;
|
153
|
+
cursor: pointer;
|
154
|
+
transform: scale(0.9);
|
155
|
+
}
|
156
|
+
|
129
157
|
.has-ignorable-error {
|
130
158
|
color: var(--color-text-disabled);
|
131
159
|
}
|
@@ -43,8 +43,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
43
43
|
#trustedWebActivityIssues = new Set<IssuesManager.TrustedWebActivityIssue.TrustedWebActivityIssue>();
|
44
44
|
#quirksModeIssues = new Set<IssuesManager.QuirksModeIssue.QuirksModeIssue>();
|
45
45
|
#attributionReportingIssues = new Set<IssuesManager.AttributionReportingIssue.AttributionReportingIssue>();
|
46
|
-
#wasmCrossOriginModuleSharingIssues =
|
47
|
-
new Set<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue>();
|
48
46
|
#genericIssues = new Set<IssuesManager.GenericIssue.GenericIssue>();
|
49
47
|
#representative?: IssuesManager.Issue.Issue;
|
50
48
|
#aggregatedIssuesCount = 0;
|
@@ -126,11 +124,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
126
124
|
return this.#attributionReportingIssues;
|
127
125
|
}
|
128
126
|
|
129
|
-
getWasmCrossOriginModuleSharingIssue():
|
130
|
-
ReadonlySet<IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue> {
|
131
|
-
return this.#wasmCrossOriginModuleSharingIssues;
|
132
|
-
}
|
133
|
-
|
134
127
|
getGenericIssues(): ReadonlySet<IssuesManager.GenericIssue.GenericIssue> {
|
135
128
|
return this.#genericIssues;
|
136
129
|
}
|
@@ -223,9 +216,6 @@ export class AggregatedIssue extends IssuesManager.Issue.Issue {
|
|
223
216
|
if (issue instanceof IssuesManager.AttributionReportingIssue.AttributionReportingIssue) {
|
224
217
|
this.#attributionReportingIssues.add(issue);
|
225
218
|
}
|
226
|
-
if (issue instanceof IssuesManager.WasmCrossOriginModuleSharingIssue.WasmCrossOriginModuleSharingIssue) {
|
227
|
-
this.#wasmCrossOriginModuleSharingIssues.add(issue);
|
228
|
-
}
|
229
219
|
if (issue instanceof IssuesManager.GenericIssue.GenericIssue) {
|
230
220
|
this.#genericIssues.add(issue);
|
231
221
|
}
|
@@ -30,7 +30,6 @@ import {AffectedSourcesView} from './AffectedSourcesView.js';
|
|
30
30
|
import {AffectedTrustedWebActivityIssueDetailsView} from './AffectedTrustedWebActivityIssueDetailsView.js';
|
31
31
|
import {CorsIssueDetailsView} from './CorsIssueDetailsView.js';
|
32
32
|
import {GenericIssueDetailsView} from './GenericIssueDetailsView.js';
|
33
|
-
import {WasmCrossOriginModuleSharingAffectedResourcesView} from './WasmCrossOriginModuleSharingAffectedResourcesView.js';
|
34
33
|
import {AttributionReportingIssueDetailsView} from './AttributionReportingIssueDetailsView.js';
|
35
34
|
|
36
35
|
import type {AggregatedIssue} from './IssueAggregator.js';
|
@@ -253,7 +252,6 @@ export class IssueView extends UI.TreeOutline.TreeElement {
|
|
253
252
|
new GenericIssueDetailsView(this, this.#issue),
|
254
253
|
new AffectedDocumentsInQuirksModeView(this, this.#issue),
|
255
254
|
new AttributionReportingIssueDetailsView(this, this.#issue),
|
256
|
-
new WasmCrossOriginModuleSharingAffectedResourcesView(this, this.#issue),
|
257
255
|
new AffectedRawCookieLinesView(this, this.#issue),
|
258
256
|
];
|
259
257
|
if (Root.Runtime.experiments.isEnabled('hideIssuesFeature')) {
|
@@ -87,8 +87,10 @@ export class PlayerListView extends UI.Widget.VBox implements TriggerDispatcher
|
|
87
87
|
this.mainContainer.renderMainPanel(playerID);
|
88
88
|
if (this.currentlySelectedEntry !== null) {
|
89
89
|
this.currentlySelectedEntry.classList.remove('selected');
|
90
|
+
this.currentlySelectedEntry.classList.remove('force-white-icons');
|
90
91
|
}
|
91
92
|
element.classList.add('selected');
|
93
|
+
element.classList.add('force-white-icons');
|
92
94
|
this.currentlySelectedEntry = element;
|
93
95
|
}
|
94
96
|
|
@@ -184,7 +184,7 @@ Common.Settings.registerSettingExtension({
|
|
184
184
|
title: 'Mountain View',
|
185
185
|
lat: 37.386052,
|
186
186
|
long: -122.083851,
|
187
|
-
timezoneId: '
|
187
|
+
timezoneId: 'America/Los_Angeles',
|
188
188
|
locale: 'en-US',
|
189
189
|
},
|
190
190
|
{
|
@@ -198,7 +198,7 @@ Common.Settings.registerSettingExtension({
|
|
198
198
|
title: 'San Francisco',
|
199
199
|
lat: 37.774929,
|
200
200
|
long: -122.419416,
|
201
|
-
timezoneId: '
|
201
|
+
timezoneId: 'America/Los_Angeles',
|
202
202
|
locale: 'en-US',
|
203
203
|
},
|
204
204
|
{
|
@@ -849,7 +849,7 @@ export class NavigatorView extends UI.Widget.VBox implements SDK.TargetManager.O
|
|
849
849
|
|
850
850
|
if (project.type() === Workspace.Workspace.projectTypes.FileSystem) {
|
851
851
|
// TODO(crbug.com/1253323): Cast to RawPathString will be removed when migration to branded types is complete.
|
852
|
-
const folderPath = Common.ParsedURL.ParsedURL.
|
852
|
+
const folderPath = Common.ParsedURL.ParsedURL.urlToRawPathString(
|
853
853
|
Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding.completeURL(project, path) as
|
854
854
|
Platform.DevToolsPath.UrlString,
|
855
855
|
Host.Platform.isWin());
|
@@ -44,14 +44,14 @@ interface Row {
|
|
44
44
|
type: RowType;
|
45
45
|
}
|
46
46
|
|
47
|
-
const enum RowType {
|
47
|
+
export const enum RowType {
|
48
48
|
Deletion = 'deletion',
|
49
49
|
Addition = 'addition',
|
50
50
|
Equal = 'equal',
|
51
51
|
Spacer = 'spacer',
|
52
52
|
}
|
53
53
|
|
54
|
-
function buildDiffRows(diff: Diff.Diff.DiffArray): {
|
54
|
+
export function buildDiffRows(diff: Diff.Diff.DiffArray): {
|
55
55
|
originalLines: readonly string[],
|
56
56
|
currentLines: readonly string[],
|
57
57
|
rows: readonly Row[],
|
@@ -12,18 +12,13 @@ function appendComponent(data: IconButton.IconButton.IconButtonData) {
|
|
12
12
|
|
13
13
|
appendComponent({
|
14
14
|
clickHandler: (): void => {},
|
15
|
-
groups: [{iconName: 'survey_feedback_icon', iconColor: '
|
16
|
-
});
|
17
|
-
|
18
|
-
appendComponent({
|
19
|
-
clickHandler: (): void => {},
|
20
|
-
groups: [{iconName: 'survey_feedback_icon', iconColor: 'black', text: '1 item'}],
|
15
|
+
groups: [{iconName: 'survey_feedback_icon', iconColor: 'var(--color-text-primary)', text: '1 item'}],
|
21
16
|
});
|
22
17
|
|
23
18
|
appendComponent({
|
24
19
|
clickHandler: (): void => {},
|
25
20
|
groups: [
|
26
|
-
{iconName: 'survey_feedback_icon', iconColor: '
|
21
|
+
{iconName: 'survey_feedback_icon', iconColor: 'var(--color-primary)', text: 'Test'},
|
27
22
|
{iconName: 'warning_icon', iconColor: '', text: '1'},
|
28
23
|
],
|
29
24
|
});
|
@@ -85,7 +85,7 @@ export class IconButton extends HTMLElement {
|
|
85
85
|
${filteredGroups.map(counter =>
|
86
86
|
LitHtml.html`
|
87
87
|
<${Icon.litTagName} class="status-icon"
|
88
|
-
.data=${{iconName: counter.iconName, color: counter.iconColor
|
88
|
+
.data=${{iconName: counter.iconName, color: counter.iconColor, width: counter.iconWidth || '1.5ex', height: counter.iconHeight || '1.5ex'} as IconData}>
|
89
89
|
</${Icon.litTagName}>
|
90
90
|
${this.#compact ? LitHtml.html`<!-- Force line-height for this element --><span>​</span>` : LitHtml.nothing}
|
91
91
|
<span class="icon-button-title">${counter.text}</span>
|
@@ -5,11 +5,12 @@
|
|
5
5
|
import * as Common from '../../../core/common/common.js';
|
6
6
|
import * as WindowBoundsService from '../../../services/window_bounds/window_bounds.js';
|
7
7
|
import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
|
8
|
+
import * as ThemeSupport from '../../legacy/theme_support/theme_support.js';
|
8
9
|
import * as LitHtml from '../../lit-html/lit-html.js';
|
9
10
|
import * as CodeHighlighter from '../code_highlighter/code_highlighter.js';
|
10
11
|
import * as ComponentHelpers from '../helpers/helpers.js';
|
11
12
|
|
12
|
-
import {baseConfiguration, dynamicSetting, DynamicSetting} from './config.js';
|
13
|
+
import {baseConfiguration, dummyDarkTheme, dynamicSetting, DynamicSetting, themeSelection} from './config.js';
|
13
14
|
import {toLineColumn, toOffset} from './position.js';
|
14
15
|
|
15
16
|
declare global {
|
@@ -66,6 +67,12 @@ export class TextEditor extends HTMLElement {
|
|
66
67
|
});
|
67
68
|
this.#ensureSettingListeners();
|
68
69
|
this.#startObservingResize();
|
70
|
+
ThemeSupport.ThemeSupport.instance().addEventListener(ThemeSupport.ThemeChangeEvent.eventName, () => {
|
71
|
+
const currentTheme = ThemeSupport.ThemeSupport.instance().themeName() === 'dark' ? dummyDarkTheme : [];
|
72
|
+
this.editor.dispatch({
|
73
|
+
effects: themeSelection.reconfigure(currentTheme),
|
74
|
+
});
|
75
|
+
});
|
69
76
|
return this.#activeEditor;
|
70
77
|
}
|
71
78
|
|
@@ -202,10 +202,11 @@ function themeIsDark(): boolean {
|
|
202
202
|
return setting === 'systemPreferred' ? window.matchMedia('(prefers-color-scheme: dark)').matches : setting === 'dark';
|
203
203
|
}
|
204
204
|
|
205
|
-
const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
|
205
|
+
export const dummyDarkTheme = CM.EditorView.theme({}, {dark: true});
|
206
|
+
export const themeSelection = new CM.Compartment();
|
206
207
|
|
207
208
|
export function theme(): CM.Extension {
|
208
|
-
return [editorTheme, themeIsDark() ? dummyDarkTheme : []];
|
209
|
+
return [editorTheme, themeIsDark() ? themeSelection.of(dummyDarkTheme) : themeSelection.of([])];
|
209
210
|
}
|
210
211
|
|
211
212
|
let sideBarElement: HTMLElement|null = null;
|
@@ -120,6 +120,7 @@ export class GlassPane {
|
|
120
120
|
// Deliberately starts with 3000 to hide other z-indexed elements below.
|
121
121
|
this.element.style.zIndex = `${3000 + 1000 * _panes.size}`;
|
122
122
|
document.body.addEventListener('mousedown', this.onMouseDownBound, true);
|
123
|
+
document.body.addEventListener('pointerdown', this.onMouseDownBound, true);
|
123
124
|
this.widgetInternal.show(document.body);
|
124
125
|
_panes.add(this);
|
125
126
|
this.positionContent();
|
@@ -131,6 +132,7 @@ export class GlassPane {
|
|
131
132
|
}
|
132
133
|
_panes.delete(this);
|
133
134
|
this.element.ownerDocument.body.removeEventListener('mousedown', this.onMouseDownBound, true);
|
135
|
+
this.element.ownerDocument.body.removeEventListener('pointerdown', this.onMouseDownBound, true);
|
134
136
|
this.widgetInternal.detach();
|
135
137
|
}
|
136
138
|
|
@@ -1031,7 +1031,7 @@ export class LongClickController {
|
|
1031
1031
|
if (!this.longClickData) {
|
1032
1032
|
return;
|
1033
1033
|
}
|
1034
|
-
this.element.removeEventListener('
|
1034
|
+
this.element.removeEventListener('pointerdown', this.longClickData.mouseDown, false);
|
1035
1035
|
this.element.removeEventListener('pointerout', this.longClickData.reset, false);
|
1036
1036
|
this.element.removeEventListener('pointerup', this.longClickData.mouseUp, false);
|
1037
1037
|
this.element.addEventListener('click', this.longClickData.reset, true);
|
@@ -57,6 +57,7 @@
|
|
57
57
|
--color-accent-red: rgb(217 48 37);
|
58
58
|
--color-red: rgb(238 68 47);
|
59
59
|
--color-accent-green: rgb(24 128 56);
|
60
|
+
--color-accent-green-background: rgb(24 128 56 / 10%);
|
60
61
|
--color-green: rgb(99 172 190);
|
61
62
|
--color-link: var(--color-primary);
|
62
63
|
--color-syntax-1: rgb(200 0 0);
|
@@ -219,6 +220,7 @@
|
|
219
220
|
--color-accent-red: rgb(242 139 130);
|
220
221
|
--color-red: rgb(237 78 76);
|
221
222
|
--color-accent-green: rgb(129 201 149);
|
223
|
+
--color-accent-green-background: rgb(129 201 149 / 20%);
|
222
224
|
--color-link: var(--color-primary);
|
223
225
|
--color-syntax-1: rgb(53 212 199);
|
224
226
|
--color-syntax-2: rgb(93 176 215);
|
package/package.json
CHANGED
@@ -49,7 +49,8 @@ def main(argv):
|
|
49
49
|
for listed_directory in listed_third_party_directories_json:
|
50
50
|
if (listed_directory not in found_directories
|
51
51
|
# TODO(crbug.com/1287519): Remove exception for codemirror 5
|
52
|
-
and not listed_directory == "codemirror"
|
52
|
+
and not listed_directory == "codemirror"
|
53
|
+
and not listed_directory == "puppeteer"):
|
53
54
|
print(
|
54
55
|
"Directory `" + listed_directory + "`" +
|
55
56
|
" is not included in `config/gni/devtools_grd_files.gni`." +
|