Changeset 175497 in webkit


Ignore:
Timestamp:
Nov 3, 2014 5:03:42 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: TextEditor search doesn't work after editing contents
https://bugs.webkit.org/show_bug.cgi?id=138198

Patch by Joseph Pecoraro <Joseph Pecoraro> on 2014-11-03
Reviewed by Timothy Hatcher.

  • UserInterface/Views/SourceCodeTextEditor.js:

(WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
Fallback to pure TextEditor content searching (CodeMirror) if the editor has edits.

  • UserInterface/Views/TextEditor.js:

(WebInspector.TextEditor.prototype.hasEdits):
Check the CodeMirror clean state to known if we have edits or not.

Location:
trunk/Source/WebInspectorUI
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebInspectorUI/ChangeLog

    r175483 r175497  
     12014-11-03  Joseph Pecoraro  <pecoraro@apple.com>
     2
     3        Web Inspector: TextEditor search doesn't work after editing contents
     4        https://bugs.webkit.org/show_bug.cgi?id=138198
     5
     6        Reviewed by Timothy Hatcher.
     7
     8        * UserInterface/Views/SourceCodeTextEditor.js:
     9        (WebInspector.SourceCodeTextEditor.prototype.customPerformSearch):
     10        Fallback to pure TextEditor content searching (CodeMirror) if the editor has edits.
     11
     12        * UserInterface/Views/TextEditor.js:
     13        (WebInspector.TextEditor.prototype.hasEdits):
     14        Check the CodeMirror clean state to known if we have edits or not.
     15
    1162014-11-03  Joseph Pecoraro  <pecoraro@apple.com>
    217
  • trunk/Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js

    r173505 r175497  
    207207        }
    208208
     209        if (this.hasEdits())
     210            return false;
     211
    209212        if (this._sourceCode instanceof WebInspector.SourceMapResource)
    210213            return false;
  • trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js

    r173477 r175497  
    814814    // Private
    815815
     816    hasEdits: function()
     817    {
     818        return !this._codeMirror.isClean();
     819    },
     820
    816821    _contentChanged: function(codeMirror, change)
    817822    {
Note: See TracChangeset for help on using the changeset viewer.