Skip to content

Commit 79c290c

Browse files
authored
Merge branch 'ChromeDevTools:main' into main
2 parents bc9cbd4 + 5a64dbb commit 79c290c

File tree

3,854 files changed

+843754
-775744
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,854 files changed

+843754
-775744
lines changed

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ Danny Eldridge <me@heardanieljames.com>
3333
Derek Li <the.derekli@gmail.com>
3434
Douglas Chiang <douglasdothnc@gmail.com>
3535
Dragonish <no.web.developer@outlook.com>
36+
Eden Wang <nedenwang@gmail.com>
3637
Edward Trist <edwardtrist@gmail.com>
3738
Ergün Erdoğmuş <erdogmusergun@gmail.com>
3839
Eric Rannaud <eric.rannaud@gmail.com>

DEPS

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@ vars = {
1212
'build_with_chromium': False,
1313

1414
'build_url': 'https://chromium.googlesource.com/chromium/src/build.git',
15-
'build_revision': 'dd54bc718b7c5363155660d12b7965ea9f87ada9',
15+
'build_revision': 'd496fc3c8221c758ac43bb6f4ee1b241533efec8',
1616

1717
'buildtools_url': 'https://chromium.googlesource.com/chromium/src/buildtools.git',
18-
'buildtools_revision': '88a3274e7b0c6314c84ed202ee6377d1cf9e22b0',
18+
'buildtools_revision': '00586fa43b1dedbd119cfd5c71cb9396d09d53e0',
1919

2020
'depot_tools_url': 'https://chromium.googlesource.com/chromium/tools/depot_tools.git',
21-
'depot_tools_revision': '73e46667ed3a1326cf564747737b4e11137d7f29',
21+
'depot_tools_revision': 'a5514728766942dd77a2c0d222fb6c9d5a9d9b9d',
2222

2323
'inspector_protocol_url': 'https://chromium.googlesource.com/deps/inspector_protocol',
24-
'inspector_protocol_revision': '1ac1ec6d0c61c081cc73793e491b987beecccde1',
24+
'inspector_protocol_revision': '679b33a98ae546ff521eee2ea28d8d5bf28872ba',
2525

2626
# Keeping track of the last time we rolled the browser protocol files.
27-
'chromium_browser_protocol_revision' : 'c0cd408650a942d836b07c15facd3f4fede1d578',
27+
'chromium_browser_protocol_revision' : '4ceac4e2889e841baa72d3beb6c8eac6c0d2341e',
2828

2929
'clang_format_url': 'https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git',
30-
'clang_format_revision': '37f6e68a107df43b7d7e044fd36a13cbae3413f2',
30+
'clang_format_revision': 'c2725e0622e1a86d55f14514f2177a39efea4a0e',
3131

3232
'emscripten_tag': 'ade9d780ff17c88d81aa13860361743e3c1e1396',
3333

3434
# GN CIPD package version.
35-
'gn_version': 'git_revision:81b24e01531ecf0eff12ec9359a555ec3944ec4e',
35+
'gn_version': 'git_revision:5ddf42d01f30d9db392aedf2cf7e0f36980c882d',
3636

3737
'cmake_version': 'version:2@3.21.3',
3838

@@ -49,7 +49,7 @@ vars = {
4949
# Chrome version used for tests. It should be regularly updated to
5050
# match the Canary version listed here:
5151
# https://googlechromelabs.github.io/chrome-for-testing/last-known-good-versions.json
52-
'chrome': '142.0.7439.0',
52+
'chrome': '143.0.7459.0',
5353

5454
# 'magic' text to tell depot_tools that git submodules should be accepted but
5555
# but parity with DEPS file is expected.
@@ -59,7 +59,7 @@ vars = {
5959
'non_git_source': 'True',
6060

6161
# siso CIPD package version
62-
'siso_version': 'git_revision:acfc39d4c923834851300e8676daf8fc47e53a2d',
62+
'siso_version': 'git_revision:2eee1d6feaab76d99397d4d840bd369a428c01ea',
6363
}
6464

6565
# Only these hosts are allowed for dependencies in this DEPS file.

build

Submodule build updated from dd54bc7 to d496fc3

buildtools

Submodule buildtools updated from 88a3274 to 00586fa

config/gni/devtools_grd_files.gni

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ grd_files_bundled_sources = [
6969
"front_end/Images/brush.svg",
7070
"front_end/Images/bucket.svg",
7171
"front_end/Images/bug.svg",
72-
"front_end/Images/bundle.svg",
7372
"front_end/Images/button-magic.svg",
7473
"front_end/Images/calendar-today.svg",
7574
"front_end/Images/center-focus-weak.svg",
@@ -564,8 +563,10 @@ grd_files_bundled_sources = [
564563
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInsufficientResources.md",
565564
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidMatchField.md",
566565
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidStructuredHeader.md",
566+
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorInvalidTTLField.md",
567567
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNavigationRequest.md",
568568
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNoMatchField.md",
569+
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonIntegerTTLField.md",
569570
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonListMatchDestField.md",
570571
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonSecureContext.md",
571572
"front_end/models/issues_manager/descriptions/sharedDictionaryWriteErrorNonStringIdField.md",
@@ -1120,6 +1121,7 @@ grd_files_unbundled_sources = [
11201121
"front_end/core/sdk/ResourceTreeModel.js",
11211122
"front_end/core/sdk/RuntimeModel.js",
11221123
"front_end/core/sdk/SDKModel.js",
1124+
"front_end/core/sdk/ScopeTreeCache.js",
11231125
"front_end/core/sdk/ScreenCaptureModel.js",
11241126
"front_end/core/sdk/Script.js",
11251127
"front_end/core/sdk/SecurityOriginManager.js",
@@ -1314,7 +1316,6 @@ grd_files_unbundled_sources = [
13141316
"front_end/models/project_settings/ProjectSettingsModel.js",
13151317
"front_end/models/source_map_scopes/NamesResolver.js",
13161318
"front_end/models/source_map_scopes/ScopeChainModel.js",
1317-
"front_end/models/source_map_scopes/ScopeTreeCache.js",
13181319
"front_end/models/stack_trace/StackTrace.js",
13191320
"front_end/models/stack_trace/StackTraceImpl.js",
13201321
"front_end/models/stack_trace/StackTraceModel.js",
@@ -1526,18 +1527,20 @@ grd_files_unbundled_sources = [
15261527
"front_end/panels/application/components/backForwardCacheView.css.js",
15271528
"front_end/panels/application/components/badge.css.js",
15281529
"front_end/panels/application/components/bounceTrackingMitigationsView.css.js",
1530+
"front_end/panels/application/components/endpointsGrid.css.js",
15291531
"front_end/panels/application/components/frameDetailsReportView.css.js",
15301532
"front_end/panels/application/components/interestGroupAccessGrid.css.js",
15311533
"front_end/panels/application/components/originTrialTokenRows.css.js",
15321534
"front_end/panels/application/components/originTrialTreeView.css.js",
15331535
"front_end/panels/application/components/permissionsPolicySection.css.js",
15341536
"front_end/panels/application/components/protocolHandlersView.css.js",
1535-
"front_end/panels/application/components/reportingApiGrid.css.js",
1537+
"front_end/panels/application/components/reportsGrid.css.js",
15361538
"front_end/panels/application/components/serviceWorkerRouterView.css.js",
15371539
"front_end/panels/application/components/sharedStorageAccessGrid.css.js",
15381540
"front_end/panels/application/components/sharedStorageMetadataView.css.js",
15391541
"front_end/panels/application/components/stackTraceLinkButton.css.js",
15401542
"front_end/panels/application/components/stackTraceRow.css.js",
1543+
"front_end/panels/application/components/storageMetadataView.css.js",
15411544
"front_end/panels/application/components/trustTokensView.css.js",
15421545
"front_end/panels/application/cookieItemsView.css.js",
15431546
"front_end/panels/application/indexedDBViews.css.js",
@@ -1872,8 +1875,6 @@ grd_files_unbundled_sources = [
18721875
"front_end/panels/network/components/RequestTrustTokensView.js",
18731876
"front_end/panels/network/components/ResponseHeaderSection.css.js",
18741877
"front_end/panels/network/components/ResponseHeaderSection.js",
1875-
"front_end/panels/network/components/WebBundleInfoView.css.js",
1876-
"front_end/panels/network/components/WebBundleInfoView.js",
18771878
"front_end/panels/network/eventSourceMessagesView.css.js",
18781879
"front_end/panels/network/forward/NetworkRequestId.js",
18791880
"front_end/panels/network/forward/UIFilter.js",
@@ -2560,6 +2561,7 @@ grd_files_unbundled_sources = [
25602561
"front_end/ui/components/helpers/directives.js",
25612562
"front_end/ui/components/helpers/get-root-node.js",
25622563
"front_end/ui/components/helpers/scheduled-render.js",
2564+
"front_end/ui/components/highlighting/HighlightElement.js",
25632565
"front_end/ui/components/highlighting/HighlightManager.js",
25642566
"front_end/ui/components/icon_button/FileSourceIcon.js",
25652567
"front_end/ui/components/icon_button/Icon.js",
@@ -2696,7 +2698,6 @@ grd_files_unbundled_sources = [
26962698
"front_end/ui/legacy/Widget.js",
26972699
"front_end/ui/legacy/XElement.js",
26982700
"front_end/ui/legacy/XLink.js",
2699-
"front_end/ui/legacy/XWidget.js",
27002701
"front_end/ui/legacy/ZoomManager.js",
27012702
"front_end/ui/legacy/checkboxTextLabel.css.js",
27022703
"front_end/ui/legacy/components/color_picker/ColorFormatSpec.js",

config/gni/devtools_image_files.gni

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ devtools_svg_sources = [
7777
"brush.svg",
7878
"bucket.svg",
7979
"bug.svg",
80-
"bundle.svg",
8180
"button-magic.svg",
8281
"calendar-today.svg",
8382
"center-focus-weak.svg",

docs/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ below.**
6060

6161
### Policies
6262

63+
* [Chromium DevTools Console Policy](./policy/console-policy.md)
6364
* [Chromium DevTools Slow-Close Policy](./policy/slow-close.md)
6465
* [DevTools Page Zoom Accessibility Policy](./policy/gar-page-zoom-policy.md)
6566

docs/policy/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
This folder contains the policies relevant to the development of the Chromium
44
DevTools.
55

6+
1. [Chromium DevTools Console Policy](./console-policy.md)
67
1. [Chromium DevTools Slow-Close Policy](./slow-close.md)
78
2. [DevTools Page Zoom Accessibility Policy](./gar-page-zoom-policy.md)

docs/policy/console-policy.md

Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Chromium DevTools Console Policy
2+
3+
[goo.gle/devtools-console-policy](http://goo.gle/devtools-console-policy)
4+
([go/chrome-devtools:console-policy](http://go/chrome-devtools:console-policy))
5+
6+
**TL;DR:** This policy outlines a strategy to keep the signal to noise ratio in
7+
the Console panel of Chromium DevTools high, by setting clear expectations for
8+
Chromium teams what kind of information is presented to web developers via the
9+
Console and how it is presented. Console spam, specifically from Chromium
10+
itself, is a known pain point for developers (e.g.
11+
[crbug/338403584](http://crbug.com/338403584)).
12+
13+
## Background
14+
15+
The [Console panel](https://developer.chrome.com/docs/devtools/console) in the
16+
Chromium Developer Tools is usually the first place where web developers check
17+
in case something is not working as expected, and ideally they would come across
18+
an error or warning message here that helps them to quickly resolve the issue at
19+
hand. The panel shows all the messages that are logged by the web application
20+
but also the browser (potentially on behalf of the web application, for example
21+
logging uncaught exceptions).
22+
23+
In order for it to remain useful to web developers, the signal to noise ratio
24+
must be as high as possible, and it’s crucially important to keep in mind that
25+
the information shown is (a) relevant to what the developer is looking for right
26+
now and (b) actionable wrt. to the issue at hand. Putting it the other way
27+
around, while the developer is focused on investigating a concrete problem it
28+
doesn’t help to show a lot of messages around potential issues, suggested
29+
improvements, or things that went wrong without any useful breadcrumbs (prime
30+
examples here are error messages from somewhere deep in Blink which contain no
31+
stack traces and basically just repeat the information that is already present
32+
on a JavaScript exception throw at the same time).
33+
34+
## Common problems
35+
36+
### Useless anchor
37+
38+
A common problem we’ve observed is console messages from Chromium without a
39+
meaningful and actionable stack trace. Consider the following example, where the
40+
location attached to the console message is the first line of the main document.
41+
The inexperienced web developer will probably be puzzled how come
42+
`<!doctype html>` activates fingerprinting protection on the current page.
43+
44+
![](./images/console-policy1.png "Useless message anchors")
45+
46+
### For your information
47+
48+
From a Chromium team working on a specific feature, it might be totally
49+
reasonable to _”let the developer know what’s going on”_, because something
50+
could break. But from a user’s perspective, messages that basically only convey
51+
non-actionable information and aren’t relevant in the context of the problem
52+
that the developer is investigating are useless at best. Consider the following
53+
example:
54+
55+
![](./images/console-policy2.png "Confusing FYI messages")
56+
57+
The first warning message says that Fingerprinting protection is active, but
58+
doesn’t tell the developer whether that’s a problem or not, and what they can do
59+
about it. It’s highly confusing. The second warning message states that two
60+
third-party cookies were blocked, but also leaves the developer wondering if
61+
that’s something to be concerned about or caused any actual problem.
62+
63+
Similar messages that fall into this bucket:
64+
65+
* `Third-party cookie will be blocked. Learn more in the Issues tab`
66+
* `[Violation] 'setTimeout' handler took <N>ms`
67+
* `[Violation] Added non-passive event listener to a scroll-blocking <some> event. Consider marking event handler as 'passive' to make the page more responsive. See <URL>`
68+
* `Specifying 'overflow: visible' on img, video and canvas tags may cause them to produce visual content outside of the element bounds. See https://github.com/WICG/view-transitions/blob/main/debugging_overflow_on_images.md for details.`
69+
70+
Logging a message to the Console panel just to tell the developer to open
71+
another panel or read some article is specifically annoying, and over time will
72+
result in training web developers on ignoring messages produced by Chromium
73+
itself.
74+
75+
### Repetition
76+
77+
Repeating the same message over and over again (independent of whether it’s
78+
actionable and meaningful) is another source of problems:
79+
80+
![](./images/console-policy3.png "Repeated console messages")
81+
82+
DevTools has a feature to group similar messages, which most users have enabled,
83+
so the pain they feel from a lot of repeated information is manageable. But that
84+
also gives rise to a new problem: Problems might be hidden through the grouping
85+
feature outside of the viewport, because the grouping somewhat breaks the
86+
chronological order.
87+
88+
## Best practice
89+
90+
Specifically for the purpose of being able to present developers with actionable
91+
information, coupled with traces of data that are relevant to the issue, we’ve
92+
introduced the [Issues panel], and as part of
93+
[crbug/40173406](http://crbug.com/40173406) and related bugs already migrated a
94+
few spammy console messages to issues.
95+
96+
In general, reserve the use of `context->AddConsoleMessage(...)` and similar
97+
APIs for rare cases when the console message adds significant value, favor a
98+
well-worded and helpful issue over a console message, and specifically don’t
99+
spit out a console message when you are already raising an exception (exceptions
100+
can be coupled with issues internally to provide more actionable information).
101+
102+
## Building empathy
103+
104+
Many Chromies might not be able to immediately relate to the struggles of web
105+
developers, and might not have first hand experience with sifting through
106+
endless logs of useless information produced by frameworks, libraries, and
107+
eventually the browser. But imagine the following scenario: You are using `gdb`
108+
or `lldb` and instead of helping you diagnose the crash somewhere deep in your
109+
C++ code for Autofill in the browser process, it’s spamming you with pages of
110+
potential performance improvements in the renderer code for `<canvas>` elements.
111+
At best that would be very confusing, but more likely you’d be very frustrated
112+
with the tool after a while. This is exactly what happens if we spam web
113+
developers with potential performance issues.
114+
115+
We have a [logging policy for Chromium] to prevent ourselves from being
116+
overwhelmed by log messages from other Chromium teams, for the same reason.
117+
118+
## GTM strategy
119+
120+
The most common cause for spammy console messages from Chromium is an
121+
insufficient Go-To-Market (GTM) strategy for features or (potentially breaking)
122+
changes when it comes to developer adoption. Oftentimes it’s unclear what
123+
exactly the expectations are and what are the critical user journeys that web
124+
developers go through. Spending a bit more time on this aspect and involving
125+
DevRel early on can help to shine light on the matter and avoid sprinkling log
126+
messages all over the place to _”raise awareness”_. Specifically consider:
127+
128+
- The precise target audience for your information, because not all web
129+
developers are equal at all times.
130+
- Under which exact circumstances that piece of information is required.
131+
- Is it a nice to have (e.g. _”X could be faster if you did Y”_ or _”using A
132+
poses a potential security risk for your users”_) or a critically important
133+
piece of information (e.g. _”X will stop working in the next release unless
134+
you do Y”_).
135+
136+
Feel free to reach out to [devtools-dev@chromium.org] with questions, and ping
137+
[dsv@chromium.org](mailto:dsv@chromium.org) (Chrome DevTools TL) or
138+
[hablich@chromium.org](mailto:hablich@chromium.org) (Chrome DevTools PM)
139+
directly (specifically in case of code reviews which add new problematic console
140+
messages).
141+
142+
[Issues panel]: https://developer.chrome.com/docs/devtools/issues
143+
[logging policy for Chromium]: https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++.md#logging
144+
[devtools-dev@chromium.org]: https://groups.google.com/a/chromium.org/g/devtools-dev
188 KB
Loading

0 commit comments

Comments
 (0)