https://bugs.webkit.org/show_bug.cgi?id=89939
Patch by Jan Keromnes <janx@linux.com> on 2012-07-03
Reviewed by Vsevolod Vlasov.
PerformanceTests:
* inspector/first-open-scripts.html.broken:
Source/WebCore:
Fixed LayoutTests and PerformanceTests accordingly.
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* inspector/compile-front-end.py:
* inspector/front-end/AdvancedSearchController.js:
(WebInspector.SearchView):
* inspector/front-end/JavaScriptSourceFrame.js:
(WebInspector.JavaScriptSourceFrame):
(WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
(WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
(WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration):
(WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
(WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
(WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
(WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine):
(WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
(WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
* inspector/front-end/SourceFrame.js:
(WebInspector.SourceFrame):
(WebInspector.SourceFrame.prototype.wasShown):
(WebInspector.SourceFrame.prototype.willHide):
(WebInspector.SourceFrame.prototype.defaultFocusedElement):
(WebInspector.SourceFrame.prototype.get textEditor):
(WebInspector.SourceFrame.prototype.clearMessages):
(WebInspector.SourceFrame.prototype.highlightLine):
(WebInspector.SourceFrame.prototype._clearLineHighlight):
(WebInspector.SourceFrame.prototype.revealLine):
(WebInspector.SourceFrame.prototype.setSelection):
(WebInspector.SourceFrame.prototype.setContent):
(WebInspector.SourceFrame.prototype.onTextEditorContentLoaded):
(WebInspector.SourceFrame.prototype._setTextEditorDecorations):
(WebInspector.SourceFrame.prototype.searchCanceled):
(WebInspector.SourceFrame.prototype.jumpToSearchResult):
(WebInspector.SourceFrame.prototype.addMessageToSource):
(WebInspector.SourceFrame.prototype.removeMessageFromSource):
(WebInspector.SourceFrame.prototype.inheritScrollPositions):
(WebInspector.TextEditorDelegateForSourceFrame):
* inspector/front-end/TextViewer.js: Removed.
* inspector/front-end/WebKit.qrc:
* inspector/front-end/inspector.html:
* inspector/front-end/textViewer.css: Removed.
Source/WebKit/blackberry:
* WebCoreSupport/inspectorBB.html:
LayoutTests:
* http/tests/inspector/debugger-test.js:
(initialize_DebuggerTest):
* http/tests/inspector/live-edit-test.js:
(initialize_LiveEditTest.InspectorTest.replaceInSource):
(initialize_LiveEditTest):
* http/tests/inspector/resources-test.js:
(initialize_ResourceTest.InspectorTest.showResource.showResourceCallback):
(initialize_ResourceTest.InspectorTest.showResource):
* inspector/debugger/pause-in-inline-script.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@121746
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-07-03 Jan Keromnes <janx@linux.com>
+
+ Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
+ https://bugs.webkit.org/show_bug.cgi?id=89939
+
+ Reviewed by Vsevolod Vlasov.
+
+ * http/tests/inspector/debugger-test.js:
+ (initialize_DebuggerTest):
+ * http/tests/inspector/live-edit-test.js:
+ (initialize_LiveEditTest.InspectorTest.replaceInSource):
+ (initialize_LiveEditTest):
+ * http/tests/inspector/resources-test.js:
+ (initialize_ResourceTest.InspectorTest.showResource.showResourceCallback):
+ (initialize_ResourceTest.InspectorTest.showResource):
+ * inspector/debugger/pause-in-inline-script.html:
+
2012-07-03 Zan Dobersek <zandobersek@gmail.com>
Unreviewed GTK gardening, updating baselines after r121697 and r121728
if (sourceFrame.loaded)
callback(sourceFrame);
else
- InspectorTest.addSniffer(sourceFrame, "onTextViewerContentLoaded", callback.bind(null, sourceFrame));
+ InspectorTest.addSniffer(sourceFrame, "onTextEditorContentLoaded", callback.bind(null, sourceFrame));
return;
}
}
InspectorTest.replaceInSource = function(sourceFrame, string, replacement, callback)
{
- sourceFrame._textViewer._mainPanel.setReadOnly(false);
+ sourceFrame._textEditor._mainPanel.setReadOnly(false);
sourceFrame.beforeTextChanged();
var oldRange, newRange;
var lines = sourceFrame._textModel._lines;
break;
}
sourceFrame.afterTextChanged(oldRange, newRange);
- sourceFrame._textViewer._commitEditing();
+ sourceFrame._textEditor._commitEditing();
}
};
if (sourceFrame.loaded)
callbackWrapper(sourceFrame);
else
- InspectorTest.addSniffer(sourceFrame, "onTextViewerContentLoaded", callbackWrapper.bind(null, sourceFrame));
+ InspectorTest.addSniffer(sourceFrame, "onTextEditorContentLoaded", callbackWrapper.bind(null, sourceFrame));
}
InspectorTest.runAfterResourcesAreFinished([resourceURL], showResourceCallback);
}
if (sourceFrame.loaded)
didShowScript(sourceFrame);
else
- InspectorTest.addSniffer(sourceFrame, "onTextViewerContentLoaded", didShowScript.bind(null, sourceFrame));
+ InspectorTest.addSniffer(sourceFrame, "onTextEditorContentLoaded", didShowScript.bind(null, sourceFrame));
return;
}
}
+2012-07-03 Jan Keromnes <janx@linux.com>
+
+ Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
+ https://bugs.webkit.org/show_bug.cgi?id=89939
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/first-open-scripts.html.broken:
+
2012-06-22 Philip Rogers <pdr@google.com>
Make SvgCubics performance test more consistent
WebInspector.showPanel("audits");
var showPanelTimerCookie = timer.start("first-open-scripts");
WebInspector.showPanel("scripts");
- var count = WebInspector.panels.scripts.visibleView._textViewer._mainPanel._textChunks.length;
- WebInspector.panels.scripts.visibleView._textViewer._mainPanel._expandChunks(0, count);
- WebInspector.panels.scripts.visibleView._textViewer._mainPanel._paintScheduledLines();
+ var count = WebInspector.panels.scripts.visibleView._textEditor._mainPanel._textChunks.length;
+ WebInspector.panels.scripts.visibleView._textEditor._mainPanel._expandChunks(0, count);
+ WebInspector.panels.scripts.visibleView._textEditor._mainPanel._paintScheduledLines();
timer.finish(showPanelTimerCookie);
timer.done("first-open");
}
+2012-07-03 Jan Keromnes <janx@linux.com>
+
+ Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
+ https://bugs.webkit.org/show_bug.cgi?id=89939
+
+ Reviewed by Vsevolod Vlasov.
+
+ Fixed LayoutTests and PerformanceTests accordingly.
+
+ * WebCore.gypi:
+ * WebCore.vcproj/WebCore.vcproj:
+ * inspector/compile-front-end.py:
+ * inspector/front-end/AdvancedSearchController.js:
+ (WebInspector.SearchView):
+ * inspector/front-end/JavaScriptSourceFrame.js:
+ (WebInspector.JavaScriptSourceFrame):
+ (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
+ (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
+ (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration):
+ (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition.finishEditing):
+ (WebInspector.JavaScriptSourceFrame.prototype._editBreakpointCondition):
+ (WebInspector.JavaScriptSourceFrame.prototype.setExecutionLine):
+ (WebInspector.JavaScriptSourceFrame.prototype.clearExecutionLine):
+ (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
+ (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
+ * inspector/front-end/SourceFrame.js:
+ (WebInspector.SourceFrame):
+ (WebInspector.SourceFrame.prototype.wasShown):
+ (WebInspector.SourceFrame.prototype.willHide):
+ (WebInspector.SourceFrame.prototype.defaultFocusedElement):
+ (WebInspector.SourceFrame.prototype.get textEditor):
+ (WebInspector.SourceFrame.prototype.clearMessages):
+ (WebInspector.SourceFrame.prototype.highlightLine):
+ (WebInspector.SourceFrame.prototype._clearLineHighlight):
+ (WebInspector.SourceFrame.prototype.revealLine):
+ (WebInspector.SourceFrame.prototype.setSelection):
+ (WebInspector.SourceFrame.prototype.setContent):
+ (WebInspector.SourceFrame.prototype.onTextEditorContentLoaded):
+ (WebInspector.SourceFrame.prototype._setTextEditorDecorations):
+ (WebInspector.SourceFrame.prototype.searchCanceled):
+ (WebInspector.SourceFrame.prototype.jumpToSearchResult):
+ (WebInspector.SourceFrame.prototype.addMessageToSource):
+ (WebInspector.SourceFrame.prototype.removeMessageFromSource):
+ (WebInspector.SourceFrame.prototype.inheritScrollPositions):
+ (WebInspector.TextEditorDelegateForSourceFrame):
+ * inspector/front-end/TextViewer.js: Removed.
+ * inspector/front-end/WebKit.qrc:
+ * inspector/front-end/inspector.html:
+ * inspector/front-end/textViewer.css: Removed.
+
2012-07-03 Charles Wei <charles.wei@torchmobile.com.cn>
IndexedDB: should make the LevelDB persistant to the directory indicated in PageGroupSettings::indexedDBDataBasePath
'inspector/front-end/TabbedEditorContainer.js',
'inspector/front-end/TabbedPane.js',
'inspector/front-end/TestController.js',
+ 'inspector/front-end/TextEditor.js',
'inspector/front-end/TextEditorHighlighter.js',
'inspector/front-end/TextEditorModel.js',
'inspector/front-end/TextPrompt.js',
- 'inspector/front-end/TextViewer.js',
'inspector/front-end/TimelineFrameController.js',
'inspector/front-end/TimelineManager.js',
'inspector/front-end/TimelineModel.js',
'inspector/front-end/scriptsPanel.css',
'inspector/front-end/splitView.css',
'inspector/front-end/tabbedPane.css',
+ 'inspector/front-end/textEditor.css',
'inspector/front-end/textPrompt.css',
- 'inspector/front-end/textViewer.css',
'inspector/front-end/timelinePanel.css',
],
'webinspector_uglifyjs_files': [
>
</File>
<File
- RelativePath="..\inspector\front-end\TextEditorHighlighter.js"
+ RelativePath="..\inspector\front-end\textEditor.css"
>
</File>
<File
- RelativePath="..\inspector\front-end\TextEditorModel.js"
+ RelativePath="..\inspector\front-end\TextEditor.js"
>
</File>
<File
- RelativePath="..\inspector\front-end\textPrompt.css"
+ RelativePath="..\inspector\front-end\TextEditorHighlighter.js"
>
</File>
<File
- RelativePath="..\inspector\front-end\TextPrompt.js"
+ RelativePath="..\inspector\front-end\TextEditorModel.js"
>
</File>
<File
- RelativePath="..\inspector\front-end\textViewer.css"
+ RelativePath="..\inspector\front-end\textPrompt.css"
>
</File>
<File
- RelativePath="..\inspector\front-end\TextViewer.js"
+ RelativePath="..\inspector\front-end\TextPrompt.js"
>
</File>
<File
"SplitView.js",
"StatusBarButton.js",
"TabbedPane.js",
- "TextEditorModel.js",
+ "TextEditor.js",
"TextEditorHighlighter.js",
+ "TextEditorModel.js",
"TextPrompt.js",
- "TextViewer.js",
"Toolbar.js",
"UIUtils.js",
"View.js",
WebInspector.SearchView = function(controller)
{
WebInspector.View.call(this);
- this.registerRequiredCSS("textViewer.css");
+ this.registerRequiredCSS("textEditor.css");
this._controller = controller;
WebInspector.SourceFrame.call(this, javaScriptSource);
- this._popoverHelper = new WebInspector.ObjectPopoverHelper(this.textViewer.element,
+ this._popoverHelper = new WebInspector.ObjectPopoverHelper(this.textEditor.element,
this._getPopoverAnchor.bind(this), this._resolveObjectForPopover.bind(this), this._onHidePopover.bind(this), true);
- this.textViewer.element.addEventListener("mousedown", this._onMouseDown.bind(this), true);
- this.textViewer.element.addEventListener("keydown", this._onKeyDown.bind(this), true);
+ this.textEditor.element.addEventListener("mousedown", this._onMouseDown.bind(this), true);
+ this.textEditor.element.addEventListener("keydown", this._onKeyDown.bind(this), true);
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointAdded, this._breakpointAdded, this);
this._breakpointManager.addEventListener(WebInspector.BreakpointManager.Events.BreakpointRemoved, this._breakpointRemoved, this);
if (!highlightElement)
return;
// FIXME: the text editor should maintain highlight on its own. The check below is a workaround for
- // the case when highlight element is detached from DOM by the TextViewer when re-building the DOM.
+ // the case when highlight element is detached from DOM by the TextEditor when re-building the DOM.
var parentElement = highlightElement.parentElement;
if (parentElement) {
var child = highlightElement.firstChild;
};
this.textModel.setAttribute(lineNumber, "breakpoint", breakpoint);
- this.textViewer.beginUpdates();
- this.textViewer.addDecoration(lineNumber, "webkit-breakpoint");
+ this.textEditor.beginUpdates();
+ this.textEditor.addDecoration(lineNumber, "webkit-breakpoint");
if (!enabled || (mutedWhileEditing && !this._javaScriptSource.supportsEnabledBreakpointsWhileEditing()))
- this.textViewer.addDecoration(lineNumber, "webkit-breakpoint-disabled");
+ this.textEditor.addDecoration(lineNumber, "webkit-breakpoint-disabled");
else
- this.textViewer.removeDecoration(lineNumber, "webkit-breakpoint-disabled");
+ this.textEditor.removeDecoration(lineNumber, "webkit-breakpoint-disabled");
if (!!condition)
- this.textViewer.addDecoration(lineNumber, "webkit-breakpoint-conditional");
+ this.textEditor.addDecoration(lineNumber, "webkit-breakpoint-conditional");
else
- this.textViewer.removeDecoration(lineNumber, "webkit-breakpoint-conditional");
- this.textViewer.endUpdates();
+ this.textEditor.removeDecoration(lineNumber, "webkit-breakpoint-conditional");
+ this.textEditor.endUpdates();
},
_removeBreakpointDecoration: function(lineNumber)
{
this.textModel.removeAttribute(lineNumber, "breakpoint");
- this.textViewer.beginUpdates();
- this.textViewer.removeDecoration(lineNumber, "webkit-breakpoint");
- this.textViewer.removeDecoration(lineNumber, "webkit-breakpoint-disabled");
- this.textViewer.removeDecoration(lineNumber, "webkit-breakpoint-conditional");
- this.textViewer.endUpdates();
+ this.textEditor.beginUpdates();
+ this.textEditor.removeDecoration(lineNumber, "webkit-breakpoint");
+ this.textEditor.removeDecoration(lineNumber, "webkit-breakpoint-disabled");
+ this.textEditor.removeDecoration(lineNumber, "webkit-breakpoint-conditional");
+ this.textEditor.endUpdates();
},
_onMouseDown: function(event)
_editBreakpointCondition: function(lineNumber, breakpoint)
{
this._conditionElement = this._createConditionElement(lineNumber);
- this.textViewer.addDecoration(lineNumber, this._conditionElement);
+ this.textEditor.addDecoration(lineNumber, this._conditionElement);
function finishEditing(committed, element, newText)
{
- this.textViewer.removeDecoration(lineNumber, this._conditionElement);
+ this.textEditor.removeDecoration(lineNumber, this._conditionElement);
delete this._conditionEditorElement;
delete this._conditionElement;
if (breakpoint)
{
this._executionLineNumber = lineNumber;
if (this.loaded) {
- this.textViewer.addDecoration(lineNumber, "webkit-execution-line");
+ this.textEditor.addDecoration(lineNumber, "webkit-execution-line");
this.revealLine(this._executionLineNumber);
}
if (this.canEditSource())
clearExecutionLine: function()
{
if (this.loaded && typeof this._executionLineNumber === "number")
- this.textViewer.removeDecoration(this._executionLineNumber, "webkit-execution-line");
+ this.textEditor.removeDecoration(this._executionLineNumber, "webkit-execution-line");
delete this._executionLineNumber;
},
this.clearMessages();
},
- onTextViewerContentLoaded: function()
+ onTextEditorContentLoaded: function()
{
if (typeof this._executionLineNumber === "number")
this.setExecutionLine(this._executionLineNumber);
toggleBreakpointOnCurrentLine: function()
{
- var selection = this.textViewer.selection();
+ var selection = this.textEditor.selection();
if (!selection)
return;
this._toggleBreakpoint(selection.startLine, false);
this._textModel = new WebInspector.TextEditorModel();
- var textViewerDelegate = new WebInspector.TextViewerDelegateForSourceFrame(this);
- this._textViewer = new WebInspector.TextViewer(this._textModel, this._url, textViewerDelegate);
+ var textEditorDelegate = new WebInspector.TextEditorDelegateForSourceFrame(this);
+ this._textEditor = new WebInspector.TextEditor(this._textModel, this._url, textEditorDelegate);
this._currentSearchResultIndex = -1;
this._searchResults = [];
this._rowMessages = {};
this._messageBubbles = {};
- this._textViewer.setReadOnly(!this.canEditSource());
+ this._textEditor.setReadOnly(!this.canEditSource());
}
WebInspector.SourceFrame.createSearchRegex = function(query)
wasShown: function()
{
this._ensureContentLoaded();
- this._textViewer.show(this.element);
+ this._textEditor.show(this.element);
},
willHide: function()
{
WebInspector.View.prototype.willHide.call(this);
if (this.loaded)
- this._textViewer.freeCachedElements();
+ this._textEditor.freeCachedElements();
this._clearLineHighlight();
this._clearLineToReveal();
defaultFocusedElement: function()
{
- return this._textViewer.defaultFocusedElement();
+ return this._textEditor.defaultFocusedElement();
},
get loaded()
return true;
},
- get textViewer()
+ get textEditor()
{
- return this._textViewer;
+ return this._textEditor;
},
_ensureContentLoaded: function()
this._rowMessages = {};
this._messageBubbles = {};
- this._textViewer.doResize();
+ this._textEditor.doResize();
},
get textModel()
{
this._clearLineToReveal();
if (this.loaded)
- this._textViewer.highlightLine(line);
+ this._textEditor.highlightLine(line);
else
this._lineToHighlight = line;
},
_clearLineHighlight: function()
{
if (this.loaded)
- this._textViewer.clearLineHighlight();
+ this._textEditor.clearLineHighlight();
else
delete this._lineToHighlight;
},
{
this._clearLineHighlight();
if (this.loaded)
- this._textViewer.revealLine(line);
+ this._textEditor.revealLine(line);
else
this._lineToReveal = line;
},
setSelection: function(textRange)
{
if (this.loaded)
- this._textViewer.setSelection(textRange);
+ this._textEditor.setSelection(textRange);
else
this._selectionToSet = textRange;
},
*/
setContent: function(content, contentEncoded, mimeType)
{
- this._textViewer.mimeType = mimeType;
+ this._textEditor.mimeType = mimeType;
this._loaded = true;
this._textModel.setText(content || "");
- this._textViewer.beginUpdates();
+ this._textEditor.beginUpdates();
- this._setTextViewerDecorations();
+ this._setTextEditorDecorations();
if (typeof this._lineToHighlight === "number") {
this.highlightLine(this._lineToHighlight);
delete this._delayedFindSearchMatches;
}
- this.onTextViewerContentLoaded();
+ this.onTextEditorContentLoaded();
- this._textViewer.endUpdates();
+ this._textEditor.endUpdates();
},
- onTextViewerContentLoaded: function() {},
+ onTextEditorContentLoaded: function() {},
- _setTextViewerDecorations: function()
+ _setTextEditorDecorations: function()
{
this._rowMessages = {};
this._messageBubbles = {};
- this._textViewer.beginUpdates();
+ this._textEditor.beginUpdates();
this._addExistingMessagesToSource();
- this._textViewer.doResize();
+ this._textEditor.doResize();
- this._textViewer.endUpdates();
+ this._textEditor.endUpdates();
},
performSearch: function(query, callback)
this._currentSearchResultIndex = -1;
this._searchResults = [];
- this._textViewer.markAndRevealRange(null);
+ this._textEditor.markAndRevealRange(null);
},
hasSearchResults: function()
if (!this.loaded || !this._searchResults.length)
return;
this._currentSearchResultIndex = (index + this._searchResults.length) % this._searchResults.length;
- this._textViewer.markAndRevealRange(this._searchResults[this._currentSearchResultIndex]);
+ this._textEditor.markAndRevealRange(this._searchResults[this._currentSearchResultIndex]);
},
_collectRegexMatches: function(regexObject)
messageBubbleElement = document.createElement("div");
messageBubbleElement.className = "webkit-html-message-bubble";
this._messageBubbles[lineNumber] = messageBubbleElement;
- this._textViewer.addDecoration(lineNumber, messageBubbleElement);
+ this._textEditor.addDecoration(lineNumber, messageBubbleElement);
}
var rowMessages = this._rowMessages[lineNumber];
if (!rowMessages.length)
delete this._rowMessages[lineNumber];
if (!messageBubbleElement.childElementCount) {
- this._textViewer.removeDecoration(lineNumber, messageBubbleElement);
+ this._textEditor.removeDecoration(lineNumber, messageBubbleElement);
delete this._messageBubbles[lineNumber];
}
break;
inheritScrollPositions: function(sourceFrame)
{
- this._textViewer.inheritScrollPositions(sourceFrame._textViewer);
+ this._textEditor.inheritScrollPositions(sourceFrame._textEditor);
},
/**
/**
- * @implements {WebInspector.TextViewerDelegate}
+ * @implements {WebInspector.TextEditorDelegate}
* @constructor
*/
-WebInspector.TextViewerDelegateForSourceFrame = function(sourceFrame)
+WebInspector.TextEditorDelegateForSourceFrame = function(sourceFrame)
{
this._sourceFrame = sourceFrame;
}
-WebInspector.TextViewerDelegateForSourceFrame.prototype = {
+WebInspector.TextEditorDelegateForSourceFrame.prototype = {
beforeTextChanged: function()
{
this._sourceFrame.beforeTextChanged();
}
}
-WebInspector.TextViewerDelegateForSourceFrame.prototype.__proto__ = WebInspector.TextViewerDelegate.prototype;
+WebInspector.TextEditorDelegateForSourceFrame.prototype.__proto__ = WebInspector.TextEditorDelegate.prototype;
* @constructor
* @param {WebInspector.TextEditorModel} textModel
* @param {?string} url
- * @param {WebInspector.TextViewerDelegate} delegate
+ * @param {WebInspector.TextEditorDelegate} delegate
*/
-WebInspector.TextViewer = function(textModel, url, delegate)
+WebInspector.TextEditor = function(textModel, url, delegate)
{
WebInspector.View.call(this);
- this.registerRequiredCSS("textViewer.css");
+ this.registerRequiredCSS("textEditor.css");
this._textModel = textModel;
this._textModel.addEventListener(WebInspector.TextEditorModel.Events.TextChanged, this._textChanged, this);
this._registerShortcuts();
}
-WebInspector.TextViewer.prototype = {
+WebInspector.TextEditor.prototype = {
/**
* @param {string} mimeType
*/
},
/**
- * @param {WebInspector.TextViewer} textViewer
+ * @param {WebInspector.TextEditor} textEditor
*/
- inheritScrollPositions: function(textViewer)
+ inheritScrollPositions: function(textEditor)
{
- this._mainPanel.element._scrollTop = textViewer._mainPanel.element.scrollTop;
- this._mainPanel.element._scrollLeft = textViewer._mainPanel.element.scrollLeft;
+ this._mainPanel.element._scrollTop = textEditor._mainPanel.element.scrollTop;
+ this._mainPanel.element._scrollLeft = textEditor._mainPanel.element.scrollLeft;
},
beginUpdates: function()
}
}
-WebInspector.TextViewer.prototype.__proto__ = WebInspector.View.prototype;
+WebInspector.TextEditor.prototype.__proto__ = WebInspector.View.prototype;
/**
* @interface
*/
-WebInspector.TextViewerDelegate = function()
+WebInspector.TextEditorDelegate = function()
{
}
-WebInspector.TextViewerDelegate.prototype = {
+WebInspector.TextEditorDelegate.prototype = {
beforeTextChanged: function() { },
/**
/**
* @constructor
*/
-WebInspector.TextEditorGutterChunk = function(textViewer, startLine, endLine)
+WebInspector.TextEditorGutterChunk = function(textEditor, startLine, endLine)
{
- this._textViewer = textViewer;
- this._textModel = textViewer._textModel;
+ this._textEditor = textEditor;
+ this._textModel = textEditor._textModel;
this.startLine = startLine;
endLine = Math.min(this._textModel.linesCount, endLine);
*/
addDecoration: function(decoration)
{
- this._textViewer.beginDomUpdates();
+ this._textEditor.beginDomUpdates();
if (typeof decoration === "string")
this.element.addStyleClass(decoration);
- this._textViewer.endDomUpdates();
+ this._textEditor.endDomUpdates();
},
/**
*/
removeDecoration: function(decoration)
{
- this._textViewer.beginDomUpdates();
+ this._textEditor.beginDomUpdates();
if (typeof decoration === "string")
this.element.removeStyleClass(decoration);
- this._textViewer.endDomUpdates();
+ this._textEditor.endDomUpdates();
},
/**
set expanded(expanded)
{
if (this.linesCount === 1)
- this._textViewer._syncDecorationsForLineListener(this.startLine);
+ this._textEditor._syncDecorationsForLineListener(this.startLine);
if (this._expanded === expanded)
return;
if (this.linesCount === 1)
return;
- this._textViewer.beginDomUpdates();
+ this._textEditor.beginDomUpdates();
if (expanded) {
this._expandedLineRows = [];
this._expandedLineRows.push(lineRow);
}
parentElement.removeChild(this.element);
- this._textViewer._syncLineHeightListener(this._expandedLineRows[0]);
+ this._textEditor._syncLineHeightListener(this._expandedLineRows[0]);
} else {
var elementInserted = false;
for (var i = 0; i < this._expandedLineRows.length; ++i) {
}
parentElement.removeChild(lineRow);
}
- this._textViewer._cachedRows.push(lineRow);
+ this._textEditor._cachedRows.push(lineRow);
}
delete this._expandedLineRows;
}
- this._textViewer.endDomUpdates();
+ this._textEditor.endDomUpdates();
},
/**
get height()
{
if (!this._expandedLineRows)
- return this._textViewer._totalHeight(this.element);
- return this._textViewer._totalHeight(this._expandedLineRows[0], this._expandedLineRows[this._expandedLineRows.length - 1]);
+ return this._textEditor._totalHeight(this.element);
+ return this._textEditor._totalHeight(this._expandedLineRows[0], this._expandedLineRows[this._expandedLineRows.length - 1]);
},
/**
*/
_createRow: function(lineNumber)
{
- var lineRow = this._textViewer._cachedRows.pop() || document.createElement("div");
+ var lineRow = this._textEditor._cachedRows.pop() || document.createElement("div");
lineRow.lineNumber = lineNumber;
lineRow.className = "webkit-line-number";
lineRow.textContent = lineNumber + 1;
var selection = window.getSelection();
if (!selection.rangeCount)
return null;
- // Selection may be outside of the viewer.
+ // Selection may be outside of the editor.
if (!this._container.isAncestor(selection.anchorNode) || !this._container.isAncestor(selection.focusNode))
return null;
var start = this._selectionToPosition(selection.anchorNode, selection.anchorOffset);
<file>TabbedEditorContainer.js</file>
<file>TabbedPane.js</file>
<file>TestController.js</file>
+ <file>TextEditor.js</file>
<file>TextEditorHighlighter.js</file>
<file>TextEditorModel.js</file>
<file>TextPrompt.js</file>
- <file>TextViewer.js</file>
<file>TimelineFrameController.js</file>
<file>TimelineManager.js</file>
<file>TimelineModel.js</file>
<file>scriptsPanel.css</file>
<file>splitView.css</file>
<file>tabbedPane.css</file>
+ <file>textEditor.css</file>
<file>textPrompt.css</file>
- <file>textViewer.css</file>
<file>timelinePanel.css</file>
<file>Images/applicationCache.png</file>
<file>Images/back.png</file>
<script type="text/javascript" src="ElementsPanel.js"></script>
<script type="text/javascript" src="NetworkPanel.js"></script>
<script type="text/javascript" src="InjectedFakeWorker.js"></script>
- <script type="text/javascript" src="TextViewer.js"></script>
+ <script type="text/javascript" src="TextEditor.js"></script>
<script type="text/javascript" src="SourceFrame.js"></script>
<script type="text/javascript" src="ResourceView.js"></script>
<script type="text/javascript" src="RequestView.js"></script>
+2012-07-03 Jan Keromnes <janx@linux.com>
+
+ Web Inspector: WebInspector.TextViewer should be renamed WebInspector.TextEditor
+ https://bugs.webkit.org/show_bug.cgi?id=89939
+
+ Reviewed by Vsevolod Vlasov.
+
+ * WebCoreSupport/inspectorBB.html:
+
2012-07-02 Xiaobo Wang <xbwang@torchmobile.com.cn>
[BlackBerry] Use PUBLIC_BUILD to enable/disable DRT
<link rel="stylesheet" type="text/css" href="networkPanel.css">
<link rel="stylesheet" type="text/css" href="helpScreen.css">
<link rel="stylesheet" type="text/css" href="popover.css">
- <link rel="stylesheet" type="text/css" href="textViewer.css">
+ <link rel="stylesheet" type="text/css" href="textEditor.css">
<script type="text/javascript" src="javascript.js"></script>
</head>
<body class="detached">