Bug 74340 - Share more code between updateWidget implementations in HTMLEmbedElement and HTMLObjectElement
Summary: Share more code between updateWidget implementations in HTMLEmbedElement and ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on: 47550
Blocks: 74360
  Show dependency treegraph
 
Reported: 2011-12-12 14:33 PST by Eric Seidel (no email)
Modified: 2012-01-25 15:30 PST (History)
5 users (show)

See Also:


Attachments
Patch (4.66 KB, patch)
2011-12-12 14:34 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch for landing (4.64 KB, patch)
2012-01-25 14:32 PST, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2011-12-12 14:33:48 PST
Share more code between updateWidget implementations in HTMLEmbedElement and HTMLObjectElement
Comment 1 Eric Seidel (no email) 2011-12-12 14:34:49 PST
Created attachment 118850 [details]
Patch
Comment 2 Eric Seidel (no email) 2011-12-12 14:36:07 PST
I'm not sure whether this explicit "guarded" function is better, or use of a non-virtual override.  Neither is particularly future-proof.  At least this implementation should catch future callers trying to dispatch a beforeload event for one of these objects (at least until the dispatchBeforeLoadEvent signature changes on ContainerNode).
Comment 3 Adam Barth 2011-12-12 14:40:40 PST
Comment on attachment 118850 [details]
Patch

I'm not sure whether this will actually stop someone from write the wrong code, but I don't think it will cause that much confusion.
Comment 4 Eric Seidel (no email) 2011-12-12 14:43:51 PST
The relevant code was added in bug 47550.  Unclear if it's still needed, or if this general recursion protection is needed for all objects which dispatch beforeload events.
Comment 5 WebKit Review Bot 2011-12-12 16:13:19 PST
Comment on attachment 118850 [details]
Patch

Attachment 118850 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/10849103

New failing tests:
fast/replaced/object-with-embed-url-param.html
fast/replaced/object-param-spaces.html
Comment 6 Eric Seidel (no email) 2012-01-25 14:32:56 PST
Created attachment 124013 [details]
Patch for landing
Comment 7 WebKit Review Bot 2012-01-25 15:30:12 PST
Comment on attachment 124013 [details]
Patch for landing

Clearing flags on attachment: 124013

Committed r105932: <http://trac.webkit.org/changeset/105932>
Comment 8 WebKit Review Bot 2012-01-25 15:30:17 PST
All reviewed patches have been landed.  Closing bug.