chrome-devtools-frontend 1.0.1561080 → 1.0.1562051
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/front_end/panels/elements/StylesSidebarPane.ts +7 -0
- package/front_end/panels/security/CookieControlsView.ts +35 -1
- package/front_end/panels/security/CookieReportView.ts +39 -0
- package/front_end/panels/security/cookieControlsView.css +13 -0
- package/front_end/panels/security/cookieReportView.css +16 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
|
@@ -1869,6 +1869,13 @@ export class CSSPropertyPrompt extends UI.TextPrompt.TextPrompt {
|
|
|
1869
1869
|
Promise<UI.SuggestBox.Suggestions> {
|
|
1870
1870
|
const lowerQuery = query.toLowerCase();
|
|
1871
1871
|
const editingVariable = !this.isEditingName && expression.trim().endsWith('var(');
|
|
1872
|
+
if (this.isEditingName && expression) {
|
|
1873
|
+
const invalidCharsRegex = /["':;,\s()]/;
|
|
1874
|
+
if (invalidCharsRegex.test(expression)) {
|
|
1875
|
+
return await Promise.resolve([]);
|
|
1876
|
+
}
|
|
1877
|
+
}
|
|
1878
|
+
|
|
1872
1879
|
if (!query && !force && !editingVariable && (this.isEditingName || expression)) {
|
|
1873
1880
|
return await Promise.resolve([]);
|
|
1874
1881
|
}
|
|
@@ -101,6 +101,20 @@ const UIStrings = {
|
|
|
101
101
|
* @example {#tpcd-heuristics-grants} PH1
|
|
102
102
|
*/
|
|
103
103
|
enableFlag: 'To use this, set {PH1} to Default',
|
|
104
|
+
/**
|
|
105
|
+
* @description First part of the deprecation warning message.
|
|
106
|
+
* @example {maintaining its current approach to user choice for third-party cookies} PH1
|
|
107
|
+
*/
|
|
108
|
+
upperDeprecationWarning: 'Chrome is {PH1} and third-party cookie exceptions are being phased out.',
|
|
109
|
+
/**
|
|
110
|
+
* @description Text for the blog post link inside the deprecation warning.
|
|
111
|
+
*/
|
|
112
|
+
blogPostLink: 'maintaining its current approach to user choice for third-party cookies',
|
|
113
|
+
/**
|
|
114
|
+
* @description Second part of the deprecation warning message.
|
|
115
|
+
*/
|
|
116
|
+
lowerDeprecationWarning:
|
|
117
|
+
'The Controls and Third-Party cookie sections will be removed and the Privacy and Security panel will revert to its former name, the Security panel. As always, third-party cookies can be inspected from the Cookies pane in the Application panel.',
|
|
104
118
|
} as const;
|
|
105
119
|
|
|
106
120
|
const str_ = i18n.i18n.registerUIStrings('panels/security/CookieControlsView.ts', UIStrings);
|
|
@@ -279,6 +293,25 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: object, target: HTMLEleme
|
|
|
279
293
|
</devtools-button>
|
|
280
294
|
</div>
|
|
281
295
|
</div>
|
|
296
|
+
<div class="deprecation-divider"></div>
|
|
297
|
+
`;
|
|
298
|
+
|
|
299
|
+
const deprecationMessage = html`
|
|
300
|
+
<div class="deprecation-warning">
|
|
301
|
+
<div class="body">
|
|
302
|
+
<devtools-icon
|
|
303
|
+
name="warning"
|
|
304
|
+
class="medium"
|
|
305
|
+
style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
|
|
306
|
+
</devtools-icon>
|
|
307
|
+
${i18nFormatString(UIStrings.upperDeprecationWarning, {
|
|
308
|
+
PH1: UI.Fragment.html`<x-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslog=${VisualLogging.link('privacy-sandbox-update').track({click: true})}>${i18nString(UIStrings.blogPostLink)}</x-link>`,
|
|
309
|
+
})}
|
|
310
|
+
</div>
|
|
311
|
+
<div class="body">
|
|
312
|
+
${i18nString(UIStrings.lowerDeprecationWarning)}
|
|
313
|
+
</div>
|
|
314
|
+
</div>
|
|
282
315
|
`;
|
|
283
316
|
|
|
284
317
|
render(html `
|
|
@@ -302,10 +335,11 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: object, target: HTMLEleme
|
|
|
302
335
|
</div>
|
|
303
336
|
</devtools-card>
|
|
304
337
|
${Boolean(enterpriseEnabledSetting.get()) ? enterpriseDisclaimer : nothing}
|
|
338
|
+
${deprecationMessage}
|
|
305
339
|
</div>
|
|
306
340
|
</div>
|
|
307
341
|
`, target);
|
|
308
|
-
|
|
342
|
+
// clang-format on
|
|
309
343
|
};
|
|
310
344
|
|
|
311
345
|
export function showInfobar(): void {
|
|
@@ -169,9 +169,24 @@ const UIStrings = {
|
|
|
169
169
|
* @description String that shows up in the context menu when right clicking one of the entries in the cookie report.
|
|
170
170
|
*/
|
|
171
171
|
showRequestsWithThisCookie: 'Show requests with this cookie',
|
|
172
|
+
/**
|
|
173
|
+
* @description First part of the deprecation warning message.
|
|
174
|
+
* @example {maintaining its current approach to user choice for third-party cookies} PH1
|
|
175
|
+
*/
|
|
176
|
+
upperDeprecationWarning: 'Chrome is {PH1} and third-party cookie exceptions are being phased out.',
|
|
177
|
+
/**
|
|
178
|
+
* @description Text for the blog post link inside the deprecation warning.
|
|
179
|
+
*/
|
|
180
|
+
blogPostLink: 'maintaining its current approach to user choice for third-party cookies',
|
|
181
|
+
/**
|
|
182
|
+
* @description Second part of the deprecation warning message.
|
|
183
|
+
*/
|
|
184
|
+
lowerDeprecationWarning:
|
|
185
|
+
'The Controls and Third-Party cookie sections will be removed and the Privacy and Security panel will revert to its former name, the Security panel. As always, third-party cookies can be inspected from the Cookies pane in the Application panel.',
|
|
172
186
|
} as const;
|
|
173
187
|
const str_ = i18n.i18n.registerUIStrings('panels/security/CookieReportView.ts', UIStrings);
|
|
174
188
|
export const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
189
|
+
export const i18nFormatString = uiI18n.getFormatLocalizedString.bind(undefined, str_);
|
|
175
190
|
|
|
176
191
|
export interface ViewInput {
|
|
177
192
|
cookieRows: IssuesManager.CookieIssue.CookieReportInfo[];
|
|
@@ -198,6 +213,27 @@ export interface CookieReportNodeData {
|
|
|
198
213
|
|
|
199
214
|
export type View = (input: ViewInput, output: ViewOutput, target: HTMLElement) => void;
|
|
200
215
|
const DEFAULT_VIEW: View = (input, output, target) => {
|
|
216
|
+
const deprecationMessage = html`
|
|
217
|
+
<div class="deprecation-warning">
|
|
218
|
+
<div class="body">
|
|
219
|
+
<devtools-icon
|
|
220
|
+
name="warning"
|
|
221
|
+
class="medium"
|
|
222
|
+
style="color: var(--icon-warning); margin-right: var(--sys-size-2);">
|
|
223
|
+
</devtools-icon>
|
|
224
|
+
${i18nFormatString(UIStrings.upperDeprecationWarning, {
|
|
225
|
+
PH1: UI.Fragment
|
|
226
|
+
.html`<x-link class="devtools-link" href="https://privacysandbox.com/news/privacy-sandbox-update/" jslog=${
|
|
227
|
+
VisualLogging.link('privacy-sandbox-update').track({click: true})}>${
|
|
228
|
+
i18nString(UIStrings.blogPostLink)}</x-link>`,
|
|
229
|
+
})}
|
|
230
|
+
</div>
|
|
231
|
+
<div class="body">
|
|
232
|
+
${i18nString(UIStrings.lowerDeprecationWarning)}
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
`;
|
|
236
|
+
|
|
201
237
|
// clang-format off
|
|
202
238
|
render(html `
|
|
203
239
|
<div class="report overflow-auto">
|
|
@@ -271,9 +307,12 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
271
307
|
${i18nString(UIStrings.emptyReportExplanation)}
|
|
272
308
|
</div>
|
|
273
309
|
</div>
|
|
310
|
+
<div class="deprecation-divider"></div>
|
|
274
311
|
`
|
|
275
312
|
}
|
|
276
313
|
|
|
314
|
+
${deprecationMessage}
|
|
315
|
+
|
|
277
316
|
</div>
|
|
278
317
|
`, target);
|
|
279
318
|
// clang-format on
|
|
@@ -124,3 +124,16 @@ input[type="checkbox"] {
|
|
|
124
124
|
.subtext {
|
|
125
125
|
color: var(--sys-color-on-surface-subtle);
|
|
126
126
|
}
|
|
127
|
+
|
|
128
|
+
.deprecation-divider {
|
|
129
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
130
|
+
margin: var(--sys-size-2) calc(var(--sys-size-3) * -1) var(--sys-size-6) calc(var(--sys-size-5) * -1);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.deprecation-warning {
|
|
134
|
+
padding: 0 var(--sys-size-5);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.deprecation-warning > .body:first-child {
|
|
138
|
+
margin-bottom: var(--sys-size-4);
|
|
139
|
+
}
|
|
@@ -72,3 +72,19 @@ devtools-data-grid {
|
|
|
72
72
|
width: var(--sys-size-11);
|
|
73
73
|
height: var(--sys-size-11);
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
.deprecation-divider {
|
|
77
|
+
border-bottom: 1px solid var(--sys-color-divider);
|
|
78
|
+
margin-left: calc(var(--sys-size-5) * -1);
|
|
79
|
+
margin-right: calc(var(--sys-size-3) * -1);
|
|
80
|
+
margin-top: var(--sys-size-2);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.deprecation-warning {
|
|
84
|
+
padding: 0 var(--sys-size-5);
|
|
85
|
+
margin-bottom: var(--sys-size-6);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.deprecation-warning > .body:first-child {
|
|
89
|
+
margin-bottom: var(--sys-size-4);
|
|
90
|
+
}
|
|
@@ -2969,6 +2969,7 @@ export const knownContextValues = new Set([
|
|
|
2969
2969
|
'privacy-notice',
|
|
2970
2970
|
'privacy-policy',
|
|
2971
2971
|
'privacy-policy.console-insights',
|
|
2972
|
+
'privacy-sandbox-update',
|
|
2972
2973
|
'private-state-tokens',
|
|
2973
2974
|
'production-origin',
|
|
2974
2975
|
'profile-loading-failed',
|
package/package.json
CHANGED