Bug 41027

Summary: Cannot prevent loading of images in <object> tags using onbeforeload.
Product: WebKit Reporter: Andy Estes <aestes>
Component: Page LoadingAssignee: Andy Estes <aestes>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, beidson, commit-queue, hyatt
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
test case
none
Patch
none
Patch none

Description Andy Estes 2010-06-22 17:41:02 PDT
Created attachment 59447 [details]
test case

In general, a script can prevent loading of resources in <object> tags by handling the beforeload event and calling preventDefault().  See LayoutTests/fast/dom/beforeload/flash-before-load.html.  Unfortunately, this does not seem to work when the resource specified in the <object> is an image.  See the attached test case.
Comment 1 Andy Estes 2010-06-22 17:44:46 PDT
<rdar://problem/8120596>
Comment 2 Andy Estes 2010-07-03 01:41:11 PDT
Created attachment 60443 [details]
Patch
Comment 3 Andy Estes 2010-07-03 01:49:21 PDT
Comment on attachment 60443 [details]
Patch

Oops, I just realied the fallback case isn't handled correctly.  I'll try again.
Comment 4 Andy Estes 2010-07-06 15:40:18 PDT
Created attachment 60658 [details]
Patch
Comment 5 Adam Barth 2010-07-07 03:09:49 PDT
Comment on attachment 60658 [details]
Patch

Interesting.  I verified that updateRenderer() will do the work removed in attach().  Thanks for the patch.
Comment 6 WebKit Commit Bot 2010-07-07 07:37:35 PDT
Comment on attachment 60658 [details]
Patch

Clearing flags on attachment: 60658

Committed r62664: <http://trac.webkit.org/changeset/62664>
Comment 7 WebKit Commit Bot 2010-07-07 07:37:39 PDT
All reviewed patches have been landed.  Closing bug.