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

Unified Diff: chrome/browser/resources/uber/uber_utils.js

Issue 2600683002: Run tools/clang-format-js on some of chrome/browser/resources/ (Closed)
Patch Set: event_handler.js Created 4 years 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: chrome/browser/resources/uber/uber_utils.js
diff --git a/chrome/browser/resources/uber/uber_utils.js b/chrome/browser/resources/uber/uber_utils.js
index 9964321b1519e6f6003cb43cfd7e39f572d8a428..a2d6aad1f3733bb7400caaab1b818f7a1c571864 100644
--- a/chrome/browser/resources/uber/uber_utils.js
+++ b/chrome/browser/resources/uber/uber_utils.js
@@ -45,8 +45,8 @@ cr.define('uber', function() {
for (var i = 0; i < headerElements.length; i++) {
// As a workaround for http://crbug.com/231830, set the transform to
// 'none' rather than 0px.
- headerElements[i].style.webkitTransform = offset ?
- 'translateX(' + offset + 'px)' : 'none';
+ headerElements[i].style.webkitTransform =
+ offset ? 'translateX(' + offset + 'px)' : 'none';
}
invokeMethodOnParent('adjustToScroll', scrollLeft);
@@ -67,12 +67,12 @@ cr.define('uber', function() {
* @param {Event} e The message event.
*/
function handleWindowMessage(e) {
- e = /** @type {!MessageEvent<!{method: string, params: *}>} */(e);
+ e = /** @type {!MessageEvent<!{method: string, params: *}>} */ (e);
if (e.data.method === 'frameSelected') {
handleFrameSelected();
} else if (e.data.method === 'mouseWheel') {
handleMouseWheel(
- /** @type {{deltaX: number, deltaY: number}} */(e.data.params));
+ /** @type {{deltaX: number, deltaY: number}} */ (e.data.params));
} else if (e.data.method === 'mouseDown') {
handleMouseDown();
} else if (e.data.method === 'popState') {
@@ -168,16 +168,15 @@ cr.define('uber', function() {
* @param {boolean} replace If true, navigate with replacement.
*/
function updateHistory(state, path, replace) {
- var historyFunction = replace ?
- window.history.replaceState :
- window.history.pushState;
+ var historyFunction =
+ replace ? window.history.replaceState : window.history.pushState;
if (hasParent()) {
// If there's a parent, always replaceState. The parent will do the actual
// pushState.
historyFunction = window.history.replaceState;
- invokeMethodOnParent('updateHistory', {
- state: state, path: path, replace: replace});
+ invokeMethodOnParent(
+ 'updateHistory', {state: state, path: path, replace: replace});
}
historyFunction.call(window.history, state, '', '/' + path);
}

Powered by Google App Engine
This is Rietveld 408576698