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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js

Issue 2440953003: DevTools: use semicolons after each statement. (Closed)
Patch Set: rebaseline Created 4 years, 2 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: third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
index 5e21725946ae869686f8066d51ee08b081bf8dfe..ba4d0820a469ab69105a6c7e05ec09d153f8a142 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/UIUtils.js
@@ -67,7 +67,7 @@ WebInspector.installDragHandle = function(element, elementDragStart, elementDrag
element.addEventListener("mouseup", onMouseUp, false);
if (hoverCursor !== null)
element.style.cursor = hoverCursor || cursor;
-}
+};
/**
* @param {!Element} targetElement
@@ -120,14 +120,14 @@ WebInspector.elementDragStart = function(targetElement, elementDragStart, elemen
WebInspector._restoreCursorAfterDrag = null;
}
event.preventDefault();
-}
+};
WebInspector._mouseOutWhileDragging = function()
{
var document = WebInspector._mouseOutWhileDraggingTargetDocument;
WebInspector._unregisterMouseOutWhileDragging();
WebInspector._elementDraggingGlassPane = new WebInspector.GlassPane(document);
-}
+};
WebInspector._unregisterMouseOutWhileDragging = function()
{
@@ -135,7 +135,7 @@ WebInspector._unregisterMouseOutWhileDragging = function()
return;
WebInspector._mouseOutWhileDraggingTargetDocument.removeEventListener("mouseout", WebInspector._mouseOutWhileDragging, true);
delete WebInspector._mouseOutWhileDraggingTargetDocument;
-}
+};
WebInspector._unregisterDragEvents = function()
{
@@ -147,7 +147,7 @@ WebInspector._unregisterDragEvents = function()
WebInspector._dragEventsTargetDocumentTop.removeEventListener("mouseup", WebInspector._elementDragEnd, true);
delete WebInspector._dragEventsTargetDocument;
delete WebInspector._dragEventsTargetDocumentTop;
-}
+};
/**
* @param {!Event} event
@@ -161,7 +161,7 @@ WebInspector._elementDragMove = function(event)
if (WebInspector._elementDraggingEventListener(/** @type {!MouseEvent} */ (event)))
WebInspector._cancelDragEvents(event);
-}
+};
/**
* @param {!Event} event
@@ -180,7 +180,7 @@ WebInspector._cancelDragEvents = function(event)
delete WebInspector._elementDraggingGlassPane;
delete WebInspector._elementDraggingEventListener;
delete WebInspector._elementEndDraggingEventListener;
-}
+};
/**
* @param {!Event} event
@@ -194,7 +194,7 @@ WebInspector._elementDragEnd = function(event)
event.preventDefault();
if (elementDragEnd)
elementDragEnd(/** @type {!MouseEvent} */ (event));
-}
+};
/**
* @param {!Element} element
@@ -269,7 +269,7 @@ WebInspector.installInertialDragHandle = function(element, elementDragStart, ele
velocityY *= k;
elementDrag(lastX, lastY);
}
-}
+};
/**
* @constructor
@@ -285,7 +285,7 @@ WebInspector.GlassPane = function(document, dimmed)
document.body.appendChild(this.element);
WebInspector._glassPane = this;
// TODO(dgozman): disallow focus outside of glass pane?
-}
+};
WebInspector.GlassPane.prototype = {
dispose: function()
@@ -293,7 +293,7 @@ WebInspector.GlassPane.prototype = {
delete WebInspector._glassPane;
this.element.remove();
}
-}
+};
/** @type {!WebInspector.GlassPane|undefined} */
WebInspector._glassPane;
@@ -319,7 +319,7 @@ WebInspector.isBeingEdited = function(node)
element = element.parentElementOrShadowHost();
}
return false;
-}
+};
/**
* @return {boolean}
@@ -334,7 +334,7 @@ WebInspector.isEditing = function()
if (!focused)
return false;
return focused.classList.contains("text-prompt") || focused.nodeName === "INPUT" || focused.nodeName === "TEXTAREA";
-}
+};
/**
* @param {!Element} element
@@ -357,7 +357,7 @@ WebInspector.markBeingEdited = function(element, value)
--WebInspector.__editingCount;
}
return true;
-}
+};
WebInspector.CSSNumberRegex = /^(-?(?:\d+(?:\.\d+)?|\.\d+))$/;
@@ -384,7 +384,7 @@ WebInspector._valueModificationDirection = function(event)
direction = "Down";
}
return direction;
-}
+};
/**
* @param {string} hexString
@@ -436,7 +436,7 @@ WebInspector._modifiedHexValue = function(hexString, event)
for (var i = 0, lengthDelta = hexStrLen - resultString.length; i < lengthDelta; ++i)
resultString = "0" + resultString;
return resultString;
-}
+};
/**
* @param {number} number
@@ -474,7 +474,7 @@ WebInspector._modifiedFloatNumber = function(number, event)
return null;
return result;
-}
+};
/**
* @param {string} wordString
@@ -506,7 +506,7 @@ WebInspector.createReplacementString = function(wordString, event, customNumberH
}
}
return replacementString;
-}
+};
/**
* @param {!Event} event
@@ -571,7 +571,7 @@ WebInspector.handleElementValueModifications = function(event, element, finishHa
return true;
}
return false;
-}
+};
/**
* @param {number} ms
@@ -583,7 +583,7 @@ Number.preciseMillisToString = function(ms, precision)
precision = precision || 0;
var format = "%." + precision + "f\u2009ms";
return WebInspector.UIString(format, ms);
-}
+};
/** @type {!WebInspector.UIStringFormat} */
WebInspector._microsFormat = new WebInspector.UIStringFormat("%.0f\u2009\u03bcs");
@@ -640,7 +640,7 @@ Number.millisToString = function(ms, higherResolution)
var days = hours / 24;
return WebInspector._daysFormat.format(days);
-}
+};
/**
* @param {number} seconds
@@ -652,7 +652,7 @@ Number.secondsToString = function(seconds, higherResolution)
if (!isFinite(seconds))
return "-";
return Number.millisToString(seconds * 1000, higherResolution);
-}
+};
/**
* @param {number} bytes
@@ -674,7 +674,7 @@ Number.bytesToString = function(bytes)
return WebInspector.UIString("%.1f\u2009MB", megabytes);
else
return WebInspector.UIString("%.0f\u2009MB", megabytes);
-}
+};
/**
* @param {number} num
@@ -687,7 +687,7 @@ Number.withThousandsSeparator = function(num)
while (str.match(re))
str = str.replace(re, "$1\u2009$2"); // \u2009 is a thin space.
return str;
-}
+};
/**
* @param {string} format
@@ -710,7 +710,7 @@ WebInspector.formatLocalized = function(format, substitutions)
return a;
}
return String.format(WebInspector.UIString(format), substitutions, formatters, createElement("span"), append).formattedResult;
-}
+};
/**
* @return {string}
@@ -718,7 +718,7 @@ WebInspector.formatLocalized = function(format, substitutions)
WebInspector.openLinkExternallyLabel = function()
{
return WebInspector.UIString.capitalize("Open ^link in ^new ^tab");
-}
+};
/**
* @return {string}
@@ -726,7 +726,7 @@ WebInspector.openLinkExternallyLabel = function()
WebInspector.copyLinkAddressLabel = function()
{
return WebInspector.UIString.capitalize("Copy ^link ^address");
-}
+};
/**
* @return {string}
@@ -734,7 +734,7 @@ WebInspector.copyLinkAddressLabel = function()
WebInspector.anotherProfilerActiveLabel = function()
{
return WebInspector.UIString("Another profiler is already active");
-}
+};
/**
* @param {string|undefined} description
@@ -745,7 +745,7 @@ WebInspector.asyncStackTraceLabel = function(description)
if (description)
return description + " " + WebInspector.UIString("(async)");
return WebInspector.UIString("Async Call");
-}
+};
/**
* @param {!Element} element
@@ -755,7 +755,7 @@ WebInspector.installComponentRootStyles = function(element)
WebInspector.appendStyle(element, "ui/inspectorCommon.css");
WebInspector.themeSupport.injectHighlightStyleSheets(element);
element.classList.add("platform-" + WebInspector.platform());
-}
+};
/**
* @param {!Element} element
@@ -771,7 +771,7 @@ WebInspector.createShadowRootWithCoreStyles = function(element, cssFile)
WebInspector.appendStyle(shadowRoot, cssFile);
shadowRoot.addEventListener("focus", WebInspector._focusChanged.bind(WebInspector), true);
return shadowRoot;
-}
+};
/**
* @param {!Document} document
@@ -781,7 +781,7 @@ WebInspector._windowFocused = function(document, event)
{
if (event.target.document.nodeType === Node.DOCUMENT_NODE)
document.body.classList.remove("inactive");
-}
+};
/**
* @param {!Document} document
@@ -791,7 +791,7 @@ WebInspector._windowBlurred = function(document, event)
{
if (event.target.document.nodeType === Node.DOCUMENT_NODE)
document.body.classList.add("inactive");
-}
+};
/**
* @param {!Event} event
@@ -801,7 +801,7 @@ WebInspector._focusChanged = function(event)
var document = event.target && event.target.ownerDocument;
var element = document ? document.deepActiveElement() : null;
WebInspector.Widget.focusWidgetForNode(element);
-}
+};
/**
* @param {!Element} element
@@ -812,7 +812,7 @@ WebInspector.ElementFocusRestorer = function(element)
this._element = element;
this._previous = element.ownerDocument.deepActiveElement();
element.focus();
-}
+};
WebInspector.ElementFocusRestorer.prototype = {
restore: function()
@@ -824,7 +824,7 @@ WebInspector.ElementFocusRestorer.prototype = {
this._previous = null;
this._element = null;
}
-}
+};
/**
* @param {!Element} element
@@ -837,7 +837,7 @@ WebInspector.highlightSearchResult = function(element, offset, length, domChange
{
var result = WebInspector.highlightSearchResults(element, [new WebInspector.SourceRange(offset, length)], domChanges);
return result.length ? result[0] : null;
-}
+};
/**
* @param {!Element} element
@@ -848,7 +848,7 @@ WebInspector.highlightSearchResult = function(element, offset, length, domChange
WebInspector.highlightSearchResults = function(element, resultRanges, changes)
{
return WebInspector.highlightRangesWithStyleClass(element, resultRanges, WebInspector.highlightedSearchResultClassName, changes);
-}
+};
/**
* @param {!Element} element
@@ -867,7 +867,7 @@ WebInspector.runCSSAnimationOnce = function(element, className)
element.addEventListener("webkitAnimationEnd", animationEndCallback, false);
element.classList.add(className);
-}
+};
/**
* @param {!Element} element
@@ -952,7 +952,7 @@ WebInspector.highlightRangesWithStyleClass = function(element, resultRanges, sty
}
return highlightNodes;
-}
+};
WebInspector.applyDomChanges = function(domChanges)
{
@@ -967,7 +967,7 @@ WebInspector.applyDomChanges = function(domChanges)
break;
}
}
-}
+};
WebInspector.revertDomChanges = function(domChanges)
{
@@ -982,7 +982,7 @@ WebInspector.revertDomChanges = function(domChanges)
break;
}
}
-}
+};
/**
* @param {!Element} element
@@ -1004,7 +1004,7 @@ WebInspector.measurePreferredSize = function(element, containerElement)
else
element.remove();
return result;
-}
+};
/**
* @constructor
@@ -1014,7 +1014,7 @@ WebInspector.InvokeOnceHandlers = function(autoInvoke)
{
this._handlers = null;
this._autoInvoke = autoInvoke;
-}
+};
WebInspector.InvokeOnceHandlers.prototype = {
/**
@@ -1057,7 +1057,7 @@ WebInspector.InvokeOnceHandlers.prototype = {
methods[j].call(object);
}
}
-}
+};
WebInspector._coalescingLevel = 0;
WebInspector._postUpdateHandlers = null;
@@ -1066,7 +1066,7 @@ WebInspector.startBatchUpdate = function()
{
if (!WebInspector._coalescingLevel++)
WebInspector._postUpdateHandlers = new WebInspector.InvokeOnceHandlers(false);
-}
+};
WebInspector.endBatchUpdate = function()
{
@@ -1074,7 +1074,7 @@ WebInspector.endBatchUpdate = function()
return;
WebInspector._postUpdateHandlers.scheduleInvoke();
WebInspector._postUpdateHandlers = null;
-}
+};
/**
* @param {!Object} object
@@ -1085,7 +1085,7 @@ WebInspector.invokeOnceAfterBatchUpdate = function(object, method)
if (!WebInspector._postUpdateHandlers)
WebInspector._postUpdateHandlers = new WebInspector.InvokeOnceHandlers(true);
WebInspector._postUpdateHandlers.add(object, method);
-}
+};
/**
* @param {!Window} window
@@ -1131,7 +1131,7 @@ WebInspector.animateFunction = function(window, func, params, frames, animationC
}
return cancelAnimation;
-}
+};
/**
* @constructor
@@ -1144,7 +1144,7 @@ WebInspector.LongClickController = function(element, callback)
this._element = element;
this._callback = callback;
this._enable();
-}
+};
WebInspector.LongClickController.prototype = {
reset: function()
@@ -1206,7 +1206,7 @@ WebInspector.LongClickController.prototype = {
},
__proto__: WebInspector.Object.prototype
-}
+};
/**
* @param {!Document} document
@@ -1225,7 +1225,7 @@ WebInspector.initializeUIUtils = function(document, themeSetting)
var body = /** @type {!Element} */ (document.body);
WebInspector.appendStyle(body, "ui/inspectorStyle.css");
WebInspector.appendStyle(body, "ui/popover.css");
-}
+};
/**
* @param {string} name
@@ -1234,7 +1234,7 @@ WebInspector.initializeUIUtils = function(document, themeSetting)
WebInspector.beautifyFunctionName = function(name)
{
return name || WebInspector.UIString("(anonymous)");
-}
+};
/**
* @param {string} localName
@@ -1653,7 +1653,7 @@ WebInspector.bindInput = function(input, apply, validate, numeric)
}
return setValue;
-}
+};
/**
* @constructor
@@ -1670,7 +1670,7 @@ WebInspector.ThemeSupport = function(setting)
/** @type {!Map<string, string>} */
this._cachedThemePatches = new Map();
this._setting = setting;
-}
+};
/**
* @enum {number}
@@ -1875,7 +1875,7 @@ WebInspector.ThemeSupport.prototype = {
var hue = hsla[0];
var sat = hsla[1];
var lit = hsla[2];
- var alpha = hsla[3]
+ var alpha = hsla[3];
switch (this._themeName) {
case "dark":
@@ -1896,7 +1896,7 @@ WebInspector.ThemeSupport.prototype = {
hsla[2] = Number.constrain(lit, 0, 1);
hsla[3] = Number.constrain(alpha, 0, 1);
}
-}
+};
/**
* @param {?NetworkAgent.ResourcePriority} priority
@@ -1916,7 +1916,7 @@ WebInspector.uiLabelForPriority = function(priority)
WebInspector.uiLabelForPriority._priorityToUILabel = labelMap;
}
return labelMap.get(priority) || WebInspector.UIString("Unknown");
-}
+};
/**
* @param {string} url
@@ -1950,7 +1950,7 @@ WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too
a.setAttribute("target", "_blank");
return a;
-}
+};
/**
* @param {string} article
@@ -1960,7 +1960,7 @@ WebInspector.linkifyURLAsNode = function(url, linkText, classes, isExternal, too
WebInspector.linkifyDocumentationURLAsNode = function(article, title)
{
return WebInspector.linkifyURLAsNode("https://developers.google.com/web/tools/chrome-devtools/" + article, title, undefined, true);
-}
+};
/** @type {!WebInspector.ThemeSupport} */
WebInspector.themeSupport;
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/Tooltip.js ('k') | third_party/WebKit/Source/devtools/front_end/ui/View.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698