Changeset 140314 in webkit


Ignore:
Timestamp:
Jan 21, 2013 1:53:19 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Web Inspector: refactoring to use string as argument for highlightRegex API
https://bugs.webkit.org/show_bug.cgi?id=107243

Patch by Andrey Lushnikov <lushnikov@chromium.org> on 2013-01-21
Reviewed by Pavel Feldman.

Source/WebCore:

Use string as argument for highlightRegex API instead of using regex object.

No new tests: no change in behaviour.

  • inspector/front-end/DefaultTextEditor.js:

(WebInspector.TextEditorMainPanel.prototype.highlightRegex):

  • inspector/front-end/TextEditor.js:

LayoutTests:

Correct test to correspond to refactoring changes.

  • inspector/editor/text-editor-highlight-regexp.html:
Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140313 r140314  
     12013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: refactoring to use string as argument for highlightRegex API
     4        https://bugs.webkit.org/show_bug.cgi?id=107243
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Correct test to correspond to refactoring changes.
     9
     10        * inspector/editor/text-editor-highlight-regexp.html:
     11
    1122013-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
    213
  • trunk/LayoutTests/inspector/editor/text-editor-highlight-regexp.html

    r139881 r140314  
    2222            InspectorTest.addResult("\nBefore highlight");
    2323            InspectorTest.dumpEditorHTML(textEditor, true);
    24             textEditor.highlightRegex(/foo_./, "some-css-class");
     24            textEditor.highlightRegex("foo_.", "some-css-class");
    2525            InspectorTest.addResult("\nAdd highlight for regexp /foo_./");
    2626            InspectorTest.dumpEditorHTML(textEditor, true);
    2727            InspectorTest.addResult("\nRemove highlight for regexp /foo_./");
    28             textEditor.removeRegexHighlight(/foo_./);
     28            textEditor.removeRegexHighlight("foo_.");
    2929            InspectorTest.dumpEditorHTML(textEditor, true);
    3030            next();
  • trunk/Source/WebCore/ChangeLog

    r140313 r140314  
     12013-01-21  Andrey Lushnikov  <lushnikov@chromium.org>
     2
     3        Web Inspector: refactoring to use string as argument for highlightRegex API
     4        https://bugs.webkit.org/show_bug.cgi?id=107243
     5
     6        Reviewed by Pavel Feldman.
     7
     8        Use string as argument for highlightRegex API instead of using regex object.
     9
     10        No new tests: no change in behaviour.
     11
     12        * inspector/front-end/DefaultTextEditor.js:
     13        (WebInspector.TextEditorMainPanel.prototype.highlightRegex):
     14        * inspector/front-end/TextEditor.js:
     15
    1162013-01-21  Sheriff Bot  <webkit.review.bot@gmail.com>
    217
  • trunk/Source/WebCore/inspector/front-end/DefaultTextEditor.js

    r139980 r140314  
    111111WebInspector.DefaultTextEditor.prototype = {
    112112    /**
    113      * @param {RegExp} regex
     113     * @param {string} regex
    114114     * @param {string} cssClass
    115115     */
     
    120120
    121121    /**
    122      * @param {RegExp} regex
     122     * @param {string} regex
    123123     * @return {boolean}
    124124     */
     
    13651365WebInspector.TextEditorMainPanel.prototype = {
    13661366    /**
    1367      * @param {RegExp} regex
     1367     * @param {string} regex
    13681368     * @param {string} cssClass
    13691369     */
     
    13711371    {
    13721372        this._highlightRegexs[regex] = {
    1373             regex: new RegExp(regex.source, "g" + (regex.ignoreCase ? "i" : "")),
     1373            regex: new RegExp(regex, "g"),
    13741374            cssClass: cssClass
    13751375        };
     
    13781378
    13791379    /**
    1380      * @param {RegExp} regex
     1380     * @param {string} regex
    13811381     * @return {boolean}
    13821382     */
  • trunk/Source/WebCore/inspector/front-end/TextEditor.js

    r139844 r140314  
    6262
    6363    /**
    64      * @param {RegExp} regex
     64     * @param {string} regex
    6565     * @param {string} cssClass
    6666     */
     
    6868
    6969    /**
    70      * @param {RegExp} regex
     70     * @param {string} regex
    7171     * @return {boolean}
    7272     */
Note: See TracChangeset for help on using the changeset viewer.