Bug 75226

Summary: Web Inspector: [Scripts] Implement iterative match highlighting in the "Go to Function" dialog item list
Product: WebKit Reporter: Alexander Pavlov (apavlov) <apavlov>
Component: Web Inspector (Deprecated)Assignee: Alexander Pavlov (apavlov) <apavlov>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
[PATCH] Comments addressed pfeldman: review+

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>