[Webkit-unassigned] [Bug 44827] New: If an <object> is removed from the page while its fallback content is being used, Safari will automatically use fallback content when the object is re-inserted.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 28 12:43:01 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=44827

           Summary: If an <object> is removed from the page while its
                    fallback content is being used, Safari will
                    automatically use fallback content when the object is
                    re-inserted.
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh Intel
               URL: http://www.silverlight.net
        OS/Version: Mac OS X 10.6
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: HTML DOM
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: marc.hoyois at gmail.com


Created an attachment (id=65837)
 --> (https://bugs.webkit.org/attachment.cgi?id=65837)
Simple Safari extension to reproduce the bug

Overview:
The bug happens in the following situation. There is an <object> element with fallback content on a page and Safari is currently using its fallback content. If one then removes the <object> element from the DOM tree and re-insert it later on, Safari automatically uses the fallback content again. In particular, no beforeload event is fired by the <object> element when it is re-inserted.

Steps to reproduce:
1. Install the attached extension. It has a simple injected script which does the following:

-> It listens to beforeload events, ignoring events not fired by <object> elements
-> When an object element is detected, it calls event.preventDefault() and, within a setTimeout of 3 seconds, replaces the <object> by a red <div>
-> Clicking on the red <div> restores the original <object> element

2. (requires Silverlight plugin installed) Navigate to http://www.silverlight.net (for example). This page has a single <object> element with an image as fallback content. Observe the alert box confirming that the object has fired a beforeload event.

3. Observe that Safari uses the fallback image, since the <object> has been blocked, and wait three seconds for the image to be replaced by a red rectangle.

4. Click on the red rectangle.

Expected result:
Upon re-insertion, the <object> should fire a beforeload event again (triggering an alert box as in step 2), and the Silverlight content should load normally.

Actual result:
No beforeload event is fired and the Silverlight content does not load. Instead, the fallback image is used.

Build and platform:
Tested in OS X 10.6 with both Safari 5.0.1 and Webkit 6533.17.8 r66130.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list