Bug 105547

Summary: Web Inspector: Mac WK1 Inspector can't save/load timeline data
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Web Inspector (Deprecated)Assignee: Adam Roben (:aroben) <aroben>
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, joepeck, keishi, loislo, pfeldman, pmuellr, sam, timothy, vsevik, web-inspector-bugs, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch none

Description Adam Roben (:aroben) 2012-12-20 09:55:00 PST
To reproduce:

1. Record a timeline using the Mac WebKit1 Inspector (not the Safari Inspector)
2. Right-click

There's no "Save Timeline data…" option. And the "Load Timeline data…" option does nothing.
Comment 1 Adam Roben (:aroben) 2012-12-20 09:58:52 PST
Created attachment 180354 [details]
Patch
Comment 2 Adam Roben (:aroben) 2012-12-20 10:01:37 PST
Created attachment 180355 [details]
Patch
Comment 3 Adam Roben (:aroben) 2012-12-20 10:03:18 PST
Created attachment 180358 [details]
Patch
Comment 4 Adam Roben (:aroben) 2012-12-20 10:04:14 PST
Created attachment 180359 [details]
Patch
Comment 5 Adam Roben (:aroben) 2012-12-20 10:09:13 PST
AFAICT there's no way to save/load timeline data in Safari's Inspector, so I don't think this patch will affect it.
Comment 6 Adam Roben (:aroben) 2012-12-20 10:40:08 PST
And of course this won't affect Safari itself, since this is WK1-only.
Comment 7 Pavel Feldman 2012-12-20 10:55:07 PST
Comment on attachment 180359 [details]
Patch

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

> Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:311
> +    if (!forceSaveAs) {

You probably want to check for url being a part of m_saveURLs. That way before writing into the FS user will see a file chooser.
Comment 8 Adam Roben (:aroben) 2012-12-20 10:59:54 PST
Comment on attachment 180359 [details]
Patch

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

>> Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm:311
>> +    if (!forceSaveAs) {
> 
> You probably want to check for url being a part of m_saveURLs. That way before writing into the FS user will see a file chooser.

Ah, good call. I'll do that.
Comment 9 Adam Roben (:aroben) 2012-12-20 11:03:42 PST
Created attachment 180370 [details]
Patch
Comment 10 Adam Roben (:aroben) 2012-12-20 13:26:11 PST
Created attachment 180398 [details]
Patch
Comment 11 Adam Roben (:aroben) 2012-12-20 13:26:29 PST
I updated the patch to work correctly when the Inspector is docked.
Comment 12 WebKit Review Bot 2012-12-29 08:15:35 PST
Comment on attachment 180398 [details]
Patch

Clearing flags on attachment: 180398

Committed r138565: <http://trac.webkit.org/changeset/138565>
Comment 13 WebKit Review Bot 2012-12-29 08:15:39 PST
All reviewed patches have been landed.  Closing bug.