Title: [146971] trunk/Source/WebCore
- Revision
- 146971
- Author
- commit-qu...@webkit.org
- Date
- 2013-03-27 01:04:24 -0700 (Wed, 27 Mar 2013)
Log Message
Web Inspector: Add isClean/markClean method pair to textEditor.js
https://bugs.webkit.org/show_bug.cgi?id=112815
Patch by Andrey Lushnikov <lushni...@chromium.org> on 2013-03-27
Reviewed by Vsevolod Vlasov.
No new tests: no change in behaviour.
- Add TextEditor.isClean and TextEditor.markClean methods
- Implement these methods in DefaultTextEditor
- Implement these methods in CodeMirrorTextEditor
* inspector/front-end/CodeMirrorTextEditor.js:
(WebInspector.CodeMirrorTextEditor.prototype.isClean):
(WebInspector.CodeMirrorTextEditor.prototype.markClean):
* inspector/front-end/DefaultTextEditor.js:
(WebInspector.DefaultTextEditor.prototype.isClean):
(WebInspector.DefaultTextEditor.prototype.markClean):
* inspector/front-end/TextEditor.js:
(WebInspector.TextEditor.prototype.isClean):
(WebInspector.TextEditor.prototype.markClean):
* inspector/front-end/TextEditorModel.js:
(WebInspector.TextEditorModel.endsWithBracketRegex.):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (146970 => 146971)
--- trunk/Source/WebCore/ChangeLog 2013-03-27 08:01:06 UTC (rev 146970)
+++ trunk/Source/WebCore/ChangeLog 2013-03-27 08:04:24 UTC (rev 146971)
@@ -1,3 +1,28 @@
+2013-03-27 Andrey Lushnikov <lushni...@chromium.org>
+
+ Web Inspector: Add isClean/markClean method pair to textEditor.js
+ https://bugs.webkit.org/show_bug.cgi?id=112815
+
+ Reviewed by Vsevolod Vlasov.
+
+ No new tests: no change in behaviour.
+
+ - Add TextEditor.isClean and TextEditor.markClean methods
+ - Implement these methods in DefaultTextEditor
+ - Implement these methods in CodeMirrorTextEditor
+
+ * inspector/front-end/CodeMirrorTextEditor.js:
+ (WebInspector.CodeMirrorTextEditor.prototype.isClean):
+ (WebInspector.CodeMirrorTextEditor.prototype.markClean):
+ * inspector/front-end/DefaultTextEditor.js:
+ (WebInspector.DefaultTextEditor.prototype.isClean):
+ (WebInspector.DefaultTextEditor.prototype.markClean):
+ * inspector/front-end/TextEditor.js:
+ (WebInspector.TextEditor.prototype.isClean):
+ (WebInspector.TextEditor.prototype.markClean):
+ * inspector/front-end/TextEditorModel.js:
+ (WebInspector.TextEditorModel.endsWithBracketRegex.):
+
2013-03-27 Ilya Tikhonovsky <loi...@chromium.org>
Unreviewed. Web Inspector. rename method Timeline.Calculator.grandMinimumBoundary to Timeline.Calculator.zeroTime
Modified: trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js (146970 => 146971)
--- trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js 2013-03-27 08:01:06 UTC (rev 146970)
+++ trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js 2013-03-27 08:04:24 UTC (rev 146971)
@@ -102,6 +102,19 @@
},
/**
+ * @return {boolean}
+ */
+ isClean: function()
+ {
+ return this._codeMirror.isClean();
+ },
+
+ markClean: function()
+ {
+ this._codeMirror.markClean();
+ },
+
+ /**
* @param {string} mimeType
*/
set mimeType(mimeType)
Modified: trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js (146970 => 146971)
--- trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2013-03-27 08:01:06 UTC (rev 146970)
+++ trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js 2013-03-27 08:04:24 UTC (rev 146971)
@@ -111,6 +111,18 @@
WebInspector.DefaultTextEditor.prototype = {
/**
+ * @return {boolean}
+ */
+ isClean: function()
+ {
+ return this._textModel.isClean();
+ },
+
+ markClean: function()
+ {
+ this._textModel.markClean();
+ },
+ /**
* @param {WebInspector.TextRange} range
* @return {string}
*/
Modified: trunk/Source/WebCore/inspector/front-end/TextEditor.js (146970 => 146971)
--- trunk/Source/WebCore/inspector/front-end/TextEditor.js 2013-03-27 08:01:06 UTC (rev 146970)
+++ trunk/Source/WebCore/inspector/front-end/TextEditor.js 2013-03-27 08:04:24 UTC (rev 146971)
@@ -39,7 +39,12 @@
};
WebInspector.TextEditor.prototype = {
+ /**
+ * @return {boolean}
+ */
+ isClean: function() { },
+ markClean: function() { },
/**
* @param {string} mimeType
*/
Modified: trunk/Source/WebCore/inspector/front-end/TextEditorModel.js (146970 => 146971)
--- trunk/Source/WebCore/inspector/front-end/TextEditorModel.js 2013-03-27 08:01:06 UTC (rev 146970)
+++ trunk/Source/WebCore/inspector/front-end/TextEditorModel.js 2013-03-27 08:04:24 UTC (rev 146971)
@@ -200,6 +200,17 @@
WebInspector.TextEditorModel.prototype = {
/**
+ * @return {boolean}
+ */
+ isClean: function() {
+ return !this._undoStack.length;
+ },
+
+ markClean: function() {
+ this._resetUndoStack();
+ },
+
+ /**
* @return {number}
*/
get linesCount()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes