+2011-09-08 Alexander Pavlov <apavlov@chromium.org>
+
+ Unreviewed, strip trailing whitespace in the Web Inspector frontend (*.js and *.css).
+
+ * inspector/front-end/ApplicationCacheItemsView.js:
+ * inspector/front-end/AuditResultView.js:
+ * inspector/front-end/BinarySearch.js:
+ * inspector/front-end/CSSStyleModel.js:
+ * inspector/front-end/ConsoleMessage.js:
+ * inspector/front-end/ConsoleModel.js:
+ * inspector/front-end/ConsoleView.js:
+ * inspector/front-end/CookieItemsView.js:
+ * inspector/front-end/CookieParser.js:
+ * inspector/front-end/DOMAgent.js:
+ * inspector/front-end/DOMStorage.js:
+ * inspector/front-end/DOMStorageItemsView.js:
+ * inspector/front-end/DataGrid.js:
+ * inspector/front-end/Database.js:
+ * inspector/front-end/DatabaseQueryView.js:
+ * inspector/front-end/DetailedHeapshotGridNodes.js:
+ * inspector/front-end/DetailedHeapshotView.js:
+ * inspector/front-end/ElementsTreeOutline.js:
+ * inspector/front-end/EmptyView.js:
+ * inspector/front-end/EventListenersSidebarPane.js:
+ * inspector/front-end/ExtensionCommon.js:
+ * inspector/front-end/GoToLineDialog.js:
+ * inspector/front-end/HeapSnapshot.js:
+ * inspector/front-end/HeapSnapshotProxy.js:
+ * inspector/front-end/HeapSnapshotWorkerDispatcher.js:
+ * inspector/front-end/ImageView.js:
+ * inspector/front-end/InjectedFakeWorker.js:
+ * inspector/front-end/InspectorFrontendHostStub.js:
+ * inspector/front-end/MetricsSidebarPane.js:
+ * inspector/front-end/NetworkManager.js:
+ * inspector/front-end/NetworkPanel.js:
+ * inspector/front-end/ObjectPropertiesSection.js:
+ * inspector/front-end/PartialQuickSort.js:
+ * inspector/front-end/ProfileView.js:
+ * inspector/front-end/ProfilesPanel.js:
+ * inspector/front-end/RemoteObject.js:
+ * inspector/front-end/Resource.js:
+ * inspector/front-end/ResourceCategory.js:
+ * inspector/front-end/ResourceHTMLView.js:
+ * inspector/front-end/ResourceHeadersView.js:
+ * inspector/front-end/ResourceJSONView.js:
+ * inspector/front-end/ResourceTimingView.js:
+ * inspector/front-end/ResourceTreeModel.js:
+ * inspector/front-end/ResourceView.js:
+ * inspector/front-end/ResourcesPanel.js:
+ * inspector/front-end/SearchController.js:
+ * inspector/front-end/SettingsScreen.js:
+ * inspector/front-end/ShortcutsScreen.js:
+ * inspector/front-end/SourceCSSTokenizer.js:
+ * inspector/front-end/SourceHTMLTokenizer.js:
+ * inspector/front-end/SourceJavaScriptTokenizer.js:
+ * inspector/front-end/StatusBarButton.js:
+ * inspector/front-end/TextEditorModel.js:
+ * inspector/front-end/TimelineGrid.js:
+ * inspector/front-end/View.js:
+ * inspector/front-end/heapProfiler.css:
+ * inspector/front-end/inspector.css:
+ * inspector/front-end/inspector.js:
+ * inspector/front-end/inspectorSyntaxHighlight.css:
+ * inspector/front-end/networkPanel.css:
+ * inspector/front-end/treeoutline.js:
+ * inspector/front-end/utilities.js:
+
2011-09-07 Andrey Kosyakov <caseq@chromium.org>
Web Inspector: trying to scroll mouse wheel when in TextViewer's gutter pane causes EventException::DISPATCH_REQUEST_ERR
this.divider.style.display = "none";
this.statusIcon.style.display = "none";
this.statusMessage.style.display = "none";
-
+
}
WebInspector.ApplicationCacheItemsView.prototype = {
_appendResult: function(parentTreeElement, result)
{
var title = "";
-
+
if (typeof result.value === "string") {
title = result.value;
if (result.violationCount)
// Return the first occurance of an item in the list.
while (index > 0 && aFunction(anObject, aList[index - 1]) === 0)
index--;
- return index;
+ return index;
}
}
var url = this._styleSheetIdToURL[styleSheetId];
if (!url)
return;
-
+
var resource = WebInspector.resourceForURL(url);
if (!resource)
return;
this.lineNumber = undefined;
this.columnNumber = undefined;
}
-
+
/**
* @constructor
* @param {Array.<WebInspector.ConsoleStackFrame>=} stackTrace
this._formattedMessage = document.createElement("span");
this._formattedMessage.className = "console-message-text source-code";
-
+
var messageText;
switch (this.type) {
case WebInspector.ConsoleMessage.MessageType.Trace:
{
if (WebInspector.settings.monitoringXHREnabled.get())
ConsoleAgent.setMonitoringXHREnabled(true);
-
+
// There is no console agent for workers yet.
if (!WebInspector.WorkerManager.isWorkerFrontend())
ConsoleAgent.enable(this._setConsoleMessageExpiredCount.bind(this));
delete this.commandSincePreviousMessage;
delete this.previousMessage;
-
+
this.dispatchEventToListeners(WebInspector.ConsoleView.Events.ConsoleCleared);
},
this._emptyView = new WebInspector.EmptyView(WebInspector.UIString("This site has no cookies."));
this._emptyView.show(this.element);
-
+
this.element.addEventListener("contextmenu", this._contextMenu.bind(this), true);
}
{
this._update();
},
-
+
_contextMenu: function()
{
if (!this._cookies.length) {
// Ideally, we would rely on platform support for parsing a cookie, since
// this would save us from any potential inconsistency. However, exposing
-// platform cookie parsing logic would require quite a bit of additional
+// platform cookie parsing logic would require quite a bit of additional
// plumbing, and at least some platforms lack support for parsing Cookie,
-// which is in a format slightly different from Set-Cookie and is normally
+// which is in a format slightly different from Set-Cookie and is normally
// only required on the server side.
/**
for (var kv = this._extractKeyValue(); kv; kv = this._extractKeyValue()) {
if (this._lastCookie)
this._lastCookie.addAttribute(kv.key, kv.value);
- else
+ else
this._addCookie(kv, WebInspector.Cookie.Type.Response);
if (this._advanceAndCheckCookieDelimiter())
this._flushCookie();
// Many browsers/platforms do not support this, however (see http://webkit.org/b/16699
// and http://crbug.com/12361). The logic below matches latest versions of IE, Firefox,
// Chrome and Safari on some old platforms. The latest version of Safari supports quoted
- // cookie values, though.
+ // cookie values, though.
var keyValueMatch = /^[ \t]*([^\s=;]+)[ \t]*(?:=[ \t]*([^;\n]*))?/.exec(this._input);
if (!keyValueMatch) {
console.log("Failed parsing cookie header before: " + this._input);
{
if (!node)
return false;
-
+
var currentNode = node.parentNode;
while (currentNode) {
if (this === currentNode)
moveTo: function(targetNode, anchorNode, callback)
{
- DOMAgent.moveTo(this.id, targetNode.id, anchorNode ? anchorNode.id : undefined, callback);
+ DOMAgent.moveTo(this.id, targetNode.id, anchorNode ? anchorNode.id : undefined, callback);
}
}
if (node)
this.dispatchEventToListeners(WebInspector.DOMAgent.Events.InspectElementRequested, node);
},
-
+
performSearch: function(query, searchResultCollector, searchSynchronously)
{
this._searchResultCollector = searchResultCollector;
{
DOMStorageAgent.getDOMStorageEntries(this._id, callback);
},
-
+
setItem: function(key, value, callback)
{
DOMStorageAgent.setDOMStorageItem(this._id, key, value, callback);
},
-
+
removeItem: function(key, callback)
{
DOMStorageAgent.removeDOMStorageItem(this._id, key, callback);
/**
* @constructor
- * @implements {DOMStorageAgent.Dispatcher}
+ * @implements {DOMStorageAgent.Dispatcher}
*/
WebInspector.DOMStorageDispatcher = function()
{
{
this.update();
},
-
+
_editingCallback: function(editingNode, columnIdentifier, oldText, newText)
{
var domStorage = this.domStorage;
} else {
domStorage.setItem(editingNode.data[0], newText);
}
-
+
this.update();
},
-
+
_deleteCallback: function(node)
{
if (!node || node.isCreationNode)
if (this.domStorage)
this.domStorage.removeItem(node.data[0]);
-
+
this.update();
}
}
this._dataTable.addEventListener("mousedown", this._mouseDownInDataTable.bind(this), true);
this._dataTable.addEventListener("click", this._clickInDataTable.bind(this), true);
-
+
this._dataTable.addEventListener("contextmenu", this._contextMenuInDataTable.bind(this), true);
-
+
// FIXME: Add a createCallback which is different from editCallback and has different
// behavior when creating a new node.
if (editCallback) {
}
if (deleteCallback)
this._deleteCallback = deleteCallback;
-
+
this.aligned = {};
this._scrollContainer = document.createElement("div");
{
return this._refreshCallback;
},
-
+
set refreshCallback(refreshCallback)
{
this._refreshCallback = refreshCallback;
},
-
+
_ondblclick: function(event)
{
if (this._editing || this._editingNode)
{
// FIXME: We need more column identifiers here throughout this function.
// Not needed yet since only editable DataGrid is DOM Storage, which is Key - Value.
-
+
// FIXME: Better way to do this than regular expressions?
var columnIdentifier = parseInt(element.className.match(/\b(\d+)-column\b/)[1]);
// Update the text in the datagrid that we typed
this._editingNode.data[columnIdentifier] = newText;
-
+
// Make the callback - expects an editing node (table row), the column number that is being edited,
// the text that used to be there, and the new text.
this._editCallback(this._editingNode, columnIdentifier, textBeforeEditing, newText);
delete this._editing;
this._editingNode = null;
},
-
+
get sortColumnIdentifier()
{
if (!this._sortColumnCell)
updateWidths: function()
{
var headerTableColumns = this._headerTableColumnGroup.children;
-
+
var tableWidth = this._dataTable.offsetWidth;
var numColumns = headerTableColumns.length;
-
+
// Do not attempt to use offsetes if we're not attached to the document tree yet.
if (!this._columnWidthsInitialized && this.element.offsetWidth) {
// Give all the columns initial widths now so that during a resize,
get scrollContainer()
{
- return this._scrollContainer;
+ return this._scrollContainer;
},
isScrolledToLastRow: function()
var left = 0;
var previousResizer = null;
- // Make n - 1 resizers for n columns.
+ // Make n - 1 resizers for n columns.
for (var i = 0; i < numColumns - 1; i++) {
var resizer = this.resizers[i];
} else
gridNode.select();
},
-
+
_contextMenuInDataTable: function(event)
{
var contextMenu = new WebInspector.ContextMenu();
if (this.dataGrid._deleteCallback && gridNode !== this.creationNode)
contextMenu.appendItem(WebInspector.UIString("Delete"), this._deleteCallback.bind(this, gridNode));
}
-
+
contextMenu.show(event);
},
gridNode.expand();
}
},
-
+
get resizeMethod()
{
if (typeof this._resizeMethod === "undefined")
{
this._resizeMethod = method;
},
-
+
_startResizerDragging: function(event)
{
this.currentResizer = event.target;
WebInspector.elementDragStart(this.lastResizer, this._resizerDragging.bind(this),
this._endResizerDragging.bind(this), event, "col-resize");
},
-
+
_resizerDragging: function(event)
{
var resizer = this.currentResizer;
if (!resizer)
return;
-
+
// Constrain the dragpoint to be within the containing div of the
// datagrid.
var dragPoint = event.clientX - this.element.totalOffsetLeft();
var leftEdgeOfPreviousColumn = 0;
for (var i = 0; i < leftCellIndex; i++)
leftEdgeOfPreviousColumn += firstRowCells[i].offsetWidth;
-
+
// Differences for other resize methods
if (this.resizeMethod == WebInspector.DataGrid.ResizeMethod.Last) {
rightCellIndex = this.resizers.length;
leftEdgeOfPreviousColumn += firstRowCells[leftCellIndex].offsetWidth - firstRowCells[0].offsetWidth;
leftCellIndex = 0;
}
-
+
var rightEdgeOfNextColumn = leftEdgeOfPreviousColumn + firstRowCells[leftCellIndex].offsetWidth + firstRowCells[rightCellIndex].offsetWidth;
-
+
// Give each column some padding so that they don't disappear.
var leftMinimum = leftEdgeOfPreviousColumn + this.ColumnResizePadding;
var rightMaximum = rightEdgeOfNextColumn - this.ColumnResizePadding;
event.preventDefault();
this.dispatchEventToListeners("width changed");
},
-
+
_endResizerDragging: function(event)
{
WebInspector.elementDragEnd(event);
this.currentResizer = null;
this.dispatchEventToListeners("width changed");
},
-
+
ColumnResizePadding: 10,
-
+
CenterResizerOverBorderAdjustment: 3,
}
}
DatabaseAgent.getDatabaseTableNames(this._id, sortingCallback);
},
-
+
executeSql: function(query, onSuccess, onError)
{
function callback(error, success, transactionId)
/**
* @constructor
- * @implements {DatabaseAgent.Dispatcher}
+ * @implements {DatabaseAgent.Dispatcher}
*/
WebInspector.DatabaseDispatcher = function()
{
{
if (!WebInspector.DatabaseDispatcher._callbacks[transactionId])
return;
-
+
var callback = WebInspector.DatabaseDispatcher._callbacks[transactionId].onSuccess;
delete WebInspector.DatabaseDispatcher._callbacks[transactionId];
if (callback)
return;
}
}
-
+
function tableNamesCallback(tableNames)
{
accumulateMatches(tableNames.map(function(name) { return name + " " }));
if (dataGrid) {
dataGrid.element.addStyleClass("inline");
this._appendQueryResult(trimmedQuery, dataGrid.element);
- dataGrid.autoSizeColumns(5);
+ dataGrid.autoSizeColumns(5);
}
if (trimmedQuery.match(/^create /i) || trimmedQuery.match(/^drop table /i))
}
this._saveChildren();
this.removeChildren();
-
+
function afterPopulate()
{
for (var i = 0, l = this.children.length; i < l; ++i) {
calculateDiff: function(dataGrid, callback)
{
var diff = dataGrid.snapshot.createDiff(this._name);
-
+
function diffCalculated(diffResult)
{
diff.dispose();
this.dispatchEventToListeners("sorting complete");
return;
}
- this.populateChildren();
+ this.populateChildren();
},
populateChildren: function()
{
if (this._state)
this._state.cancel();
- },
+ },
_sortFields: function(sortColumn, sortAscending)
{
}
this.views[viewIndex].grid.addEventListener("sorting complete", sortingComplete, this);
this.viewSelectElement.selectedIndex = viewIndex;
- this._changeView({target: {selectedIndex: viewIndex}});
+ this._changeView({target: {selectedIndex: viewIndex}});
},
_changeView: function(event)
height = Number.constrain(height, Preferences.minConsoleHeight, this.element.clientHeight - Preferences.minConsoleHeight);
this.viewsContainer.style.bottom = (height + this.retainmentViewHeader.clientHeight) + "px";
this.retainmentView.element.style.height = height + "px";
- this.retainmentViewHeader.style.bottom = height + "px";
+ this.retainmentViewHeader.style.bottom = height + "px";
},
_updateBaseOptions: function()
{
if (!this._nodeBeingDragged)
return false;
-
+
var treeElement = this._treeElementFromEvent(event);
if (!this._isValidDragSourceOrTarget(treeElement))
return false;
for (var i = 0; i < attributes.length; ++i) {
if (attributes[i].name !== attributeName)
continue;
-
+
if (moveDirection === "backward") {
if (i === 0)
this._startEditingTagName();
this.element.className = "storage-empty-view";
this.element.textContent = this._text;
},
-
+
set text(text)
{
this._text = text;
}
section.addListener(eventListener);
}
-
+
if (sectionNames.length === 0) {
var div = document.createElement("div");
div.className = "info";
WebInspector.commonExtensionSymbols = function(apiPrivate)
{
-
+
if (!apiPrivate.audits)
apiPrivate.audits = {};
this._input.setAttribute("size", 6);
var blurHandler = this._onBlur.bind(this);
this._input.addEventListener("blur", blurHandler, false);
-
+
var go = dialogWindow.createChild("button");
go.textContent = WebInspector.UIString("Go");
this._json = this._json.slice(closingBracketIndex);
this._state = "parse-nodes";
this.pushJSONChunk("");
- break;
+ break;
}
case "parse-nodes": {
if (this._parseNodes())
var dominatedIndexFrom = this._getDominatedIndex(node.nodeIndex);
var dominatedIndexTo = this._getDominatedIndex(node._nextNodeIndex);
- return new WebInspector.HeapSnapshotArraySlice(this, "_dominatedNodes", dominatedIndexFrom, dominatedIndexTo);
+ return new WebInspector.HeapSnapshotArraySlice(this, "_dominatedNodes", dominatedIndexFrom, dominatedIndexTo);
},
aggregates: function(sortedIndexes)
var nodePosition = this._findNodePositionInIndex(nodeIndex);
return this._dominatedIndex[nodePosition];
},
-
+
_markInvisibleEdges: function()
{
// Mark hidden edges of global objects as invisible.
{
if (filter)
filter = eval("(function(){return " + filter + "})()");
- this._rootChildren = this._fillRootChildren(filter);
+ this._rootChildren = this._fillRootChildren(filter);
this._reset();
},
var i = 0, l = this._baseIds.length;
var j = 0, m = indexes.length;
var diff = { addedCount: 0, removedCount: 0, addedSize: 0, removedSize: 0 };
-
+
var nodeB = new WebInspector.HeapSnapshotNode(this._snapshot, indexes[j]);
while (i < l && j < m) {
var nodeAId = this._baseIds[i];
} else if (nodeAId > nodeB.id) {
diff.addedCount++;
diff.addedSize += nodeB.selfSize;
- nodeB.nodeIndex = indexes[++j];
+ nodeB.nodeIndex = indexes[++j];
} else {
++i;
- nodeB.nodeIndex = indexes[++j];
+ nodeB.nodeIndex = indexes[++j];
}
}
while (i < l) {
_postMessage: function(message)
{
- this._worker.postMessage(message);
+ this._worker.postMessage(message);
}
};
var object = this._objects[data.objectId];
var result = object[data.methodName].apply(object, data.methodArguments);
if (result)
- this._objects[data.newObjectId] = result;
+ this._objects[data.newObjectId] = result;
this._postMessage({callId: data.callId, result: !!result});
break;
}
{ name: WebInspector.UIString("File size"), value: Number.bytesToString(resourceSize) },
{ name: WebInspector.UIString("MIME type"), value: this.resource.mimeType }
];
-
+
infoListElement.removeChildren();
for (var i = 0; i < imageProperties.length; ++i) {
var dt = document.createElement("dt");
var listeners = this._listeners;
for (var i = 0; i < listeners.length; ++i) {
if (listeners[i].originalCallback === callback &&
- listeners[i].type === type &&
+ listeners[i].type === type &&
listeners[i].useCapture === Boolean(useCapture)) {
this.channel.port2.removeEventListener(type, listeners[i], useCapture);
listeners[i] = listeners[listeners.length - 1];
var builder = new WebKitBlobBuilder();
builder.append(content);
var blob = builder.getBlob("application/octet-stream");
-
+
var fr = new FileReader();
fr.onload = function(e) {
// Force download
// "style" attribute might have changed. Update metrics unless they are being edited.
if (!this._isEditingMetrics)
this._innerUpdate();
- },
+ },
_getPropertyValueAsPx: function(style, propertyName)
{
if (WebInspector.settings.cacheDisabled.get())
NetworkAgent.setCacheDisabled(true);
NetworkAgent.enable();
-
+
WebInspector.settings.cacheDisabled.addChangeListener(this._cacheDisabledSettingChanged.bind(this));
}
else
callback(content, content && contentEncoded);
}
- // FIXME: https://bugs.webkit.org/show_bug.cgi?id=61363 We should separate NetworkResource (NetworkPanel resource)
+ // FIXME: https://bugs.webkit.org/show_bug.cgi?id=61363 We should separate NetworkResource (NetworkPanel resource)
// from ResourceRevision (ResourcesPanel/ScriptsPanel resource) and request content accordingly.
if (resource.requestId)
NetworkAgent.getResourceContent(resource.requestId, callbackWrapper);
{
return this._dispatcher._inflightResourcesByURL[url];
},
-
+
_cacheDisabledSettingChanged: function(event)
{
NetworkAgent.setCacheDisabled(event.data);
_appendResource: function(resource)
{
this._resources.push(resource);
-
- // In case of redirect request id is reassigned to a redirected
- // resource and we need to update _resourcesById ans search results.
+
+ // In case of redirect request id is reassigned to a redirected
+ // resource and we need to update _resourcesById ans search results.
if (this._resourcesById[resource.requestId]) {
var oldResource = resource.redirects[resource.redirects.length - 1];
this._resourcesById[oldResource.requestId] = oldResource;
-
+
this._updateSearchMatchedListAfterRequestIdChanged(resource.requestId, oldResource.requestId);
}
this._resourcesById[resource.requestId] = resource;
-
+
this._resourcesByURL[resource.url] = resource;
// Pull all the redirects of the main resource upon commit load.
this._clearSearchMatchedList();
this.dispatchEventToListeners(WebInspector.NetworkLogView.EventTypes.SearchCountUpdated, 0);
},
-
+
revealAndHighlightResource: function(resource)
{
this._removeAllNodeHighlights();
-
+
var node = this._resourceGridNode(resource);
if (node) {
this._dataGrid.element.focus();
this._highlightNode(node);
}
},
-
+
_removeAllNodeHighlights: function(node, decoration)
{
if (this._highlightedNode) {
delete this._highlightedNode;
}
},
-
+
_highlightNode: function(node)
{
node.element.addStyleClass("highlighted-row");
{
if (!this._viewingResourceMode)
return;
-
+
var preferredWidth = WebInspector.Panel.prototype.preferredSidebarWidth.call(this);
if (typeof(preferredWidth) === "undefined")
preferredWidth = 200;
this._appendSubtitle(this._initiatorCell, WebInspector.UIString("Redirect"));
} else if (initiator.type === "script") {
var topFrame = initiator.stackTrace[0];
- // This could happen when resource loading was triggered by console.
+ // This could happen when resource loading was triggered by console.
if (!topFrame.url) {
this._initiatorCell.addStyleClass("network-dim-cell");
this._initiatorCell.setTextAndTitle(WebInspector.UIString("Other"));
{
if (!rootTreeElementConstructor)
rootTreeElementConstructor = this.treeElementConstructor;
-
+
if (!rootPropertyComparer)
rootPropertyComparer = WebInspector.ObjectPropertiesSection.CompareProperties;
-
+
if (this.extraProperties)
for (var i = 0; i < this.extraProperties.length; ++i)
properties.push(this.extraProperties[i]);
-
+
properties.sort(rootPropertyComparer);
this.propertiesTreeOutline.removeChildren();
WebInspector.ObjectPropertiesSection.prototype.__proto__ = WebInspector.PropertiesSection.prototype;
-WebInspector.ObjectPropertiesSection.CompareProperties = function(propertyA, propertyB)
+WebInspector.ObjectPropertiesSection.CompareProperties = function(propertyA, propertyB)
{
var a = propertyA.name;
var b = propertyB.name;
var separatorElement = document.createElement("span");
separatorElement.className = "separator";
separatorElement.textContent = ": ";
-
+
this.valueElement = document.createElement("span");
this.valueElement.className = "value";
array[i1] = array[i2];
array[i2] = temp;
}
-
+
function partition(array, comparator, left, right, pivotIndex)
{
var pivotValue = array[pivotIndex];
swap(array, right, storeIndex);
return storeIndex;
}
-
+
function quickSortFirstK(array, comparator, left, right, k)
{
if (right <= left)
return;
self.profile.head = profile.head;
self._assignParentsInProfile();
-
+
self.profileDataGridTree = self.bottomUpProfileDataGridTree;
self.profileDataGridTree.sort(WebInspector.ProfileDataGridTree.propertyComparator("selfTime", false));
-
+
self.refresh();
-
+
self._updatePercentButton();
}
var part1 = document.createElement("span");
part1.textContent = message.substr(0, buttonPos);
container.appendChild(part1);
-
+
var button = new WebInspector.StatusBarButton(profileType.buttonTooltip, profileType.buttonStyle, profileType.buttonCaption);
container.appendChild(button.element);
-
+
var part2 = document.createElement("span");
part2.textContent = message.substr(buttonPos + 2);
container.appendChild(part2);
// incremented twice as often as it's displayed
title += " " + WebInspector.UIString("Run %d", (groupNumber + 1) / 2);
}
-
+
return title;
},
this.enumerable = descriptor ? !!descriptor.enumerable : true;
this.writable = descriptor ? !!descriptor.writable : true;
if (descriptor && descriptor.wasThrown)
- this.wasThrown = true;
+ this.wasThrown = true;
}
WebInspector.RemoteObjectProperty.fromPrimitiveValue = function(name, value)
break;
}
},
-
+
get redirectSource()
{
if (this.redirects && this.redirects.length > 0)
addMessage: function(msg)
{
- if (!msg.isErrorOrWarning() || !msg.message)
+ if (!msg.isErrorOrWarning() || !msg.message)
return;
if (!this._messages)
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
_createIFrame: function()
{
- // We need to create iframe again each time because contentDocument
+ // We need to create iframe again each time because contentDocument
// is deleted when iframe is removed from its parent.
this.element.removeChildren();
var iframe = document.createElement("iframe");
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
this._statusCodeTreeElement = new TreeElement("", null, false);
this._statusCodeTreeElement.selectable = false;
this._headersTreeOutline.appendChild(this._statusCodeTreeElement);
-
+
this._requestHeadersTreeElement = new TreeElement("", null, true);
this._requestHeadersTreeElement.expanded = true;
this._requestHeadersTreeElement.selectable = false;
if (!urlFragment)
return;
- var sectionTitle = WebInspector.UIString("URL fragment");
+ var sectionTitle = WebInspector.UIString("URL fragment");
this._urlFragmentTreeElement.removeChildren();
this._urlFragmentTreeElement.listItemElement.removeChildren();
this._urlFragmentTreeElement.listItemElement.appendChild(document.createTextNode(sectionTitle));
-
+
var title = "<div class=\"header-name\">#:</div>";
title += "<div class=\"header-value source-code\">" + urlFragment.escapeHTML() + "</div>";
fragmentTreeElement.selectable = false;
this._urlFragmentTreeElement.appendChild(fragmentTreeElement);
},
-
+
_refreshFormData: function()
{
this._formDataTreeElement.hidden = true;
_decodeURIComponent: function(value)
{
var errorDecoding = false;
-
+
if (value.indexOf("%") >= 0) {
try {
value = decodeURIComponent(value);
var valueEscaped = value.escapeHTML();
if (errorDecoding)
valueEscaped += " <span class=\"error-message\">" + WebInspector.UIString("(unable to decode value)").escapeHTML() + "</span>";
-
- return valueEscaped;
+
+ return valueEscaped;
},
-
+
_refreshParms: function(title, parms, parmsTreeElement)
{
parmsTreeElement.removeChildren();
parmsTreeElement.listItemElement.removeChildren();
parmsTreeElement.listItemElement.appendChild(document.createTextNode(title));
-
+
var headerCount = document.createElement("span");
headerCount.addStyleClass("header-count");
headerCount.textContent = WebInspector.UIString(" (%d)", parms.length);
additionalRow = {header: "(Key3)", value: this._resource.webSocketRequestKey3};
if (this._showRequestHeadersText)
this._refreshHeadersText(WebInspector.UIString("Request Headers"), this._resource.requestHeadersText, this._requestHeadersTreeElement);
- else
+ else
this._refreshHeaders(WebInspector.UIString("Request Headers"), this._resource.sortedRequestHeaders, additionalRow, this._requestHeadersTreeElement);
- if (this._resource.requestHeadersText) {
+ if (this._resource.requestHeadersText) {
var toggleButton = this._createHeadersToggleButton(this._showRequestHeadersText);
toggleButton.addEventListener("click", this._toggleRequestHeadersText.bind(this));
this._requestHeadersTreeElement.listItemElement.appendChild(toggleButton);
this._refreshHeadersText(WebInspector.UIString("Response Headers"), this._resource.responseHeadersText, this._responseHeadersTreeElement);
else
this._refreshHeaders(WebInspector.UIString("Response Headers"), this._resource.sortedResponseHeaders, additionalRow, this._responseHeadersTreeElement);
-
+
if (this._resource.responseHeadersText) {
var toggleButton = this._createHeadersToggleButton(this._showResponseHeadersText);
toggleButton.addEventListener("click", this._toggleResponseHeadersText.bind(this));
var statusTextEscaped = this._resource.statusCode + " " + this._resource.statusText.escapeHTML();
statusCodeImage = "<img class=\"resource-status-image\" src=\"" + statusImageSource + "\" title=\"" + statusTextEscaped + "\">";
-
+
requestMethodElement.titleHTML = "<div class=\"header-name\">" + WebInspector.UIString("Request Method") + ":</div>" +
"<div class=\"header-value source-code\">" + this._resource.requestMethod + "</div>";
statusCodeImage + "<div class=\"header-value source-code\">" + statusTextEscaped + fromCacheSpan + "</div>";
}
},
-
+
_refreshHeadersTitle: function(title, headersTreeElement, isHeadersTextShown, headersLength)
{
headersTreeElement.listItemElement.removeChildren();
headersTreeElement.listItemElement.appendChild(document.createTextNode(title));
-
+
if (!isHeadersTextShown) {
var headerCount = document.createElement("span");
headerCount.addStyleClass("header-count");
headersTreeElement.listItemElement.appendChild(headerCount);
}
},
-
+
_refreshHeaders: function(title, headers, additionalRow, headersTreeElement)
{
headersTreeElement.removeChildren();
-
+
var length = headers.length;
this._refreshHeadersTitle(title, headersTreeElement, false, length);
headersTreeElement.hidden = !length;
headersTreeElement.appendChild(headerTreeElement);
}
},
-
+
_refreshHeadersText: function(title, headersText, headersTreeElement)
{
headersTreeElement.removeChildren();
-
+
this._refreshHeadersTitle(title, headersTreeElement, true);
var headerTreeElement = new TreeElement(null, null, false);
headerTreeElement.selectable = false;
headersTreeElement.appendChild(headerTreeElement);
headerTreeElement.listItemElement.addStyleClass("headers-text");
-
+
var headersTextElement = document.createElement("span");
headersTextElement.addStyleClass("header-value");
headersTextElement.addStyleClass("source-code");
button.textContent = title;
return button;
},
-
+
_createHeadersToggleButton: function(isHeadersTextShown)
{
var toggleTitle = isHeadersTextShown ? WebInspector.UIString("view parsed") : WebInspector.UIString("view source");
var end = text.lastIndexOf(")");
if (start == -1 || end == -1 || end < start)
return;
-
- var prefix = text.substring(0, start + 1);
+
+ var prefix = text.substring(0, start + 1);
var suffix = text.substring(end);
var text = text.substring(start + 1, end);
var sendStart = resource.timing.sendStart;
if (resource.timing.sslStart !== -1)
sendStart += resource.timing.sslEnd - resource.timing.sslStart;
-
+
addRow(WebInspector.UIString("Sending"), "sending", resource.timing.sendStart, resource.timing.sendEnd);
addRow(WebInspector.UIString("Waiting"), "waiting", resource.timing.sendEnd, resource.timing.receiveHeadersEnd);
addRow(WebInspector.UIString("Receiving"), "receiving", (resource.responseReceivedTime - resource.timing.requestTime) * 1000, (resource.endTime - resource.timing.requestTime) * 1000);
this.frontendReused();
InspectorBackend.registerPageDispatcher(new WebInspector.PageDispatcher(this));
-
+
this._pendingConsoleMessages = {};
}
frame.parentId = frame.parentId || "";
this._frameIds[frame.id] = frame;
}
- // Dispatch frame navigated event to clients prior to filling it with the resources.
+ // Dispatch frame navigated event to clients prior to filling it with the resources.
this.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, { frame: frame, loaderId: loaderId, isMainFrame: isMainFrame });
- // Fill frame with retained resources (the ones loaded using new loader).
+ // Fill frame with retained resources (the ones loaded using new loader).
var resourcesForFrame = this._resourcesByFrameId[frame.id];
if (resourcesForFrame) {
for (var url in resourcesForFrame)
this._unbindResourceURL(resource);
return;
}
-
+
if (resource.finished)
this._addResourceToFrame(resource);
},
{
resource.clearErrorsAndWarnings();
}
-
+
this._pendingConsoleMessages = {};
this.forAllResources(callback);
},
_bindResourceURL: function(resource)
{
this._resourcesByURL[resource.url] = resource;
-
+
this._addPendingConsoleMessagesToResource(resource);
},
domContentEventFired: function(time)
{
this._resourceTreeModel.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.DOMContentLoaded, time);
-
+
// FIXME: the only client is HAR, fix it there.
WebInspector.mainResourceDOMContentTime = time;
},
var mimeType = WebInspector.ResourceSourceFrame.mimeTypeForResource(this.resource);
callback(mimeType, text);
}
-
+
this.resource.requestContent(contentLoaded.bind(this));
},
this._domStorage = [];
this._cookieViews = {};
-
+
this._applicationCacheView = null;
delete this._cachedApplicationCacheViewStatus;
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameNavigated, this._frameNavigated, this);
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this._frameDetached, this);
WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.ResourceAdded, this._resourceAdded, this);
- WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._cachedResourcesLoaded, this);
- WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources, this._resetResourcesTree, this);
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.CachedResourcesLoaded, this._cachedResourcesLoaded, this);
+ WebInspector.resourceTreeModel.addEventListener(WebInspector.ResourceTreeModel.EventTypes.WillLoadCachedResources, this._resetResourcesTree, this);
function populateFrame(frameId)
{
{
var frame = event.data;
var parentFrameId = frame.parentId;
-
+
var parentTreeElement = parentFrameId ? this._treeElementForFrameId[parentFrameId] : this.resourcesListTreeElement;
if (!parentTreeElement) {
console.warn("No frame with id:" + parentFrameId + " to route " + frame.name + "/" + frame.url + " to.")
{
if (!database)
return;
-
+
var view;
if (tableName) {
if (!("_tableViews" in database))
this.storageViewStatusBarItemsContainer.style.left = width + "px";
},
- performSearch: function(query)
+ performSearch: function(query)
{
this._resetSearchResults();
var regex = WebInspector.SourceFrame.createSearchRegex(query);
continue;
var resource = frameTreeElement.resourceByURL(searchResult.url);
- // FIXME: When the same script is used in several frames and this script contains at least
+ // FIXME: When the same script is used in several frames and this script contains at least
// one search result then some search results can not be matched with a resource on panel.
- // https://bugs.webkit.org/show_bug.cgi?id=66005
+ // https://bugs.webkit.org/show_bug.cgi?id=66005
if (!resource)
continue;
-
+
if (resource.history.length > 0)
continue; // Skip edited resources.
this._findTreeElementForResource(resource).searchMatchesFound(searchResult.matchesCount);
totalMatchesCount += searchResult.matchesCount;
}
}
-
+
WebInspector.searchController.updateSearchMatchesCount(totalMatchesCount, this);
this._searchController = new WebInspector.ResourcesSearchController(this.resourcesListTreeElement);
if (this.sidebarTree.selectedTreeElement && this.sidebarTree.selectedTreeElement.searchMatchesCount)
this.jumpToNextSearchResult();
}
-
+
this._forAllResourceTreeElements(searchInEditedResource.bind(this));
- PageAgent.searchInResources(regex.source, !regex.ignoreCase, true, callback.bind(this));
+ PageAgent.searchInResources(regex.source, !regex.ignoreCase, true, callback.bind(this));
},
-
+
_ensureViewSearchPerformed: function(callback)
{
function viewSearchPerformedCallback(searchId)
this.showResource(searchResult.treeElement.representedObject);
WebInspector.searchController.focusSearchField();
}
-
+
function callback(searchId)
{
if (this.sidebarTree.selectedTreeElement !== this._lastSearchResultTreeElement)
var nextSearchResult = this._searchController.nextSearchResult(currentTreeElement);
this._showSearchResult(nextSearchResult);
},
-
+
jumpToPreviousSearchResult: function()
{
if (!this.currentSearchMatches)
var previousSearchResult = this._searchController.previousSearchResult(currentTreeElement);
this._showSearchResult(previousSearchResult);
},
-
+
_forAllResourceTreeElements: function(callback)
{
var stop = false;
var title2 = treeElement2.displayName || treeElement2.titleText;
result = title1.localeCompare(title2);
}
- return result;
+ return result;
}
var children = parentTreeElement.children;
contextMenu.appendSeparator();
contextMenu.appendItem(WebInspector.UIString(WebInspector.useLowerCaseMenuTitles() ? "Save as..." : "Save As..."), save.bind(this));
},
-
+
_setBubbleText: function(x)
{
if (!this._bubbleElement) {
if (this._resource.errors)
this._bubbleElement.addStyleClass("error");
},
-
+
_consoleMessagesCleared: function()
{
// FIXME: move to the SourceFrame.
if (this._sourceView)
this._sourceView.clearMessages();
-
+
this._updateErrorsAndWarningsBubbles();
},
-
+
_consoleMessageAdded: function(event)
{
var msg = event.data;
newView.show(oldViewParentNode);
return newView;
- }
+ }
}
WebInspector.FrameResourceTreeElement.prototype.__proto__ = WebInspector.BaseStorageTreeElement.prototype;
WebInspector.StorageCategoryView.prototype = {
setText: function(text)
{
- this._emptyView.text = text;
- }
+ this._emptyView.text = text;
+ }
}
WebInspector.StorageCategoryView.prototype.__proto__ = WebInspector.View.prototype;
if (!currentTreeElement.searchMatchesCount)
return this._searchResult(this._traverser.next(currentTreeElement), 0);
-
+
if (this._lastTreeElement !== currentTreeElement || this._lastIndex === -1)
return this._searchResult(currentTreeElement, 0);
return this._searchResult(currentTreeElement, this._lastIndex + 1);
},
-
+
previousSearchResult: function(currentTreeElement)
{
if (!currentTreeElement) {
var treeElement = this._traverser.last();
- return this._searchResult(treeElement, treeElement.searchMatchesCount - 1);
+ return this._searchResult(treeElement, treeElement.searchMatchesCount - 1);
}
-
+
if (currentTreeElement.searchMatchesCount && this._lastTreeElement === currentTreeElement && this._lastIndex > 0)
return this._searchResult(currentTreeElement, this._lastIndex - 1);
-
+
var treeElement = this._traverser.previous(currentTreeElement)
return this._searchResult(treeElement, treeElement.searchMatchesCount - 1);
},
{
return this.next(this._root);
},
-
+
last: function(startTreeElement)
{
- return this.previous(this._root);
+ return this.previous(this._root);
},
next: function(startTreeElement)
_lastTreeElement: function()
{
var treeElement = this._root;
- var nextTreeElement;
+ var nextTreeElement;
while (nextTreeElement = this._traverseNext(treeElement))
treeElement = nextTreeElement;
- return treeElement;
+ return treeElement;
}
}
if (!this._currentQuery)
return;
-
+
panel = WebInspector.currentPanel;
if (panel.performSearch) {
function performPanelSearch()
_columnElement: function(right)
{
- return right ? this._rightColumnElement : this._leftColumnElement;
+ return right ? this._rightColumnElement : this._leftColumnElement;
},
_createCheckboxSetting: function(name, setting)
input.value = options[i][0];
input.addEventListener("click", clickListener, false);
if (settingValue == input.value)
- input.checked = true;
+ input.checked = true;
label.appendChild(input);
label.appendChild(document.createTextNode(options[i][1]));
_renderHeader: function(parent)
{
var trHead = parent.createChild("tr");
-
+
trHead.createChild("th");
trHead.createChild("th").textContent = this.name;
},
while (1) {
switch (gotoCase)
// Following comment is replaced with generated state machine.
-
+
{
case 1: var yych;
var yyaccept = 0;
while (1) {
switch (gotoCase)
// Following comment is replaced with generated state machine.
-
+
{
case 1: var yych;
var yyaccept = 0;
while (1) {
switch (gotoCase)
// Following comment is replaced with generated state machine.
-
+
{
case 1: var yych;
var yyaccept = 0;
this.glyphShadow = document.createElement("div");
this.glyphShadow.className = "glyph shadow";
this.element.appendChild(this.glyphShadow);
-
+
this.states = states;
if (!states)
this.states = 2;
this._state = false;
else
this._state = 0;
-
+
this.title = title;
this.disabled = false;
this._visible = true;
this._title = x;
this.element.title = x;
},
-
+
get state()
{
return this._state;
},
-
+
set state(x)
{
if (this._state === x)
return;
-
+
if (this.states === 2) {
if (x)
this.element.addStyleClass("toggled-on");
if (x !== 0) {
this.element.removeStyleClass("toggled-" + this._state);
this.element.addStyleClass("toggled-" + x);
- } else
+ } else
this.element.removeStyleClass("toggled-" + this._state);
}
this._state = x;
clone: function()
{
- return new WebInspector.TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
+ return new WebInspector.TextRange(this.startLine, this.startColumn, this.endLine, this.endColumn);
}
}
return this._itemsGraphsElement;
},
-
+
updateDividers: function(force, calculator, paddingLeft)
{
var dividerCount = Math.round(this._dividersElement.offsetWidth / 64);
removeChildView: function(view)
{
var childIndex = this._children.indexOf(view);
- if (childIndex < 0)
+ if (childIndex < 0)
return;
this._children.splice(childIndex, 1);
bottom: 0;
}
-.detailed-heapshot-view .views-container {
+.detailed-heapshot-view .views-container {
position: absolute;
top: 0;
left: 0;
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
vertical-align: -1px;
margin-right: 2px;
}
-
+
#error-count + #warning-count {
margin-left: 6px;
}
position: relative;
padding: 1px 22px 1px 0px;
margin-left: 24px;
- min-height: 16px;
+ min-height: 16px;
white-space: pre-wrap;
-webkit-user-modify: read-write-plaintext-only;
}
.event-bars .event-bar .header .title {
font-weight: normal;
color: black;
- text-shadow: white 0 1px 0;
+ text-shadow: white 0 1px 0;
}
.event-bars .event-bar .header .subtitle {
}
.watch-expressions > li.editing-sub-part .name {
- display: block;
+ display: block;
width: 100%;
}
.database-query-prompt {
position: relative;
padding: 1px 22px 1px 24px;
- min-height: 16px;
+ min-height: 16px;
white-space: pre-wrap;
-webkit-user-modify: read-write-plaintext-only;
-webkit-user-select: text;
position: relative;
border-bottom: 1px solid rgb(245, 245, 245);
padding: 1px 22px 1px 24px;
- min-height: 16px;
+ min-height: 16px;
}
.database-user-query::before {
}
.scripts-pause-on-exceptions-status-bar-item.toggled-uncaught .glyph {
- background-color: purple;
+ background-color: purple;
}
.scripts-toggle-pretty-print-status-bar-item .glyph {
padding: 4px;
background-color: rgb(203, 226, 255);
-webkit-border-radius: 7px;
- border: 2px solid rgb(169, 172, 203);
- width: 90%;
+ border: 2px solid rgb(169, 172, 203);
+ width: 90%;
}
.source-frame-breakpoint-message {
background-color: transparent;
- font-family: Lucida Grande, sans-serif;
+ font-family: Lucida Grande, sans-serif;
font-weight: normal;
font-size: 11px;
text-align: left;
text-shadow: none;
color: rgb(85, 85, 85);
cursor: default;
- margin: 0 0 2px 0;
+ margin: 0 0 2px 0;
}
#source-frame-breakpoint-condition {
margin: 0;
padding: 0;
}
-
+
.workers-list > li {
overflow: hidden;
text-overflow: ellipsis;
this.debuggerPresentationModel = new WebInspector.DebuggerPresentationModel();
this.searchController = new WebInspector.SearchController();
-
+
if (Preferences.nativeInstrumentationEnabled)
this.domBreakpointsSidebarPane = new WebInspector.DOMBreakpointsSidebarPane();
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-.webkit-css-comment {
+.webkit-css-comment {
color: rgb(0, 116, 0);
}
.resource-headers-view {
display: none;
padding: 6px;
- -webkit-user-select: text;
+ -webkit-user-select: text;
position: absolute;
top: 0;
left: 0;
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* are met:
*
* 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
+ * notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
return { container: node, offset: offset };
}
-Element.prototype.removeStyleClass = function(className)
+Element.prototype.removeStyleClass = function(className)
{
this.classList.remove(className);
}
this.className = this.className.replace(regex, " ");
}
-Element.prototype.addStyleClass = function(className)
+Element.prototype.addStyleClass = function(className)
{
this.classList.add(className);
}
-Element.prototype.hasStyleClass = function(className)
+Element.prototype.hasStyleClass = function(className)
{
return this.classList.contains(className);
}
return this.parentNode.enclosingNodeOrSelfWithClass(className);
}
-Element.prototype.query = function(query)
+Element.prototype.query = function(query)
{
return this.ownerDocument.evaluate(query, this, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
}
this.splice(index, 1);
return;
}
-
+
var length = this.length;
for (var i = 0; i < length; ++i) {
if (this[i] === value)
}
});
-Object.defineProperty(Array.prototype, "upperBound",
+Object.defineProperty(Array.prototype, "upperBound",
{
/**
* @this {Array.<number>}
}
for (var i = n.length - 1; i > 0; i--) {
- if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
+ if (n[i].text != null && n[i - 1].text == null && n[i].row > 0 && o[n[i].row - 1].text == null &&
n[i - 1] == o[n[i].row - 1]) {
n[i - 1] = { text: n[i - 1], row: n[i].row - 1 };
o[n[i].row - 1] = { text: o[n[i].row - 1], row: i - 1 };