[Webkit-unassigned] [Bug 21095] Search should jump in all matches in Elements panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 9 19:54:39 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=21095





--- Comment #12 from Sammy <83.samarth at gmail.com>  2012-04-09 19:54:39 PST ---
(In reply to comment #10)
Thank you Pavel for review and inputs.
I have incorporated the review comments and have added js changes along with this patch.

> (From update of attachment 135274 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=135274&action=review
> 
> My general concern is Gmail-size apps. Gmail ends up having 5Mb of script tags in its DOM. Searching for "for" or "a" will be creating millions of node ids as results. We are currently bound with the number of nodes as search results, but after your change we become bound to the number of characters in DOM. Please keep it in mind when applying the front-end changes.
> 
Thanks for the inputs. I have tried to preserve backing up of highlightResults of for all matches of one element node. Highlighting individual matches, the next time, then happens from this. 

> > Source/WebCore/ChangeLog:3
> > +        Search should jump in all matches in Elements panel
> 
> Please prefix title with "Web Inspector:"
> 
Have added the prefix, thanks.
> > Source/WebCore/ChangeLog:6
> > +        This patch is to get the correct count of matched values
> 
> You could be more specific here.
> 
Have elaborated on change log comments. Plz suggest if its ok.
> > Source/WebCore/ChangeLog:11
> > +        No new tests required as this is the backend part of the fix.
> 
> You should be able to test this: see LayoutTests/inspector/elements/elements-panel-search.html
> 
Layout test expected result has been updated with desired value. For testPartialTag, there are 2 matches for "nput" in <input>input value</input> hence domAgent.searchResult returns with 2 as result count.
> > Source/WebCore/inspector/InspectorDOMAgent.cpp:830
> > +                while ((queryIndex = text.findIgnoringCase(whitespaceTrimmedQuery, queryIndex + 1)) != static_cast<int>(notFound))
> 
> I would introduce a static function above this method to re-use the code more aggressively, something like
> 
> populateNodeResults(Vector<Node*>& resultCollector, const String& str)
> 
Thanks for the input. I have introduced the function for code re-use.

> > Source/WebCore/inspector/InspectorDOMAgent.cpp:890
> > +      resultsIt->second.append(*it);
> 
> So you need to have a front-end code that would iterate through individual matches too. You should make it a part of the same change.

I have added js changes with this patch. Have tried to preserve the backing up of highlightResults for all matches in one element node. Iteration through individual matches, next time , happens over this. 

I found a issue with string corruption while applying the updateHighlights(). Kindly suggest, if I should file a new bug for this.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list