RESOLVED FIXED 54454
Web Inspector: wrong filename when saving resource from ResourceImageContentView
https://bugs.webkit.org/show_bug.cgi?id=54454
Summary Web Inspector: wrong filename when saving resource from ResourceImageContentView
Ilya Tikhonovsky
Reported 2011-02-15 06:24:16 PST
2. When I download something from the Resources layout under Developer Tools the filename of the image (or anything I download) is changed to the generic term "download.jpg" or other type of extension. The previous version of Google Chrome downloaded items with their original file name.
Attachments
Patch (2.74 KB, patch)
2017-03-16 14:41 PDT, Devin Rousso
no flags
Patch (2.57 KB, patch)
2017-03-16 15:00 PDT, Devin Rousso
no flags
Patch (3.51 KB, patch)
2017-03-16 15:42 PDT, Devin Rousso
joepeck: review+
Patch (3.20 KB, patch)
2017-03-17 20:08 PDT, Devin Rousso
no flags
Blaze Burg
Comment 1 2014-01-25 14:52:34 PST
Migrating to new component. On Nightly Safari, it saves the resource with the name "Unknown".
Radar WebKit Bug Importer
Comment 2 2014-01-25 14:52:42 PST
Devin Rousso
Comment 3 2017-03-16 14:41:54 PDT
Joseph Pecoraro
Comment 4 2017-03-16 14:46:38 PDT
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.
Devin Rousso
Comment 5 2017-03-16 15:00:35 PDT
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.
Devin Rousso
Comment 6 2017-03-16 15:00:54 PDT
Joseph Pecoraro
Comment 7 2017-03-16 15:03:20 PDT
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?
Devin Rousso
Comment 8 2017-03-16 15:42:35 PDT
Joseph Pecoraro
Comment 9 2017-03-17 11:08:11 PDT
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.
Devin Rousso
Comment 10 2017-03-17 20:08:53 PDT
WebKit Commit Bot
Comment 11 2017-03-17 20:49:53 PDT
Comment on attachment 304852 [details] Patch Clearing flags on attachment: 304852 Committed r214133: <http://trac.webkit.org/changeset/214133>
WebKit Commit Bot
Comment 12 2017-03-17 20:49:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.