Skip to content

Commit

Permalink
squash 'resources/unpacked/devtools' changes from ea1001a..016fb2f
Browse files Browse the repository at this point in the history
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
  • Loading branch information
darwin committed Apr 23, 2016
1 parent 47be2d5 commit 25ab69c
Show file tree
Hide file tree
Showing 152 changed files with 3,985 additions and 1,629 deletions.
22 changes: 19 additions & 3 deletions devtools.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
'front_end/sdk/NetworkManager.js',
'front_end/sdk/NetworkRequest.js',
'front_end/sdk/PaintProfiler.js',
'front_end/sdk/ProfileTreeModel.js',
'front_end/sdk/RemoteObject.js',
'front_end/sdk/Resource.js',
'front_end/sdk/ResourceTreeModel.js',
Expand Down Expand Up @@ -484,6 +485,18 @@
'front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png',
'front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png',
'front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png',
'front_end/emulated_devices/iPad-landscape.svg',
'front_end/emulated_devices/iPad-portrait.svg',
'front_end/emulated_devices/iPhone5-landscape.svg',
'front_end/emulated_devices/iPhone5-portrait.svg',
'front_end/emulated_devices/iPhone6-landscape.svg',
'front_end/emulated_devices/iPhone6-portrait.svg',
'front_end/emulated_devices/iPhone6Plus-landscape.svg',
'front_end/emulated_devices/iPhone6Plus-portrait.svg',
'front_end/emulated_devices/Nexus5X-landscape.svg',
'front_end/emulated_devices/Nexus5X-portrait.svg',
'front_end/emulated_devices/Nexus6P-landscape.svg',
'front_end/emulated_devices/Nexus6P-portrait.svg'
],
'devtools_es_tree_js_files': [
'front_end/es_tree/ESTreeWalker.js',
Expand Down Expand Up @@ -548,20 +561,22 @@
'devtools_profiler_js_files': [
'front_end/profiler/heapProfiler.css',
'front_end/profiler/profilesPanel.css',
'front_end/profiler/CPUProfileBottomUpDataGrid.js',
'front_end/profiler/CPUProfileDataGrid.js',
'front_end/profiler/BottomUpProfileDataGrid.js',
'front_end/profiler/CPUProfileFlameChart.js',
'front_end/profiler/CPUProfileTopDownDataGrid.js',
'front_end/profiler/CPUProfileView.js',
'front_end/profiler/HeapProfileView.js',
'front_end/profiler/HeapSnapshotCommon.js',
'front_end/profiler/HeapSnapshotDataGrids.js',
'front_end/profiler/HeapSnapshotGridNodes.js',
'front_end/profiler/HeapSnapshotProxy.js',
'front_end/profiler/HeapSnapshotView.js',
'front_end/profiler/ProfileDataGrid.js',
'front_end/profiler/ProfileLauncherView.js',
'front_end/profiler/ProfilesPanel.js',
'front_end/profiler/ProfileTypeRegistry.js',
'front_end/profiler/ProfileView.js',
'front_end/profiler/TargetsComboBoxController.js',
'front_end/profiler/TopDownProfileDataGrid.js',
],
'devtools_resources_js_files': [
'front_end/resources/indexedDBViews.css',
Expand Down Expand Up @@ -605,6 +620,7 @@
'front_end/formatter_worker/IdentityFormatter.js',
'front_end/formatter_worker/JavaScriptOutline.js',
'front_end/formatter_worker/FormatterWorker.js',
'front_end/formatter_worker/RelaxedJSONParser.js',
],
'devtools_settings_js_files': [
'front_end/settings/editFileSystemView.css',
Expand Down
9 changes: 9 additions & 0 deletions front_end/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 5 additions & 0 deletions front_end/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
diff/diff_match_patch.js
cm_modes/
cm/
acorn/
protocol_externs.js
124 changes: 124 additions & 0 deletions front_end/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
module.exports = {
"root": true,

"env": {
"browser": true,
"es6": true
},

/**
* ESLint rules
*
* All available rules: http://eslint.org/docs/rules/
*
* Rules take the following form:
* "rule-name", [severity, { opts }]
* Severity: 2 == error, 1 == warning, 0 == off.
*/
"rules": {

/**
* Enforced rules
*/

// syntax preferences
"quotes": [2, "double", {
"avoidEscape": true,
"allowTemplateLiterals": true
}],
"comma-style": [2, "last"],
"wrap-iife": [2, "inside"],
"yoda": [2, "never"],
"spaced-comment": [2, "always", {
"markers": ["*"]
}],
"arrow-body-style": [2, "as-needed"],
"accessor-pairs": [2, {
"getWithoutSet": false,
"setWithoutGet": false
}],
"handle-callback-err": 2,
"id-blacklist": 2,
"id-match": 2,
"max-nested-callbacks": 2,

// anti-patterns
"no-with": 2,
"no-multi-str": 2,
"no-caller": 2,
"no-implicit-coercion": [2, {
"boolean": false,
"number": false,
"string": false
}],
"no-implied-eval": 2,
"no-label-var": 2,
"no-new-object": 2,
"no-octal-escape": 2,
"no-self-compare": 2,
"no-shadow-restricted-names": 2,

// es2015 features
"no-useless-constructor": 2,
"require-yield": 2,
"yield-star-spacing": 2,
"sort-imports": 2,
"template-curly-spacing": [2, "never"],

// spacing details
"space-infix-ops": 2,
"space-in-parens": [2, "never"],
"space-before-function-paren": [ 2, "never" ],
"no-whitespace-before-property": 2,
"space-unary-ops": [2, {
"words": false,
"nonwords": false
}],
"keyword-spacing": [2,{
"overrides": {
"if": {"after": true},
"else": {"after": true},
"for": {"after": true},
"while": {"after": true},
"do": {"after": true},
"switch": {"after": true},
"return": {"after": true}
}
}],
"arrow-spacing": [
2,
{
"after": true,
"before": true
}
],

// file whitespace
"no-multiple-empty-lines": 2,
"no-mixed-spaces-and-tabs": 2,
"no-trailing-spaces": 2,
"eol-last": 2,
"linebreak-style": [ 2, "unix" ],


/**
* Disabled, aspirational rules
*/

// brace-style is disabled, as eslint cannot enforce 1tbs as default, but allman for functions
"brace-style": [0, "allman", { "allowSingleLine": true }],

// key-spacing is disabled, as some objects use value-aligned spacing, some not.
"key-spacing": [0, {
"beforeColon": false,
"afterColon": true,
"align": "value"
}],
// quote-props is diabled, as property quoting styles are too varied to enforce.
"quote-props": [0, "as-needed"],

// no-implicit-globals will prevent accidental globals
"no-implicit-globals": [0]

}
};
84 changes: 0 additions & 84 deletions front_end/.jscsrc

This file was deleted.

2 changes: 1 addition & 1 deletion front_end/Runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function loadResourcePromise(url)
*/
function normalizePath(path)
{
if (path.indexOf("..") === -1 && path.indexOf('.') === -1)
if (path.indexOf("..") === -1 && path.indexOf(".") === -1)
return path;

var normalizedSegments = [];
Expand Down
30 changes: 30 additions & 0 deletions front_end/Tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,36 @@ TestSuite.prototype.testNetworkTiming = function()
};


TestSuite.prototype.testPushTimes = function(url)
{
var test = this;
var pendingResourceCount = 2;

function finishResource(resource, finishTime)
{
test.assertTrue(typeof resource.timing.pushStart === "number" && resource.timing.pushStart > 0, `pushStart is invalid: ${resource.timing.pushStart}`);
test.assertTrue(typeof resource.timing.pushEnd === "number", `pushEnd is invalid: ${resource.timing.pushEnd}`);
test.assertTrue(resource.timing.pushStart < resource.startTime, "pushStart should be before startTime");
if (resource.url.endsWith("?pushUseNullEndTime")) {
test.assertTrue(resource.timing.pushEnd === 0, `pushEnd should be 0 but is ${resource.timing.pushEnd}`);
} else {
test.assertTrue(resource.timing.pushStart < resource.timing.pushEnd, `pushStart should be before pushEnd (${resource.timing.pushStart} >= ${resource.timing.pushEnd})`);
// The below assertion is just due to the way we generate times in the moch URLRequestJob and is not generally an invariant.
test.assertTrue(resource.timing.pushEnd < resource.endTime, "pushEnd should be before endTime");
test.assertTrue(resource.startTime < resource.timing.pushEnd, "pushEnd should be after startTime");
}
if (!--pendingResourceCount)
test.releaseControl();
}

this.addSniffer(WebInspector.NetworkDispatcher.prototype, "_finishNetworkRequest", finishResource, true);

test.evaluateInConsole_("addImage('" + url + "')", function(resultText) {});
test.evaluateInConsole_("addImage('" + url + "?pushUseNullEndTime')", function(resultText) {});
this.takeControl();
};


TestSuite.prototype.testConsoleOnNavigateBack = function()
{
if (WebInspector.multitargetConsoleModel.messages().length === 1)
Expand Down
2 changes: 1 addition & 1 deletion front_end/accessibility/AccessibilityNodeView.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ WebInspector.AXNodeIgnoredReasonTreeElement.prototype = {
WebInspector.AXNodeIgnoredReasonTreeElement.createReasonElement = function(reason, axNode)
{
var reasonElement = null;
switch(reason) {
switch (reason) {
case "activeModalDialog":
reasonElement = WebInspector.formatLocalized("Element is hidden by active modal dialog:\u00a0", []);
break;
Expand Down
2 changes: 1 addition & 1 deletion front_end/animation/AnimationGroupPreviewUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,4 @@ WebInspector.AnimationGroupPreviewUI.prototype = {
line.style.stroke = WebInspector.AnimationUI.Color(this._model.animations()[i]);
}
}
}
}
4 changes: 2 additions & 2 deletions front_end/animation/AnimationModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ WebInspector.AnimationModel.KeyframesRule = function(target, payload)
{
WebInspector.SDKObject.call(this, target);
this._payload = payload;
this._keyframes = this._payload.keyframes.map(function (keyframeStyle) {
this._keyframes = this._payload.keyframes.map(function(keyframeStyle) {
return new WebInspector.AnimationModel.KeyframeStyle(target, keyframeStyle);
});
}
Expand All @@ -579,7 +579,7 @@ WebInspector.AnimationModel.KeyframesRule.prototype = {
*/
_setKeyframesPayload: function(payload)
{
this._keyframes = payload.map(function (keyframeStyle) {
this._keyframes = payload.map(function(keyframeStyle) {
return new WebInspector.AnimationModel.KeyframeStyle(this._target, keyframeStyle);
});
},
Expand Down
2 changes: 1 addition & 1 deletion front_end/animation/AnimationTimeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -781,4 +781,4 @@ WebInspector.AnimationTimeline.ButtonProvider.prototype = {
{
return this._button;
}
}
}
2 changes: 1 addition & 1 deletion front_end/animation/AnimationUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ WebInspector.AnimationUI.prototype = {
/**
* @param {!Event} event
*/
_mouseMove: function (event)
_mouseMove: function(event)
{
this._movementInMs = (event.clientX - this._downMouseX) / this._timeline.pixelMsRatio();
if (this._delay() + this._duration() > this._timeline.duration() * 0.8)
Expand Down
Loading

0 comments on commit 25ab69c

Please sign in to comment.