Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(376)

Unified Diff: tracing/tracing/ui/base/deep_utils.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: rebase Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tracing/tracing/ui/base/deep_utils.html
diff --git a/tracing/tracing/ui/base/deep_utils.html b/tracing/tracing/ui/base/deep_utils.html
index 890297109c8e67fffe41e6e096c3d2137f5fbaab..73e7c63d1fa5897d593faeee1d91cf66e911d044 100644
--- a/tracing/tracing/ui/base/deep_utils.html
+++ b/tracing/tracing/ui/base/deep_utils.html
@@ -12,8 +12,7 @@ found in the LICENSE file.
tr.exportTo('tr.b', function() {
function _iterateElementDeeplyImpl(element, cb, thisArg, includeElement) {
- if (includeElement && cb.call(thisArg, element))
- return true;
+ if (includeElement && cb.call(thisArg, element)) return true;
if (element.root &&
element.root !== element &&
@@ -24,9 +23,11 @@ tr.exportTo('tr.b', function() {
return true;
}
var children = Polymer.dom(element).children;
- for (var i = 0; i < children.length; i++)
- if (_iterateElementDeeplyImpl(children[i], cb, thisArg, true))
+ for (var i = 0; i < children.length; i++) {
+ if (_iterateElementDeeplyImpl(children[i], cb, thisArg, true)) {
return true;
+ }
+ }
return false;
}
@@ -39,8 +40,9 @@ tr.exportTo('tr.b', function() {
var foundElement = undefined;
function matches(element) {
var match = predicate(element);
- if (!match)
+ if (!match) {
return false;
+ }
foundElement = element;
return true;
}
@@ -73,8 +75,7 @@ tr.exportTo('tr.b', function() {
}
function findDeepElementWithTextContent(element, re) {
return findDeepElementMatchingPredicate(element, function(element) {
- if (element.children.length !== 0)
- return false;
+ if (element.children.length !== 0) return false;
return re.test(Polymer.dom(element).textContent);
});
}
« no previous file with comments | « tracing/tracing/ui/base/container_that_decorates_its_children.html ('k') | tracing/tracing/ui/base/dom_helpers.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698