Bug 75226 - Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list
Summary: Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to...
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: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-26 04:42 PST by Alexander Pavlov (apavlov)
Modified: 2011-12-26 07:06 PST (History)
10 users (show)

See Also:


Attachments
Patch (7.28 KB, patch)
2011-12-26 05:07 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[PATCH] Comments addressed (9.64 KB, patch)
2011-12-26 06:24 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-12-26 04:42:40 PST
Patch to follow.
Comment 1 Alexander Pavlov (apavlov) 2011-12-26 05:07:48 PST
Created attachment 120550 [details]
Patch
Comment 2 Pavel Feldman 2011-12-26 05:18:13 PST
Comment on attachment 120550 [details]
Patch

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

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:455
> +        this._regExp = query ? this._dialog._createSearchRegExp(query, true) : null;

this._regex

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:475
> +        if (this._highlightTimer)

So is this this._timer or this._highlightTimer?

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:483
> +        const chunkSize = 50;

It seems like computing visible range and highlighting it synchronously might require less code.

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:499
> +        var text = element._text;

Could you use highlightRangesWithStyleClass instead?
Comment 3 Alexander Pavlov (apavlov) 2011-12-26 06:24:17 PST
Created attachment 120553 [details]
[PATCH] Comments addressed
Comment 4 Pavel Feldman 2011-12-26 06:35:24 PST
Comment on attachment 120553 [details]
[PATCH] Comments addressed

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

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:232
> +            this._startMatchHighlighting();

clearHighlight

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:274
> +    _startMatchHighlighting: function(query)

inline

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:465
> +    start: function(query)

highlightViewportItems
Comment 5 Alexander Pavlov (apavlov) 2011-12-26 07:06:59 PST
Committed: <http://trac.webkit.org/changeset/103684>