Title: [134014] trunk/Source/WebCore
- Revision
- 134014
- Author
- commit-qu...@webkit.org
- Date
- 2012-11-08 22:46:26 -0800 (Thu, 08 Nov 2012)
Log Message
Web Inspector: stop using cursorCoords in CodeMirrorTextEditor
https://bugs.webkit.org/show_bug.cgi?id=101607
Patch by Jan Keromnes <j...@linux.com> on 2012-11-08
Reviewed by Vsevolod Vlasov.
API changes completing migration to v3.
* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor):
(WebInspector.CodeMirrorTextEditor.prototype.revealLine):
(WebInspector.CodeMirrorTextEditor.prototype.selection):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (134013 => 134014)
--- trunk/Source/WebCore/ChangeLog 2012-11-09 06:39:19 UTC (rev 134013)
+++ trunk/Source/WebCore/ChangeLog 2012-11-09 06:46:26 UTC (rev 134014)
@@ -1,3 +1,17 @@
+2012-11-08 Jan Keromnes <j...@linux.com>
+
+ Web Inspector: stop using cursorCoords in CodeMirrorTextEditor
+ https://bugs.webkit.org/show_bug.cgi?id=101607
+
+ Reviewed by Vsevolod Vlasov.
+
+ API changes completing migration to v3.
+
+ * inspector/front-end/CodeMirrorTextEditor.js:
+ (WebInspector.CodeMirrorTextEditor):
+ (WebInspector.CodeMirrorTextEditor.prototype.revealLine):
+ (WebInspector.CodeMirrorTextEditor.prototype.selection):
+
2012-11-08 Alexei Filippov <a...@chromium.org>
Web Inspector: make "Other" bar color darker in NMI snapshot.
Modified: trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js (134013 => 134014)
--- trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js 2012-11-09 06:39:19 UTC (rev 134013)
+++ trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js 2012-11-09 06:46:26 UTC (rev 134014)
@@ -54,9 +54,10 @@
lineNumbers: true,
gutters: ["CodeMirror-linenumbers", "breakpoints"]
});
- CodeMirror.on(this._codeMirror, "change", this._change.bind(this));
- CodeMirror.on(this._codeMirror, "gutterClick", this._gutterClick.bind(this));
+ this._codeMirror.on("change", this._change.bind(this));
+ this._codeMirror.on("gutterClick", this._gutterClick.bind(this));
+
this._lastRange = this.range();
this.element.firstChild.addStyleClass("source-code");
@@ -117,8 +118,7 @@
revealLine: function(lineNumber)
{
this._codeMirror.setCursor({ line: lineNumber, ch: 0 });
- var coords = this._codeMirror.cursorCoords();
- this._codeMirror.scrollTo(coords.x, coords.y);
+ this._codeMirror.scrollIntoView();
},
_gutterClick: function(instance, lineNumber, gutter, event)
@@ -276,8 +276,8 @@
*/
selection: function(textRange)
{
- var start = this._codeMirror.cursorCoords(true);
- var end = this._codeMirror.cursorCoords(false);
+ var start = this._codeMirror.getCursor(true);
+ var end = this._codeMirror.getCursor(false);
if (start.line > end.line || (start.line == end.line && start.ch > end.ch))
return this._toRange(end, start);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes