Bug 37498 - Web Inspector: in Profiles panel, search always displays "Not found", although it jumps through the results
Summary: Web Inspector: in Profiles panel, search always displays "Not found", althoug...
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: Mikhail Naganov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-13 05:41 PDT by Mikhail Naganov
Modified: 2010-04-13 12:14 PDT (History)
8 users (show)

See Also:


Attachments
Sample of search box incorrect bheavior (163.30 KB, image/png)
2010-04-13 05:41 PDT, Mikhail Naganov
no flags Details
proposed patch (2.38 KB, patch)
2010-04-13 07:13 PDT, Mikhail Naganov
pfeldman: review-
Details | Formatted Diff | Diff
comments addressed (2.21 KB, patch)
2010-04-13 11:01 PDT, Mikhail Naganov
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikhail Naganov 2010-04-13 05:41:31 PDT
Created attachment 53240 [details]
Sample of search box incorrect bheavior

Open Inspector, enable profiling, and collect a profile.

In the "Search Profiles" field, try to search for something existing, e.g. "(program)" or "(idle)". To the left of the box "Not Found" is displayed immediately. Interesting enough, that switching back and forth between panels (or between profile views), and then pressing "Enter" on the search box sometimes leads to showing search results and cursor jumping over them, but "Not Found" is still displayed (see the screenshot.)
Comment 1 Mikhail Naganov 2010-04-13 07:13:17 PDT
Created attachment 53246 [details]
proposed patch
Comment 2 Pavel Feldman 2010-04-13 07:25:18 PDT
Comment on attachment 53246 [details]
proposed patch

> +        // The profile passed in the constructor contains important properties, but
> +        // no actual data. To have both properties and data, we chain the profile
> +        // we've got from 'getProfile' with the one passed in the constructor.
> +        profile.__proto__ = self.profile;

Assigning proto is nothing but the hack. What you should do is to create an object with properties around the payload you've received just as it is done in case of DOMAgent.js.
Comment 3 Mikhail Naganov 2010-04-13 11:01:39 PDT
Created attachment 53264 [details]
comments addressed
Comment 4 Pavel Feldman 2010-04-13 11:09:53 PDT
Comment on attachment 53264 [details]
comments addressed

Much better!
Comment 5 WebKit Commit Bot 2010-04-13 12:14:28 PDT
Comment on attachment 53264 [details]
comments addressed

Clearing flags on attachment: 53264

Committed r57529: <http://trac.webkit.org/changeset/57529>
Comment 6 WebKit Commit Bot 2010-04-13 12:14:34 PDT
All reviewed patches have been landed.  Closing bug.