Summary: | Web Inspector: wrong filename when saving resource from ResourceImageContentView | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Ilya Tikhonovsky <loislo> | ||||||||||
Component: | Web Inspector | Assignee: | Devin Rousso <hi> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | bweinstein, commit-queue, hi, inspector-bugzilla-changes, pmuellr, rik, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | 528+ (Nightly build) | ||||||||||||
Hardware: | All | ||||||||||||
OS: | All | ||||||||||||
Attachments: |
|
Description
Ilya Tikhonovsky
2011-02-15 06:24:16 PST
Migrating to new component. On Nightly Safari, it saves the resource with the name "Unknown". Created attachment 304697 [details]
Patch
Comment on attachment 304697 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304697&action=review Seems like this could save the wrong content. That doesn't seem correct to me. Maybe leave the TextResourceContentView's saveData? > Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js:74 > + get saveData() > + { > + return {url: this.resource.url, content: this.resource.content}; > + } > + This saves the resources's content. > Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js:-137 > - get saveData() > - { > - return {url: this.resource.url, content: this._textEditor.string}; > - } This would have saved the current text in the editor. Comment on attachment 304697 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304697&action=review >> Source/WebInspectorUI/UserInterface/Views/TextResourceContentView.js:-137 >> - } > > This would have saved the current text in the editor. I dunno why, but I completely misread how the `this._textEditor.readOnly` works. Thought it was backwards. Created attachment 304700 [details]
Patch
Comment on attachment 304700 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304700&action=review > Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js:73 > + get supportsSave() > + { > + return true; > + } > + > + get saveData() > + { > + return {url: this.resource.url, content: this.resource.content}; > + } Should this wait until the resource has content? What happens if you trigger the save during the spinner / downloading screen? Created attachment 304708 [details]
Patch
Comment on attachment 304708 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=304708&action=review r=me > Source/WebInspectorUI/UserInterface/Views/ResourceContentView.js:72 > + return {url: this.resource.url, content: this.resource.content}; Nit: I'd have made these this._resource instead of going through the public accessor. Created attachment 304852 [details]
Patch
Comment on attachment 304852 [details] Patch Clearing flags on attachment: 304852 Committed r214133: <http://trac.webkit.org/changeset/214133> All reviewed patches have been landed. Closing bug. |