[Webkit-unassigned] [Bug 59596] Web Inspector: Move Resources Panel search to backend
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Apr 28 03:08:47 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=59596
--- Comment #4 from Vsevolod Vlasov <vsevik at chromium.org> 2011-04-28 03:08:47 PST ---
> > Source/WebCore/inspector/Inspector.json:101
> > + "id": "ResourceSearchResult",
>
> "SearchResult"
Comments about protocol addressed.
> > Source/WebCore/inspector/InspectorPageAgent.cpp:478
> > +int InspectorPageAgent::countRegularExpressionMatches(const RegularExpression& regex, const String& content)
>
> You could define static functions in WebCore namespace for helper routines.
Done.
> > Source/WebCore/inspector/InspectorPageAgent.cpp:483
> > + while ((position = regex.match(content, start)) != -1) {
>
> Sounds like you could provide offsets easily too.
I could if we need that. We do not need that on front-end currently.
> > Source/WebCore/inspector/InspectorPageAgent.cpp:513
> > + const CachedResourceLoader::DocumentResourceMap& allResources = frame->document()->cachedResourceLoader()->allCachedResources();
>
> We already have this logic somewhere. Could you reuse it?
This is rewritten using frame traversing.
> > Source/WebCore/inspector/InspectorPageAgent.cpp:520
> > + if (equalIgnoringFragmentIdentifier(kurl, frame->loader()->iconURL()))
>
> Why this check?
Removed.
> > Source/WebCore/inspector/InspectorPageAgent.cpp:530
> > + matches = countMatchesInResourceContent(frame, kurl, regex);
>
> You could shortcut and use cached resource instance to get its content.
Done.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:748
> > + PageAgent.searchInResources(regexes[i].source, regexes[i].ignoreCase, callback.bind(this));
>
> can there be multiple search queries?
Search changed to always use only one regular expression.
> > Source/WebCore/inspector/front-end/ResourcesPanel.js:826
> > + jumpToNextSearchResult: function()
>
> It looks like too much code. I am sure it can be simpler :)
Extracted logic for selecting next/previous search result.
--
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