Changeset 146971 in webkit


Ignore:
Timestamp:
Mar 27, 2013 1:04:24 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: Add isClean/markClean method pair to textEditor.js
https://bugs.webkit.org/show_bug.cgi?id=112815

Patch by Andrey Lushnikov <lushnikov@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.):

Location:
trunk/Source/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r146970 r146971  
     12013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: Add isClean/markClean method pair to textEditor.js
     4        https://bugs.webkit.org/show_bug.cgi?id=112815
     5
     6        Reviewed by Vsevolod Vlasov.
     7
     8        No new tests: no change in behaviour.
     9
     10        - Add TextEditor.isClean and TextEditor.markClean methods
     11        - Implement these methods in DefaultTextEditor
     12        - Implement these methods in CodeMirrorTextEditor
     13
     14        * inspector/front-end/CodeMirrorTextEditor.js:
     15        (WebInspector.CodeMirrorTextEditor.prototype.isClean):
     16        (WebInspector.CodeMirrorTextEditor.prototype.markClean):
     17        * inspector/front-end/DefaultTextEditor.js:
     18        (WebInspector.DefaultTextEditor.prototype.isClean):
     19        (WebInspector.DefaultTextEditor.prototype.markClean):
     20        * inspector/front-end/TextEditor.js:
     21        (WebInspector.TextEditor.prototype.isClean):
     22        (WebInspector.TextEditor.prototype.markClean):
     23        * inspector/front-end/TextEditorModel.js:
     24        (WebInspector.TextEditorModel.endsWithBracketRegex.):
     25
    1262013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
    227
  • trunk/Source/WebCore/inspector/front-end/CodeMirrorTextEditor.js

    r146615 r146971  
    103103
    104104    /**
     105     * @return {boolean}
     106     */
     107    isClean: function()
     108    {
     109        return this._codeMirror.isClean();
     110    },
     111
     112    markClean: function()
     113    {
     114        this._codeMirror.markClean();
     115    },
     116
     117    /**
    105118     * @param {string} mimeType
    106119     */
  • trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js

    r146875 r146971  
    112112WebInspector.DefaultTextEditor.prototype = {
    113113    /**
     114     * @return {boolean}
     115     */
     116    isClean: function()
     117    {
     118        return this._textModel.isClean();
     119    },
     120
     121    markClean: function()
     122    {
     123        this._textModel.markClean();
     124    },
     125    /**
    114126     * @param {WebInspector.TextRange} range
    115127     * @return {string}
  • trunk/Source/WebCore/inspector/front-end/TextEditor.js

    r146615 r146971  
    4040
    4141WebInspector.TextEditor.prototype = {
    42 
     42    /**
     43     * @return {boolean}
     44     */
     45    isClean: function() { },
     46
     47    markClean: function() { },
    4348    /**
    4449     * @param {string} mimeType
  • trunk/Source/WebCore/inspector/front-end/TextEditorModel.js

    r145069 r146971  
    201201WebInspector.TextEditorModel.prototype = {
    202202    /**
     203     * @return {boolean}
     204     */
     205    isClean: function() {
     206        return !this._undoStack.length;
     207    },
     208
     209    markClean: function() {
     210        this._resetUndoStack();
     211    },
     212
     213    /**
    203214     * @return {number}
    204215     */
Note: See TracChangeset for help on using the changeset viewer.