Closed Bug 475621 Opened 16 years ago Closed 15 years ago

when saving an iframe whose source is an image, image is not saved.

Categories

(Core :: General, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: arno, Assigned: arno)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file testcase
Hi,
when saving an iframe whose src attribute is just an image (not a html document), saved iframe source is set to a local relative uri, but that uri is not fetched.

steps to reproduce:
- save testcase as a complete page.
- load saved testcase

what you see:
- an iframe whose source links to a non existent image

what you would like to get:
- an iframe whose source links to an image.
Comment on attachment 359145 [details]
testcase

><HTML><HEAD>
><TITLE>testcase for bug 475621</TITLE>
></HEAD><BODY>
><P>When saving current page, mozilla logo is not saved.</P>
><IFRAME src="http://upload.wikimedia.org/wikipedia/en/9/94/Mozilla_logo.png"/>
></BODY></HTML>
Oups, forget my previous message.

I think the root of the bug is:

When an iframe is encountered in the tree walker, MakeAndStoreLocalFilenameInURIMap is called with aNeedsPersisting set to false.  But if that uri does not reference a document (ie: it's an image for example), MakeAndStoreLocalFilenameInURIMap is called again with aNeedsPersisting set to true. Currently, previous data is returned as is. So, the mNeedsPersisting is not updated as needed. Then, uri will not be fetched.
Depends on: 321517
Blocks: 115634
Attached patch patch v1 (obsolete) — Splinter Review
sets mNeedsPersisting an retrieved URIData when calling with aNeedsPersisting to true. That would be useful when MakeAndStoreLocalFilenameInURIMap was already called with aURI but aNeedsPersisting set to false.
Attachment #359162 - Flags: review?(cbiesinger)
Comment on attachment 359162 [details] [diff] [review]
patch v1

sorry for that attachment. I must have done something wrong and didn't check.
Attachment #359162 - Flags: review?(cbiesinger)
Attached patch patch v1.0Splinter Review
real patch
Attachment #359162 - Attachment is obsolete: true
Attachment #360364 - Flags: review?(cbiesinger)
Comment on attachment 360364 [details] [diff] [review]
patch v1.0

Looks ok to me.
Attachment #360364 - Flags: superreview+
Attachment #360364 - Flags: review?(cbiesinger)
Attachment #360364 - Flags: review+
Pushed http://hg.mozilla.org/mozilla-central/rev/46ee46c2c52a
Status: NEW → RESOLVED
Closed: 15 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: