Diff
Modified: trunk/Source/WebCore/ChangeLog (96596 => 96597)
--- trunk/Source/WebCore/ChangeLog 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/ChangeLog 2011-10-04 16:11:59 UTC (rev 96597)
@@ -1,3 +1,53 @@
+2011-10-04 Pavel Feldman <pfeld...@google.com>
+
+ Web Inspector: compile text editor.
+ https://bugs.webkit.org/show_bug.cgi?id=69339
+
+ Drive-by compilation for color, database and dom storage entities.
+
+ Reviewed by Yury Semikhatsky.
+
+ * inspector/Inspector.json:
+ * inspector/compile-front-end.sh:
+ * inspector/front-end/Color.js:
+ (WebInspector.Color.prototype._individualRGBValueToFloatValue):
+ * inspector/front-end/KeyboardShortcut.js:
+ (WebInspector.KeyboardShortcut.makeKey):
+ (WebInspector.KeyboardShortcut.makeKeyFromEvent):
+ (WebInspector.KeyboardShortcut.makeDescriptor):
+ * inspector/front-end/SourceCSSTokenizer.js:
+ * inspector/front-end/SourceCSSTokenizer.re2js:
+ * inspector/front-end/SourceHTMLTokenizer.js:
+ * inspector/front-end/SourceHTMLTokenizer.re2js:
+ * inspector/front-end/SourceJavaScriptTokenizer.js:
+ * inspector/front-end/SourceJavaScriptTokenizer.re2js:
+ * inspector/front-end/SourceTokenizer.js:
+ (WebInspector.SourceTokenizer.prototype._charAt):
+ (WebInspector.SourceTokenizer.prototype.createInitialCondition):
+ (WebInspector.SourceTokenizer.prototype.nextToken):
+ * inspector/front-end/TextEditorHighlighter.js:
+ (WebInspector.TextEditorHighlighter.prototype.highlight):
+ (WebInspector.TextEditorHighlighter.prototype._highlightLines):
+ * inspector/front-end/TextEditorModel.js:
+ * inspector/front-end/TextViewer.js:
+ (WebInspector.TextViewerDelegate.prototype.doubleClick):
+ (WebInspector.TextViewerDelegate.prototype.beforeTextChanged):
+ (WebInspector.TextViewerDelegate.prototype.afterTextChanged):
+ (WebInspector.TextViewerDelegate.prototype.commitEditing):
+ (WebInspector.TextViewerDelegate.prototype.cancelEditing):
+ (WebInspector.TextViewerDelegate.prototype.populateLineGutterContextMenu):
+ (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
+ (WebInspector.TextViewerDelegate.prototype.suggestedFileName):
+ (WebInspector.TextEditorMainPanel.prototype._enclosingLineRowOrSelf):
+ (WebInspector.TextEditorMainPanel.prototype._createLink):
+ (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
+ (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
+ * inspector/front-end/externs.js:
+ (WebInspector.completeURL):
+ (window.getComputedStyle):
+ (Event.prototype.initWebKitWheelEvent):
+ * inspector/front-end/utilities.js:
+
2011-10-04 Vsevolod Vlasov <vse...@chromium.org>
Web Inspector: Timeline panel shortcut for filtering short records should have shorter description.
Modified: trunk/Source/WebCore/inspector/Inspector.json (96596 => 96597)
--- trunk/Source/WebCore/inspector/Inspector.json 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/Inspector.json 2011-10-04 16:11:59 UTC (rev 96597)
@@ -763,7 +763,14 @@
{
"id": "Database",
"type": "object",
- "description": "Database object."
+ "description": "Database object.",
+ "hidden": true,
+ "properties": [
+ { "name": "id", "type": "string", "description": "Database ID." },
+ { "name": "domain", "type": "string", "description": "Database domain." },
+ { "name": "name", "type": "string", "description": "Database name." },
+ { "name": "version", "type": "string", "description": "Database version." }
+ ]
},
{
"id": "Error",
Modified: trunk/Source/WebCore/inspector/compile-front-end.sh (96596 => 96597)
--- trunk/Source/WebCore/inspector/compile-front-end.sh 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/compile-front-end.sh 2011-10-04 16:11:59 UTC (rev 96597)
@@ -44,14 +44,16 @@
--js Source/WebCore/inspector/front-end/Object.js \
--js Source/WebCore/inspector/front-end/Settings.js \
--js Source/WebCore/inspector/front-end/UserMetrics.js \
- --module jsmodule_sdk:18:jsmodule_common \
+ --module jsmodule_sdk:20:jsmodule_common \
--js Source/WebCore/inspector/front-end/CompilerSourceMapping.js \
--js Source/WebCore/inspector/front-end/CompilerSourceMappingProvider.js \
--js Source/WebCore/inspector/front-end/ConsoleModel.js \
--js Source/WebCore/inspector/front-end/ContentProviders.js \
--js Source/WebCore/inspector/front-end/CookieParser.js \
--js Source/WebCore/inspector/front-end/BreakpointManager.js \
+ --js Source/WebCore/inspector/front-end/Database.js \
--js Source/WebCore/inspector/front-end/DOMAgent.js \
+ --js Source/WebCore/inspector/front-end/DOMStorage.js \
--js Source/WebCore/inspector/front-end/DebuggerModel.js \
--js Source/WebCore/inspector/front-end/DebuggerPresentationModel.js \
--js Source/WebCore/inspector/front-end/Script.js \
@@ -63,8 +65,9 @@
--js Source/WebCore/inspector/front-end/Resource.js \
--js Source/WebCore/inspector/front-end/NetworkManager.js \
--js Source/WebCore/inspector/front-end/UISourceCode.js \
- --module jsmodule_ui:22:jsmodule_common \
+ --module jsmodule_ui:27:jsmodule_common \
--js Source/WebCore/inspector/front-end/Checkbox.js \
+ --js Source/WebCore/inspector/front-end/Color.js \
--js Source/WebCore/inspector/front-end/ContextMenu.js \
--js Source/WebCore/inspector/front-end/DataGrid.js \
--js Source/WebCore/inspector/front-end/Drawer.js \
@@ -80,9 +83,13 @@
--js Source/WebCore/inspector/front-end/SidebarPane.js \
--js Source/WebCore/inspector/front-end/ShortcutsScreen.js \
--js Source/WebCore/inspector/front-end/SoftContextMenu.js \
+ --js Source/WebCore/inspector/front-end/SourceTokenizer.js \
--js Source/WebCore/inspector/front-end/StatusBarButton.js \
--js Source/WebCore/inspector/front-end/TabbedPane.js \
+ --js Source/WebCore/inspector/front-end/TextEditorModel.js \
+ --js Source/WebCore/inspector/front-end/TextEditorHighlighter.js \
--js Source/WebCore/inspector/front-end/TextPrompt.js \
+ --js Source/WebCore/inspector/front-end/TextViewer.js \
--js Source/WebCore/inspector/front-end/Toolbar.js \
--js Source/WebCore/inspector/front-end/UIUtils.js \
--js Source/WebCore/inspector/front-end/View.js \
Modified: trunk/Source/WebCore/inspector/front-end/Color.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/Color.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/Color.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -27,12 +27,18 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @constructor
+ */
WebInspector.Color = function(str)
{
this.value = str;
this._parse();
}
+/**
+ * @param {number=} a
+ */
WebInspector.Color.fromRGBA = function(r, g, b, a)
{
return new WebInspector.Color("rgba(" + r + "," + g + "," + b + "," + (typeof a === "undefined" ? 1 : a) + ")");
@@ -201,7 +207,7 @@
return this._clamp(rgbValue, 0, 255);
if (rgbValue.indexOf("%") === -1) {
- var intValue = parseInt(rgbValue);
+ var intValue = parseInt(rgbValue, 10);
return this._clamp(rgbValue, 0, 255);
}
Modified: trunk/Source/WebCore/inspector/front-end/KeyboardShortcut.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/KeyboardShortcut.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/KeyboardShortcut.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -93,17 +93,15 @@
* Creates a number encoding keyCode in the lower 8 bits and modifiers mask in the higher 8 bits.
* It is useful for matching pressed keys.
* keyCode is the Code of the key, or a character "a-z" which is converted to a keyCode value.
- * optModifiers is an Optional list of modifiers passed as additional paramerters.
+ * @param {number=} modifiers Optional list of modifiers passed as additional paramerters.
*/
-WebInspector.KeyboardShortcut.makeKey = function(keyCode, optModifiers)
+WebInspector.KeyboardShortcut.makeKey = function(keyCode, modifiers)
{
if (typeof keyCode === "string")
keyCode = keyCode.charCodeAt(0) - 32;
- var modifiers = WebInspector.KeyboardShortcut.Modifiers.None;
- for (var i = 1; i < arguments.length; i++)
- modifiers |= arguments[i];
+ modifiers = modifiers || WebInspector.KeyboardShortcut.Modifiers.None;
return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyCode, modifiers);
-};
+}
WebInspector.KeyboardShortcut.makeKeyFromEvent = function(keyboardEvent)
{
@@ -117,14 +115,10 @@
if (keyboardEvent.metaKey)
modifiers |= WebInspector.KeyboardShortcut.Modifiers.Meta;
return WebInspector.KeyboardShortcut._makeKeyFromCodeAndModifiers(keyboardEvent.keyCode, modifiers);
-};
+}
-WebInspector.KeyboardShortcut.makeDescriptor = function(key, optModifiers)
+WebInspector.KeyboardShortcut.makeDescriptor = function(key, modifiers)
{
- var modifiers = 0;
- for (var i = 1; i < arguments.length; i++)
- modifiers |= arguments[i];
-
return {
key: WebInspector.KeyboardShortcut.makeKey(typeof key === "string" ? key : key.code, modifiers),
name: WebInspector.KeyboardShortcut.shortcutToString(key, modifiers)
Modified: trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -41,6 +41,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceCSSTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceCSSTokenizer.re2js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -40,6 +40,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceCSSTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -41,6 +41,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceHTMLTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceHTMLTokenizer.re2js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -40,6 +40,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceHTMLTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -42,6 +42,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceJavaScriptTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceJavaScriptTokenizer.re2js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -41,6 +41,10 @@
// | sed 's|unsigned\ int|var|' \
// | sed 's|var\ yych|case 1: var yych|'
+/**
+ * @constructor
+ * @extends {WebInspector.SourceTokenizer}
+ */
WebInspector.SourceJavaScriptTokenizer = function()
{
WebInspector.SourceTokenizer.call(this);
Modified: trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/SourceTokenizer.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -29,6 +29,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @constructor
+ */
WebInspector.SourceTokenizer = function()
{
}
@@ -61,10 +64,20 @@
_charAt: function(cursor)
{
return cursor < this._line.length ? this._line.charAt(cursor) : "\n";
+ },
+
+ createInitialCondition: function()
+ {
+ },
+
+ nextToken: function(cursor)
+ {
}
}
-
+/**
+ * @constructor
+ */
WebInspector.SourceTokenizer.Registry = function() {
this._tokenizers = {};
this._tokenizerConstructors = {
Modified: trunk/Source/WebCore/inspector/front-end/TextEditorHighlighter.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/TextEditorHighlighter.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/TextEditorHighlighter.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -29,6 +29,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @constructor
+ */
WebInspector.TextEditorHighlighter = function(textModel, damageCallback)
{
this._textModel = textModel;
@@ -50,7 +53,10 @@
this._highlightChunkLimit = highlightChunkLimit;
},
- highlight: function(endLine, opt_forceRun)
+ /**
+ * @param {boolean=} forceRun
+ */
+ highlight: function(endLine, forceRun)
{
// First check if we have work to do.
var state = this._textModel.getAttribute(endLine - 1, "highlight");
@@ -61,7 +67,7 @@
this._requestedEndLine = endLine;
- if (this._highlightTimer && !opt_forceRun) {
+ if (this._highlightTimer && !forceRun) {
// There is a timer scheduled, it will catch the new job based on the new endLine set.
return;
}
@@ -69,7 +75,7 @@
// We will be highlighting. First rewind to the last highlighted line to gain proper highlighter context.
var startLine = endLine;
while (startLine > 0) {
- var state = this._textModel.getAttribute(startLine - 1, "highlight");
+ state = this._textModel.getAttribute(startLine - 1, "highlight");
if (state && state.postConditionStringified)
break;
startLine--;
@@ -145,7 +151,7 @@
var tokensCount = 0;
for (var lineNumber = startLine; lineNumber < endLine; ++lineNumber) {
- var state = this._selectHighlightState(lineNumber, postConditionStringified);
+ state = this._selectHighlightState(lineNumber, postConditionStringified);
if (state.postConditionStringified) {
// This line is already highlighted.
postConditionStringified = state.postConditionStringified;
@@ -193,7 +199,7 @@
// Advance the "pointer" to the last highlighted line within the given chunk.
for (; lineNumber < endLine; ++lineNumber) {
- var state = this._textModel.getAttribute(lineNumber, "highlight");
+ state = this._textModel.getAttribute(lineNumber, "highlight");
if (!state || !state.postConditionStringified)
break;
}
Modified: trunk/Source/WebCore/inspector/front-end/TextEditorModel.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/TextEditorModel.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/TextEditorModel.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -28,6 +28,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @constructor
+ */
WebInspector.TextRange = function(startLine, startColumn, endLine, endColumn)
{
this.startLine = startLine;
@@ -53,6 +56,9 @@
}
}
+/**
+ * @constructor
+ */
WebInspector.TextEditorModel = function()
{
this._lines = [""];
Modified: trunk/Source/WebCore/inspector/front-end/TextViewer.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/TextViewer.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/TextViewer.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -29,6 +29,10 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+/**
+ * @extends {WebInspector.View}
+ * @constructor
+ */
WebInspector.TextViewer = function(textModel, platform, url, delegate)
{
WebInspector.View.call(this);
@@ -323,54 +327,34 @@
WebInspector.TextViewer.prototype.__proto__ = WebInspector.View.prototype;
+/**
+ * @interface
+ */
WebInspector.TextViewerDelegate = function()
{
}
WebInspector.TextViewerDelegate.prototype = {
- doubleClick: function(lineNumber)
- {
- // Should be implemented by subclasses.
- },
+ doubleClick: function(lineNumber) { },
- beforeTextChanged: function()
- {
- // Should be implemented by subclasses.
- },
+ beforeTextChanged: function() { },
- afterTextChanged: function(oldRange, newRange)
- {
- // Should be implemented by subclasses.
- },
+ afterTextChanged: function(oldRange, newRange) { },
- commitEditing: function()
- {
- // Should be implemented by subclasses.
- },
+ commitEditing: function() { },
- cancelEditing: function()
- {
- // Should be implemented by subclasses.
- },
+ cancelEditing: function() { },
- populateLineGutterContextMenu: function(lineNumber, contextMenu)
- {
- // Should be implemented by subclasses.
- },
+ populateLineGutterContextMenu: function(lineNumber, contextMenu) { },
- populateTextAreaContextMenu: function(contextMenu)
- {
- // Should be implemented by subclasses.
- },
+ populateTextAreaContextMenu: function(contextMenu) { },
- suggestedFileName: function()
- {
- // Should be implemented by subclasses.
- }
+ suggestedFileName: function() { }
}
-WebInspector.TextViewerDelegate.prototype.__proto__ = WebInspector.Object.prototype;
-
+/**
+ * @constructor
+ */
WebInspector.TextEditorChunkedPanel = function(textModel)
{
this._textModel = textModel;
@@ -643,6 +627,10 @@
}
}
+/**
+ * @constructor
+ * @extends {WebInspector.TextEditorChunkedPanel}
+ */
WebInspector.TextEditorGutterPanel = function(textModel, syncDecorationsForLineListener, syncLineHeightListener)
{
WebInspector.TextEditorChunkedPanel.call(this, textModel);
@@ -727,6 +715,9 @@
WebInspector.TextEditorGutterPanel.prototype.__proto__ = WebInspector.TextEditorChunkedPanel.prototype;
+/**
+ * @constructor
+ */
WebInspector.TextEditorGutterChunk = function(textViewer, startLine, endLine)
{
this._textViewer = textViewer;
@@ -849,6 +840,10 @@
}
}
+/**
+ * @constructor
+ * @extends {WebInspector.TextEditorChunkedPanel}
+ */
WebInspector.TextEditorMainPanel = function(textModel, url, syncScrollListener, syncDecorationsForLineListener, enterTextChangeMode, exitTextChangeMode)
{
WebInspector.TextEditorChunkedPanel.call(this, textModel);
@@ -1222,6 +1217,9 @@
this._paintLinesOperationsRefreshValue = Number.constrain(value, 150, 1500);
},
+ /**
+ * @param {boolean=} restoreSelection
+ */
_paintLines: function(fromLine, toLine, restoreSelection)
{
this._paintLineChunks([ { startLine: fromLine, endLine: toLine } ], restoreSelection);
@@ -1370,6 +1368,9 @@
return new WebInspector.TextRange(end.line, end.column, start.line, start.column);
},
+ /**
+ * @param {boolean=} scrollIntoView
+ */
_restoreSelection: function(range, scrollIntoView)
{
if (!range)
@@ -1459,7 +1460,8 @@
var lineRow = element.enclosingNodeOrSelfWithClass("webkit-line-content");
if (lineRow)
return lineRow;
- for (var lineRow = element; lineRow; lineRow = lineRow.parentElement) {
+
+ for (lineRow = element; lineRow; lineRow = lineRow.parentElement) {
if (lineRow.parentElement === this._container)
return lineRow;
}
@@ -1503,7 +1505,7 @@
else
quote = null;
- var a = WebInspector.linkifyURLAsNode(this._rewriteHref(content), content, null, isExternal);
+ var a = WebInspector.linkifyURLAsNode(this._rewriteHref(content), content, undefined, isExternal);
var span = document.createElement("span");
span.className = "webkit-html-attribute-value";
if (quote)
@@ -1514,6 +1516,9 @@
return span;
},
+ /**
+ * @param {boolean=} isExternal
+ */
_rewriteHref: function(hrefValue, isExternal)
{
if (!this._url || !hrefValue || hrefValue.indexOf("://") > 0)
@@ -1650,8 +1655,8 @@
++startColumn;
lines[0] = line2.substring(startColumn);
- var line1 = this._textModel.line(endLine - 1);
- var line2 = lines[lines.length - 1];
+ line1 = this._textModel.line(endLine - 1);
+ line2 = lines[lines.length - 1];
for (var i = 0; i < endColumn && i < line2.length; ++i) {
if (startLine === endLine - 1 && endColumn - i <= startColumn)
break;
@@ -1777,10 +1782,10 @@
// Delete all DOM elements that were either controlled by the old chunks, or have just been inserted.
var firstUnmodifiedLineRow = null;
- var chunk = this._textChunks[lastChunkNumber + 1];
- if (chunk) {
+ chunk = this._textChunks[lastChunkNumber + 1];
+ if (chunk)
firstUnmodifiedLineRow = chunk.expanded ? chunk.getExpandedLineRow(chunk.startLine) : chunk.element;
- }
+
while (firstLineRow && firstLineRow !== firstUnmodifiedLineRow) {
var lineRow = firstLineRow;
firstLineRow = firstLineRow.nextSibling;
@@ -1857,6 +1862,9 @@
WebInspector.TextEditorMainPanel.prototype.__proto__ = WebInspector.TextEditorChunkedPanel.prototype;
+/**
+ * @constructor
+ */
WebInspector.TextEditorMainChunk = function(textViewer, startLine, endLine)
{
this._textViewer = textViewer;
Modified: trunk/Source/WebCore/inspector/front-end/externs.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/externs.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/externs.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -61,6 +61,12 @@
WebInspector.displayNameForURL = function(url) {}
/**
+ * @param {string} url
+ * @param {string} href
+ */
+WebInspector.completeURL = function(url, href) {}
+
+/**
* @param {string} str
* @param {...*} varArgs
*/
@@ -183,11 +189,14 @@
WebInspector.platformFlavor = "";
/** @param {Element} element */
-window.getComputedStyle = function(element)
-{
-}
+window.getComputedStyle = function(element) {}
/**
* @type {boolean}
*/
Event.prototype.isMetaOrCtrlForTest = false;
+
+/**
+ * @param {...*} vararg
+ */
+Event.prototype.initWebKitWheelEvent = function(vararg) {}
Modified: trunk/Source/WebCore/inspector/front-end/utilities.js (96596 => 96597)
--- trunk/Source/WebCore/inspector/front-end/utilities.js 2011-10-04 15:49:50 UTC (rev 96596)
+++ trunk/Source/WebCore/inspector/front-end/utilities.js 2011-10-04 16:11:59 UTC (rev 96597)
@@ -838,6 +838,9 @@
return event.keyCode !== 229 && event.keyIdentifier === "Enter";
}
+/**
+ * @param {Array.<Object>=} domChanges
+ */
function highlightSearchResult(element, offset, length, domChanges)
{
var result = highlightSearchResults(element, [{offset: offset, length: length }], domChanges);