[Webkit-unassigned] [Bug 34382] When a live iframe element is moved between pages, it still depends on the old page.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 12 00:13:33 PST 2010


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


Darin Fisher (:fishd, Google) <fishd at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #48605|review?                     |review-
               Flag|                            |




--- Comment #27 from Darin Fisher (:fishd, Google) <fishd at chromium.org>  2010-02-12 00:13:28 PST ---
(From update of attachment 48605)
> +++ b/WebKit/chromium/public/WebFrameClient.h
...
> +#include "WebDocument.h"

nit: no need to include WebDocument.h.  just forward declare the type.


> +    // The child frame was transferred to a new page, due to DOM operation.
> +    // It's parent frame, document and containing view has changed.
> +    virtual void didTransferChildFrameToNewDocument(WebDocument) { }

all WebFrameClient methods must start with a WebFrame* that is the subject
of the notification.

one thing is a bit confusing about this method:  how do i find out the
WebFrame that i was transferred from?

also, i realized after we discussed this patch that an even better name
might be didReparentFrame.  and, since the old parent seems like useful
information to pass (the new parent is available at WebFrame::parent),
how about this signature:

  void didReparent(WebFrame*, WebFrame* oldParent);

You could place this next to willClose since it is a similar sort of
notification.

I'm surprised that you call transferChildFrameToNewDocument on each
child frame of the frame being reparented.  I'm guessing this is b/c
you want to have the WebKit layer update the WebFrameClients for each
of the child frames.  That might be better left to the FrameLoaderClient
implementation since it will know if that is necessary.  As is, the
notification isn't really correct:  the child frame didn't get moved to
a new document, and it didn't get reparented.

-Darin

-- 
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