Bug 106801 - Web Inspector: highlight regexp API for DefaultTextEditor
Summary: Web Inspector: highlight regexp API for DefaultTextEditor
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Andrey Lushnikov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-14 09:32 PST by Andrey Lushnikov
Modified: 2013-01-16 02:44 PST (History)
12 users (show)

See Also:


Attachments
Patch (19.41 KB, patch)
2013-01-14 09:41 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (19.17 KB, patch)
2013-01-14 09:46 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (18.89 KB, patch)
2013-01-15 02:22 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (13.98 KB, patch)
2013-01-15 06:18 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (13.89 KB, patch)
2013-01-16 00:21 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff
Patch (13.89 KB, patch)
2013-01-16 02:42 PST, Andrey Lushnikov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Lushnikov 2013-01-14 09:32:08 PST
Add a highlight regexp API for TextEditor and DefaultTextEditor. This API should provide with the following capabilities:
- highlight all occurrences of regexp in text with some css class
- remove highlight for given regexp
Comment 1 Andrey Lushnikov 2013-01-14 09:41:42 PST
Created attachment 182592 [details]
Patch
Comment 2 Andrey Lushnikov 2013-01-14 09:46:03 PST
Created attachment 182593 [details]
Patch
Comment 3 Pavel Feldman 2013-01-14 09:56:52 PST
Comment on attachment 182593 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=182593&action=review

Please rename Regexp into Regex in method names.

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:116
> +    highlightRegexp: function(regexp, cssClass)

highlightRegex

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1961
> +                offsetTop: spans[i].offsetTop,

nuke

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1963
> +                offsetHeight: spans[i].offsetHeight

nuke

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1980
> +            highlight.style.marginTop = (metrics[i].offsetTop - highlight.offsetTop) + "px";

nuke

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:2054
> +                if (!this._highlightRegexps.hasOwnProperty(key))

This is always false.
Comment 4 Andrey Lushnikov 2013-01-15 02:22:50 PST
Created attachment 182725 [details]
Patch
Comment 5 Build Bot 2013-01-15 03:32:17 PST
Comment on attachment 182725 [details]
Patch

Attachment 182725 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/15845891

New failing tests:
inspector/editor/highlighter-basics.html
inspector/editor/text-editor-highlight-regexp.html
inspector/editor/highlighter-paste-in-comment.html
Comment 6 WebKit Review Bot 2013-01-15 04:02:35 PST
Comment on attachment 182725 [details]
Patch

Attachment 182725 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/15860912

New failing tests:
inspector/editor/highlighter-basics.html
inspector/editor/highlighter-paste-in-comment.html
Comment 7 Andrey Lushnikov 2013-01-15 06:18:37 PST
Created attachment 182752 [details]
Patch
Comment 8 Pavel Feldman 2013-01-15 07:21:14 PST
Comment on attachment 182752 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=182752&action=review

> Source/WebCore/inspector/front-end/DefaultTextEditor.js:1977
> +        var extraWidth = 1;

const
Comment 9 WebKit Review Bot 2013-01-15 07:23:08 PST
Comment on attachment 182752 [details]
Patch

Rejecting attachment 182752 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 cwd: /mnt/git/webkit-commit-queue

Last 500 characters of output:
ore/inspector/front-end/TextEditor.js
patching file Source/WebCore/inspector/front-end/textEditor.css
patching file LayoutTests/ChangeLog
Hunk #1 succeeded at 1 with fuzz 3.
patching file LayoutTests/inspector/editor/text-editor-highlight-regexp-expected.txt
patching file LayoutTests/inspector/editor/text-editor-highlight-regexp.html

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', '--force', '--reviewer', 'Pavel Feldman']" exit_code: 1 cwd: /mnt/git/webkit-commit-queue

Full output: http://queues.webkit.org/results/15884591
Comment 10 Andrey Lushnikov 2013-01-16 00:21:24 PST
Created attachment 182927 [details]
Patch
Comment 11 Pavel Feldman 2013-01-16 00:50:22 PST
Comment on attachment 182927 [details]
Patch

Clearing flags on attachment: 182927

Committed r139844: <http://trac.webkit.org/changeset/139844>
Comment 12 Pavel Feldman 2013-01-16 00:50:27 PST
All reviewed patches have been landed.  Closing bug.
Comment 13 Andrey Lushnikov 2013-01-16 02:42:18 PST
Reopening to attach new patch.
Comment 14 Andrey Lushnikov 2013-01-16 02:42:22 PST
Created attachment 182945 [details]
Patch
Comment 15 Andrey Lushnikov 2013-01-16 02:44:19 PST
Attached patch to a wrong bug.