Skip to content

Commit 25ab69c

Browse files
committed
squash 'resources/unpacked/devtools' changes from ea1001a..016fb2f
016fb2f [DevTools] Add Debugger.setBlackboxPatterns protocol method 066ae58 DevTools: Add a few more chromecast ids to the blacklist 15ddd9e DevTools: Fix annotation typo landed in cl/1907263002 35e1747 [DevTools] JSONView parsing smarter 738ee02 Update styling for rendering drawer panel d9fd81c DevTools: ConsolePanel should delegate focus() to ConsoleView. ecfee1c DevTools: Fix assorted JavaScript style issues. c332cca DevTools: Introduce eslint configuration. 3b23c18 DevTools: remove WebInspector.WorkerRuntime.FuturePort method ef46133 Devtools: Custom properties with colors should have a color swatch 46ae7ec DevTools: cleanup a batch of eslint style errors f4d96ef Update styles for network conditions drawer panel fb7310b Timeline: cleanup unused code 14ba56d DevTools: Rename ProfileDataGrid files 360fc8b Timeline: remove multipleTimelineViews experiment 168ca46 DevTools: Support Sampling Heap Profiler in DevTools eee43ed DevTools: add "search in folder" context menu item for folders in source navigator 684b5e0 DevTools: propogate ResolveVariableNames experiment from hidden to visible 23889d6 DevTools: rename totalSize to selfSize in sampling heap profiler protocol. 553a654 DevTools: Refactor profile trees: rename totalTime->total selfTime->self 72c64fc Add device frame svgs to devtools gypi 5e56139 DevTools: pretty-print HTML 02fb0e3 Expose SPDY pushes in DevTools 7935b35 DevTools: extract CPU profile independent part of CPUProfileNode. 5acdfaa DevTools: introduce the bypass service worker checkbox. 3e443a2 [DevTools] Initial implementation for an overflow option for displaying a device art outline in emulation mode. 1b00494 Revert of Devtools: Cut color picker off at bottom instead of the top (patchset #1 id:1 of https://codereview.chromium.org/1816933002/ ) 8c93cca [DevTools] Remove network headers filter experiment. bc577d1 [DevTools] Fix console-xpath.html test b9a34f4 [DevTools] Add sorting to all tabs in network git-subtree-dir: resources/unpacked/devtools git-subtree-split: 016fb2f
1 parent 47be2d5 commit 25ab69c

File tree

152 files changed

+3985
-1629
lines changed

Some content is hidden

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

152 files changed

+3985
-1629
lines changed

devtools.gypi

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@
156156
'front_end/sdk/NetworkManager.js',
157157
'front_end/sdk/NetworkRequest.js',
158158
'front_end/sdk/PaintProfiler.js',
159+
'front_end/sdk/ProfileTreeModel.js',
159160
'front_end/sdk/RemoteObject.js',
160161
'front_end/sdk/Resource.js',
161162
'front_end/sdk/ResourceTreeModel.js',
@@ -484,6 +485,18 @@
484485
'front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png',
485486
'front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png',
486487
'front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png',
488+
'front_end/emulated_devices/iPad-landscape.svg',
489+
'front_end/emulated_devices/iPad-portrait.svg',
490+
'front_end/emulated_devices/iPhone5-landscape.svg',
491+
'front_end/emulated_devices/iPhone5-portrait.svg',
492+
'front_end/emulated_devices/iPhone6-landscape.svg',
493+
'front_end/emulated_devices/iPhone6-portrait.svg',
494+
'front_end/emulated_devices/iPhone6Plus-landscape.svg',
495+
'front_end/emulated_devices/iPhone6Plus-portrait.svg',
496+
'front_end/emulated_devices/Nexus5X-landscape.svg',
497+
'front_end/emulated_devices/Nexus5X-portrait.svg',
498+
'front_end/emulated_devices/Nexus6P-landscape.svg',
499+
'front_end/emulated_devices/Nexus6P-portrait.svg'
487500
],
488501
'devtools_es_tree_js_files': [
489502
'front_end/es_tree/ESTreeWalker.js',
@@ -548,20 +561,22 @@
548561
'devtools_profiler_js_files': [
549562
'front_end/profiler/heapProfiler.css',
550563
'front_end/profiler/profilesPanel.css',
551-
'front_end/profiler/CPUProfileBottomUpDataGrid.js',
552-
'front_end/profiler/CPUProfileDataGrid.js',
564+
'front_end/profiler/BottomUpProfileDataGrid.js',
553565
'front_end/profiler/CPUProfileFlameChart.js',
554-
'front_end/profiler/CPUProfileTopDownDataGrid.js',
555566
'front_end/profiler/CPUProfileView.js',
567+
'front_end/profiler/HeapProfileView.js',
556568
'front_end/profiler/HeapSnapshotCommon.js',
557569
'front_end/profiler/HeapSnapshotDataGrids.js',
558570
'front_end/profiler/HeapSnapshotGridNodes.js',
559571
'front_end/profiler/HeapSnapshotProxy.js',
560572
'front_end/profiler/HeapSnapshotView.js',
573+
'front_end/profiler/ProfileDataGrid.js',
561574
'front_end/profiler/ProfileLauncherView.js',
562575
'front_end/profiler/ProfilesPanel.js',
563576
'front_end/profiler/ProfileTypeRegistry.js',
577+
'front_end/profiler/ProfileView.js',
564578
'front_end/profiler/TargetsComboBoxController.js',
579+
'front_end/profiler/TopDownProfileDataGrid.js',
565580
],
566581
'devtools_resources_js_files': [
567582
'front_end/resources/indexedDBViews.css',
@@ -605,6 +620,7 @@
605620
'front_end/formatter_worker/IdentityFormatter.js',
606621
'front_end/formatter_worker/JavaScriptOutline.js',
607622
'front_end/formatter_worker/FormatterWorker.js',
623+
'front_end/formatter_worker/RelaxedJSONParser.js',
608624
],
609625
'devtools_settings_js_files': [
610626
'front_end/settings/editFileSystemView.css',

front_end/.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 4
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true

front_end/.eslintignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
diff/diff_match_patch.js
2+
cm_modes/
3+
cm/
4+
acorn/
5+
protocol_externs.js

front_end/.eslintrc.js

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
module.exports = {
2+
"root": true,
3+
4+
"env": {
5+
"browser": true,
6+
"es6": true
7+
},
8+
9+
/**
10+
* ESLint rules
11+
*
12+
* All available rules: http://eslint.org/docs/rules/
13+
*
14+
* Rules take the following form:
15+
* "rule-name", [severity, { opts }]
16+
* Severity: 2 == error, 1 == warning, 0 == off.
17+
*/
18+
"rules": {
19+
20+
/**
21+
* Enforced rules
22+
*/
23+
24+
// syntax preferences
25+
"quotes": [2, "double", {
26+
"avoidEscape": true,
27+
"allowTemplateLiterals": true
28+
}],
29+
"comma-style": [2, "last"],
30+
"wrap-iife": [2, "inside"],
31+
"yoda": [2, "never"],
32+
"spaced-comment": [2, "always", {
33+
"markers": ["*"]
34+
}],
35+
"arrow-body-style": [2, "as-needed"],
36+
"accessor-pairs": [2, {
37+
"getWithoutSet": false,
38+
"setWithoutGet": false
39+
}],
40+
"handle-callback-err": 2,
41+
"id-blacklist": 2,
42+
"id-match": 2,
43+
"max-nested-callbacks": 2,
44+
45+
// anti-patterns
46+
"no-with": 2,
47+
"no-multi-str": 2,
48+
"no-caller": 2,
49+
"no-implicit-coercion": [2, {
50+
"boolean": false,
51+
"number": false,
52+
"string": false
53+
}],
54+
"no-implied-eval": 2,
55+
"no-label-var": 2,
56+
"no-new-object": 2,
57+
"no-octal-escape": 2,
58+
"no-self-compare": 2,
59+
"no-shadow-restricted-names": 2,
60+
61+
// es2015 features
62+
"no-useless-constructor": 2,
63+
"require-yield": 2,
64+
"yield-star-spacing": 2,
65+
"sort-imports": 2,
66+
"template-curly-spacing": [2, "never"],
67+
68+
// spacing details
69+
"space-infix-ops": 2,
70+
"space-in-parens": [2, "never"],
71+
"space-before-function-paren": [ 2, "never" ],
72+
"no-whitespace-before-property": 2,
73+
"space-unary-ops": [2, {
74+
"words": false,
75+
"nonwords": false
76+
}],
77+
"keyword-spacing": [2,{
78+
"overrides": {
79+
"if": {"after": true},
80+
"else": {"after": true},
81+
"for": {"after": true},
82+
"while": {"after": true},
83+
"do": {"after": true},
84+
"switch": {"after": true},
85+
"return": {"after": true}
86+
}
87+
}],
88+
"arrow-spacing": [
89+
2,
90+
{
91+
"after": true,
92+
"before": true
93+
}
94+
],
95+
96+
// file whitespace
97+
"no-multiple-empty-lines": 2,
98+
"no-mixed-spaces-and-tabs": 2,
99+
"no-trailing-spaces": 2,
100+
"eol-last": 2,
101+
"linebreak-style": [ 2, "unix" ],
102+
103+
104+
/**
105+
* Disabled, aspirational rules
106+
*/
107+
108+
// brace-style is disabled, as eslint cannot enforce 1tbs as default, but allman for functions
109+
"brace-style": [0, "allman", { "allowSingleLine": true }],
110+
111+
// key-spacing is disabled, as some objects use value-aligned spacing, some not.
112+
"key-spacing": [0, {
113+
"beforeColon": false,
114+
"afterColon": true,
115+
"align": "value"
116+
}],
117+
// quote-props is diabled, as property quoting styles are too varied to enforce.
118+
"quote-props": [0, "as-needed"],
119+
120+
// no-implicit-globals will prevent accidental globals
121+
"no-implicit-globals": [0]
122+
123+
}
124+
};

front_end/.jscsrc

Lines changed: 0 additions & 84 deletions
This file was deleted.

front_end/Runtime.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ function loadResourcePromise(url)
8080
*/
8181
function normalizePath(path)
8282
{
83-
if (path.indexOf("..") === -1 && path.indexOf('.') === -1)
83+
if (path.indexOf("..") === -1 && path.indexOf(".") === -1)
8484
return path;
8585

8686
var normalizedSegments = [];

front_end/Tests.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,36 @@ TestSuite.prototype.testNetworkTiming = function()
526526
};
527527

528528

529+
TestSuite.prototype.testPushTimes = function(url)
530+
{
531+
var test = this;
532+
var pendingResourceCount = 2;
533+
534+
function finishResource(resource, finishTime)
535+
{
536+
test.assertTrue(typeof resource.timing.pushStart === "number" && resource.timing.pushStart > 0, `pushStart is invalid: ${resource.timing.pushStart}`);
537+
test.assertTrue(typeof resource.timing.pushEnd === "number", `pushEnd is invalid: ${resource.timing.pushEnd}`);
538+
test.assertTrue(resource.timing.pushStart < resource.startTime, "pushStart should be before startTime");
539+
if (resource.url.endsWith("?pushUseNullEndTime")) {
540+
test.assertTrue(resource.timing.pushEnd === 0, `pushEnd should be 0 but is ${resource.timing.pushEnd}`);
541+
} else {
542+
test.assertTrue(resource.timing.pushStart < resource.timing.pushEnd, `pushStart should be before pushEnd (${resource.timing.pushStart} >= ${resource.timing.pushEnd})`);
543+
// The below assertion is just due to the way we generate times in the moch URLRequestJob and is not generally an invariant.
544+
test.assertTrue(resource.timing.pushEnd < resource.endTime, "pushEnd should be before endTime");
545+
test.assertTrue(resource.startTime < resource.timing.pushEnd, "pushEnd should be after startTime");
546+
}
547+
if (!--pendingResourceCount)
548+
test.releaseControl();
549+
}
550+
551+
this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource, true);
552+
553+
test.evaluateInConsole_("addImage('" + url + "')", function(resultText) {});
554+
test.evaluateInConsole_("addImage('" + url + "?pushUseNullEndTime')", function(resultText) {});
555+
this.takeControl();
556+
};
557+
558+
529559
TestSuite.prototype.testConsoleOnNavigateBack = function()
530560
{
531561
if (WebInspector.multitargetConsoleModel.messages().length === 1)

front_end/accessibility/AccessibilityNodeView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ WebInspector.AXNodeIgnoredReasonTreeElement.prototype = {
603603
WebInspector.AXNodeIgnoredReasonTreeElement.createReasonElement = function(reason, axNode)
604604
{
605605
var reasonElement = null;
606-
switch(reason) {
606+
switch (reason) {
607607
case "activeModalDialog":
608608
reasonElement = WebInspector.formatLocalized("Element is hidden by active modal dialog:\u00a0", []);
609609
break;

front_end/animation/AnimationGroupPreviewUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ WebInspector.AnimationGroupPreviewUI.prototype = {
7373
line.style.stroke = WebInspector.AnimationUI.Color(this._model.animations()[i]);
7474
}
7575
}
76-
}
76+
}

front_end/animation/AnimationModel.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ WebInspector.AnimationModel.KeyframesRule = function(target, payload)
568568
{
569569
WebInspector.SDKObject.call(this, target);
570570
this._payload = payload;
571-
this._keyframes = this._payload.keyframes.map(function (keyframeStyle) {
571+
this._keyframes = this._payload.keyframes.map(function(keyframeStyle) {
572572
return new WebInspector.AnimationModel.KeyframeStyle(target, keyframeStyle);
573573
});
574574
}
@@ -579,7 +579,7 @@ WebInspector.AnimationModel.KeyframesRule.prototype = {
579579
*/
580580
_setKeyframesPayload: function(payload)
581581
{
582-
this._keyframes = payload.map(function (keyframeStyle) {
582+
this._keyframes = payload.map(function(keyframeStyle) {
583583
return new WebInspector.AnimationModel.KeyframeStyle(this._target, keyframeStyle);
584584
});
585585
},

front_end/animation/AnimationTimeline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,4 +781,4 @@ WebInspector.AnimationTimeline.ButtonProvider.prototype = {
781781
{
782782
return this._button;
783783
}
784-
}
784+
}

front_end/animation/AnimationUI.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ WebInspector.AnimationUI.prototype = {
321321
/**
322322
* @param {!Event} event
323323
*/
324-
_mouseMove: function (event)
324+
_mouseMove: function(event)
325325
{
326326
this._movementInMs = (event.clientX - this._downMouseX) / this._timeline.pixelMsRatio();
327327
if (this._delay() + this._duration() > this._timeline.duration() * 0.8)

0 commit comments

Comments
 (0)