Bug 106180 - SVG in <object> and <embed> should be restored from page cache
Summary: SVG in <object> and <embed> should be restored from page cache
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Major
Assignee: Nobody
URL: http://dahlström.net/svg/html/get-emb...
Keywords: InRadar
: 130018 (view as bug list)
Depends on:
Reported: 2013-01-05 09:25 PST by Michael N.
Modified: 2016-06-29 13:54 PDT (History)
9 users (show)

See Also:

[Web Archive] http://dahlström.net/svg/html/get-embedded-svg-document-script.html (10.44 KB, application/x-webarchive)
2014-03-12 09:46 PDT, Daniel Bates
no flags Details
[Screenshot] Initial load of http://dahlström.net/svg/html/get-embedded-svg-document-script.html (146.37 KB, image/png)
2014-03-12 09:50 PDT, Daniel Bates
no flags Details
[Screenshot] After navigating to another site and hitting back button (148.45 KB, image/png)
2014-03-12 09:53 PDT, Daniel Bates
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael N. 2013-01-05 09:25:21 PST
Erik Dahlström's testpage shows the SVG logo referenced three times in one page, using all three embedding techniques respectively:
object, embed, iframe
and then works some JavaScript on them

Load the page in Safari
all three SVG logos (original fill: orange) get a green fill via script

then load any other page
then hit the back button

the first two svg logos (object, embed) will be orange (their original state before script), the one with iframe will have a green fill

Firefox 17, Chrome 23, IE9/10 seem to fire another onload event on hitting the backbutton, resulting in identical display on first load and on returning via  backbutton.

Opera 12 behaves like Safari in this scenario.
Comment 1 Alexey Proskuryakov 2013-01-07 10:22:10 PST
This might be expected behavior.
Comment 2 Alexey Proskuryakov 2013-01-07 10:23:51 PST
Posted the previous comment prematurely.

This sounds like a consequence of caching pages with plug-ins, and treating <object> and <embed> as plug-in content.
Comment 3 Brady Eidson 2013-01-07 10:29:20 PST
Yup - we blindly treat <embed> and <object> as plug-ins even if they aren't actually backed by a plugin instance.  We should be able to detect this and properly cache such elements.
Comment 4 Daniel Bates 2014-03-12 09:29:19 PDT
*** Bug 130018 has been marked as a duplicate of this bug. ***
Comment 5 Daniel Bates 2014-03-12 09:46:19 PDT
Created attachment 226517 [details]
[Web Archive] http://dahlström.net/svg/html/get-embedded-svg-document-script.html

For historical preservation, attached a web archive of <http://dahlström.net/svg/html/get-embedded-svg-document-script.html> as it appeared on 03/12/2014 using Safari Version 7.0.2 (9537.74.9).
Comment 7 Daniel Bates 2014-03-12 09:53:10 PDT
Created attachment 226520 [details]
[Screenshot] After navigating to another site and hitting back button

Screenshot of <http://dahlström.net/svg/html/get-embedded-svg-document-script.html> after navigating to another site and hitting the back button to return to the dahlström.net page.

Note, sometimes I needed to navigate to another site (e.g. apple.com), click the back button, click the forward button and then click the back button to reproduce this issue.
Comment 8 Radar WebKit Bug Importer 2016-06-29 13:54:06 PDT