Skip to content

Commit e6d2fda

Browse files
authored
Chrome dev tools main (#54)
2 parents 65494a3 + cb56591 commit e6d2fda

File tree

673 files changed

+16589
-9512
lines changed

Some content is hidden

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

673 files changed

+16589
-9512
lines changed

.gn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2019 the V8 project authors. All rights reserved.
1+
# Copyright 2019 The Chromium Authors
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
11
{
22
"version": "0.2.0",
33
"configurations": [
4-
{
5-
"type": "chrome",
6-
"request": "launch",
7-
"name": "Run unit tests in VS Code debugger",
8-
"preLaunchTask": "1-build_Debug",
9-
"runtimeExecutable": "npm",
10-
"runtimeArgs": ["run", "test", "front_end"],
11-
"port": 7722,
12-
"timeout": 30000,
13-
"browserLaunchLocation": "workspace",
14-
"outputCapture": "std",
15-
"trace": true
16-
},
17-
{
18-
"type": "node",
19-
"request": "launch",
20-
"name": "Run end-to-end tests in VS Code debugger",
21-
"preLaunchTask": "1-build_Debug",
22-
"runtimeExecutable": "npm",
23-
"runtimeArgs": ["run", "test", "test/e2e"]
24-
},
254
{
265
"type": "node",
276
"request": "launch",
28-
"name": "Run test",
7+
"name": "Run current test file",
298
"cwd": "${workspaceFolder}",
309
"runtimeExecutable": "npm",
3110
"runtimeArgs": ["run", "test", "--", "${file}"]
3211
},
3312
{
3413
"type": "node",
3514
"request": "launch",
36-
"name": "Debug test",
15+
"name": "Debug current test file",
3716
"cwd": "${workspaceFolder}",
3817
"runtimeExecutable": "npm",
3918
"console": "integratedTerminal",
40-
"runtimeArgs": ["run", "test", "--", "--debug", "${file}"]
19+
"runtimeArgs": ["run", "test", "--", "--debug", "${file}"],
20+
"env": {
21+
"VSCODE_DEBUGGER": true
22+
}
4123
}
4224
]
4325
}

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
AbdAlRahman Gad <abdobngad@gmail.com>
1515
Ajay Panthagani <ajaypanthagani321@gmail.com>
1616
Alesandro Ortiz <alesandro@alesandroortiz.com>
17+
Alex Ho <wjhe1016@gmail.com>
1718
Alexander Stammbach <alexander@stammbach.io>
1819
Alexey Rodionov <fluorescent.hallucinogen@gmail.com>
1920
Ameen Basha <ameenbasha111@gmail.com>

DEPS

Lines changed: 8 additions & 8 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': '7133d7642a7f3a61dd3154f8685a6018c1f159a0',
15+
'build_revision': 'dd54bc718b7c5363155660d12b7965ea9f87ada9',
1616

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

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

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

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

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

3232
'emscripten_tag': 'ade9d780ff17c88d81aa13860361743e3c1e1396',
3333

3434
# GN CIPD package version.
35-
'gn_version': 'git_revision:5d0a4153b0bcc86c5a23310d5b648a587be3c56d',
35+
'gn_version': 'git_revision:81b24e01531ecf0eff12ec9359a555ec3944ec4e',
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.7409.0',
52+
'chrome': '142.0.7439.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:02cbec18d7b18a0733fec402f2e90ff071b98f63',
62+
'siso_version': 'git_revision:acfc39d4c923834851300e8676daf8fc47e53a2d',
6363
}
6464

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

PRESUBMIT.py

Lines changed: 87 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
`git cl presubmit -v -v` to debug presubmit checks.
1414
"""
1515

16+
import re
1617
import sys
1718
import six
1819
import time
@@ -27,16 +28,24 @@
2728
r'^front_end[\\/]core[\\/]common[\\/]Color\.ts$', # Apple copyright
2829
r'^front_end[\\/]core[\\/]common[\\/]Object\.ts$', # Apple copyright
2930
r'^front_end[\\/]core[\\/]common[\\/]ResourceType\.ts$', # Apple copyright
30-
r'^front_end[\\/]core[\\/]dom_extension[\\/]DOMExtension\.ts$', # Apple copyright
31+
# Apple copyright
32+
r'^front_end[\\/]core[\\/]dom_extension[\\/]DOMExtension\.ts$',
3133
r'^front_end[\\/]core[\\/]platform[\\/]UIString\.ts$', # Apple copyright
3234
r'^front_end[\\/]core[\\/]sdk[\\/]Resource\.ts$', # Apple copyright
3335
r'^front_end[\\/]core[\\/]sdk[\\/]Script\.ts$', # Apple copyright
34-
r'^front_end[\\/]ui[\\/]legacy[\\/]components[\\/]data_grid[\\/]DataGrid\.ts$', # Apple copyright
36+
r'^front_end[\\/]third_party[\\/].*', # 3rd party code
37+
# Apple copyright
38+
r'^front_end[\\/]ui[\\/]legacy[\\/]components[\\/]data_grid[\\/]DataGrid\.ts$',
39+
r'^node_modules[\\/].*', # 3rd party code
3540
r'^scripts[\\/]build[\\/]build_inspector_overlay\.py$', # Lines too long
3641
r'^scripts[\\/]build[\\/]code_generator_frontend\.py$',
3742
r'^scripts[\\/]deps[\\/]manage_node_deps\.py$', # Lines too long
43+
r'front_end[\\/]generated[\\/]ARIAProperties\.ts$' # Auto-generated files
44+
# Auto-generated files
45+
r'front_end[\\/]generated[\\/]InspectorBackendCommands\.ts$'
3846
]
3947

48+
4049
def _ExecuteSubProcess(input_api,
4150
output_api,
4251
script_path,
@@ -246,13 +255,7 @@ def CheckDevToolsLint(input_api, output_api):
246255
]
247256

248257
lint_related_directories = [
249-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules',
250-
'eslint'),
251-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules',
252-
'stylelint'),
253-
input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules',
254-
'@typescript-eslint'),
255-
input_api.os_path.join(scripts_directory, 'eslint_rules'),
258+
input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules'),
256259
]
257260

258261
lint_config_files = _GetAffectedFiles(
@@ -400,9 +403,38 @@ def CheckNodeModules(input_api, output_api):
400403
if not Path(file_path).is_file():
401404
results.extend([
402405
output_api.PresubmitError(
403-
"node_modules/%s is missing. Use npm run install-deps to re-create it."
406+
"node_modules/%s is missing. Use `npm run install-deps` to re-create it."
404407
% file)
405408
])
409+
410+
node_module_files = _GetAffectedFiles(input_api, [
411+
input_api.os_path.join(input_api.PresubmitLocalPath(), 'node_modules')
412+
], [], [])
413+
414+
# If the changes are above 100 assume that touching the node_modules
415+
# was intentional
416+
if len(node_module_files) == 0 or len(node_module_files) > 100:
417+
return results
418+
419+
message = (
420+
"Changes to `node_modules` detected.\n" +
421+
"This is third party code and should not be modified.\n" +
422+
"`node_module` are mainly used in testing infra\n" +
423+
"For bug fixes and features usually you should not need this change.\n"
424+
+ "Was this change intentional?")
425+
results.extend([
426+
output_api.PresubmitPromptWarning(
427+
message,
428+
locations=[
429+
output_api.PresubmitResultLocation(
430+
# Location expects relative path
431+
# But _GetAffectedFiles returns us absolute path
432+
input_api.os_path.relpath(
433+
node_module_files[0],
434+
input_api.PresubmitLocalPath()), ),
435+
])
436+
])
437+
406438
return results
407439

408440

@@ -416,7 +448,7 @@ def CheckNoUncheckedFiles(input_api, output_api):
416448
out, _ = process.communicate()
417449
if process.returncode != 0:
418450
files_changed_process = input_api.subprocess.Popen(
419-
['git', 'diff', '--name-only'],
451+
['git', 'diff'],
420452
stdout=input_api.subprocess.PIPE,
421453
stderr=input_api.subprocess.STDOUT)
422454
files_changed, _ = files_changed_process.communicate()
@@ -430,6 +462,50 @@ def CheckNoUncheckedFiles(input_api, output_api):
430462
return []
431463

432464

465+
def CheckKnownContextValues(input_api, output_api):
466+
"""Ensure all additions to `KnownContextValues.ts` following the naming convention.
467+
468+
This check ensures that all new cases added to the enum in `KnownContextValues.ts`
469+
follow the extended Kebab Case naming convention. Specifically it doesn't look at
470+
unchanged lines, because there are various existing values that cannot be changed
471+
(easily).
472+
"""
473+
# This regexp matches the one we use in `StringUtilities.isExtendedKebabCase()`.
474+
kebab_case_re = re.compile(
475+
r"^([a-z0-9]+(?:-[a-z0-9]+)*\.)*[a-z0-9]+(?:-[a-z0-9]+)*$")
476+
local_path = input_api.os_path.join('front_end', 'ui', 'visual_logging',
477+
'KnownContextValues.ts')
478+
invalid_contexts = []
479+
for f in filter(
480+
lambda x: (x.LocalPath() == local_path and x.Action() == 'M'),
481+
input_api.AffectedFiles()):
482+
# Loop only through the changed lines of the affected file.
483+
for _, line in f.ChangedContents():
484+
match = re.search(r"\s+'(.+)',", line)
485+
if match:
486+
context = match.group(1)
487+
if not kebab_case_re.match(context):
488+
invalid_contexts.append(context)
489+
continue
490+
491+
if not invalid_contexts:
492+
return []
493+
return [
494+
output_api.PresubmitError(
495+
message=f"Invalid jslog context(s): {', '.join(invalid_contexts)}",
496+
long_text=
497+
("""The jslog contexts must follow the extended Kebab Case naming convention, where
498+
words are separated with either a dash (`-`) or a dot (`.`), and all characters
499+
must be lower-case alphanumeric.
500+
"""),
501+
locations=[
502+
output_api.PresubmitResultLocation(file_path=local_path)
503+
],
504+
)
505+
]
506+
507+
508+
433509
# Canned check wrappers below.
434510

435511

@@ -466,7 +542,6 @@ def CheckGenderNeutral(input_api, output_api):
466542
return input_api.canned_checks.CheckGenderNeutral(input_api, output_api)
467543

468544

469-
470545
def CheckAuthorizedAuthor(input_api, output_api):
471546
return input_api.canned_checks.CheckAuthorizedAuthor(
472547
input_api,

build

Submodule build updated from 7133d76 to dd54bc7

build_overrides/build.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2016 The Chromium project authors. All rights reserved.
1+
# Copyright 2016 The Chromium Authors
22
# Use of this source code is governed by a BSD-style license that can be
33
# found in the LICENSE file.
44

buildtools

Submodule buildtools updated from 958004d to 88a3274

config/gni/devtools_grd_files.gni

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ grd_files_bundled_sources = [
164164
"front_end/Images/frame-crossed.svg",
165165
"front_end/Images/frame-icon.svg",
166166
"front_end/Images/frame.svg",
167-
"front_end/Images/gdp-logo-standalone.svg",
167+
"front_end/Images/gdp-logo-dark.png",
168+
"front_end/Images/gdp-logo-light.png",
168169
"front_end/Images/gear-filled.svg",
169170
"front_end/Images/gear.svg",
170171
"front_end/Images/gears.svg",
@@ -1063,6 +1064,7 @@ grd_files_unbundled_sources = [
10631064
"front_end/core/sdk/CSSQuery.js",
10641065
"front_end/core/sdk/CSSRule.js",
10651066
"front_end/core/sdk/CSSScope.js",
1067+
"front_end/core/sdk/CSSStartingStyle.js",
10661068
"front_end/core/sdk/CSSStyleDeclaration.js",
10671069
"front_end/core/sdk/CSSStyleSheetHeader.js",
10681070
"front_end/core/sdk/CSSSupports.js",
@@ -1186,6 +1188,9 @@ grd_files_unbundled_sources = [
11861188
"front_end/models/ai_assistance/data_formatters/UnitFormatters.js",
11871189
"front_end/models/ai_assistance/debug.js",
11881190
"front_end/models/ai_assistance/injected.js",
1191+
"front_end/models/ai_assistance/performance/AICallTree.js",
1192+
"front_end/models/ai_assistance/performance/AIContext.js",
1193+
"front_end/models/ai_assistance/performance/AIQueries.js",
11891194
"front_end/models/ai_code_completion/AiCodeCompletion.js",
11901195
"front_end/models/ai_code_completion/debug.js",
11911196
"front_end/models/autofill_manager/AutofillManager.js",
@@ -1443,6 +1448,7 @@ grd_files_unbundled_sources = [
14431448
"front_end/panels/ai_assistance/components/ExploreWidget.js",
14441449
"front_end/panels/ai_assistance/components/MarkdownRendererWithCodeBlock.js",
14451450
"front_end/panels/ai_assistance/components/ScrollPinHelper.js",
1451+
"front_end/panels/ai_assistance/components/PerformanceAgentMarkdownRenderer.js",
14461452
"front_end/panels/ai_assistance/components/UserActionRow.js",
14471453
"front_end/panels/ai_assistance/components/chatView.css.js",
14481454
"front_end/panels/ai_assistance/components/exploreWidget.css.js",
@@ -2214,14 +2220,10 @@ grd_files_unbundled_sources = [
22142220
"front_end/panels/timeline/timelineSelectorStatsView.css.js",
22152221
"front_end/panels/timeline/timelineStatusDialog.css.js",
22162222
"front_end/panels/timeline/timelineTreeView.css.js",
2217-
"front_end/panels/timeline/utils/AICallTree.js",
2218-
"front_end/panels/timeline/utils/AIContext.js",
22192223
"front_end/panels/timeline/utils/EntryNodes.js",
2220-
"front_end/panels/timeline/utils/FreshRecording.js",
22212224
"front_end/panels/timeline/utils/Helpers.js",
22222225
"front_end/panels/timeline/utils/IgnoreList.js",
22232226
"front_end/panels/timeline/utils/ImageCache.js",
2224-
"front_end/panels/timeline/utils/InsightAIContext.js",
22252227
"front_end/panels/timeline/utils/Treemap.js",
22262228
"front_end/panels/web_audio/WebAudioModel.js",
22272229
"front_end/panels/web_audio/WebAudioView.js",
@@ -2234,6 +2236,7 @@ grd_files_unbundled_sources = [
22342236
"front_end/panels/whats_new/releaseNoteView.css.js",
22352237
"front_end/services/puppeteer/PuppeteerConnection.js",
22362238
"front_end/services/trace_bounds/TraceBounds.js",
2239+
"front_end/services/tracing/FreshRecording.js",
22372240
"front_end/services/tracing/PerformanceTracing.js",
22382241
"front_end/services/tracing/TracingManager.js",
22392242
"front_end/services/window_bounds/WindowBoundsService.js",

config/gni/devtools_image_files.gni

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ devtools_image_files = [
1818
"toolbarResizerVertical.png",
1919
"touchCursor_2x.png",
2020
"touchCursor.png",
21+
"gdp-logo-light.png",
22+
"gdp-logo-dark.png",
2123
]
2224

2325
devtools_svg_sources = [
@@ -166,7 +168,6 @@ devtools_svg_sources = [
166168
"frame-crossed.svg",
167169
"frame-icon.svg",
168170
"frame.svg",
169-
"gdp-logo-standalone.svg",
170171
"gear-filled.svg",
171172
"gear.svg",
172173
"gears.svg",

0 commit comments

Comments
 (0)