[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 04:30:13 PST 2010


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





--- Comment #29 from Simon Hausmann <hausmann at webkit.org>  2010-02-12 04:30:07 PST ---
(From update of attachment 48605)
> diff --git a/WebKit/qt/Api/qwebframe.h b/WebKit/qt/Api/qwebframe.h
> index 25f6c9b..2ec6f64 100644
> --- a/WebKit/qt/Api/qwebframe.h
> +++ b/WebKit/qt/Api/qwebframe.h
> @@ -217,6 +217,8 @@ Q_SIGNALS:
>      void loadStarted();
>      void loadFinished(bool ok);
>  
> +    void webPageChanged();

I'd prefer "pageChanged()" as the name of the signal, for consistency with the
page property.


> +        if (oldPage != newPage) {
> +            m_webFrame->d->setPage(newPage);
> +            // The QWebFrame is created as a child of QWebPage. That adds it to QObject's internal children list and
> +            // ensures it will be deleted when parent QWebPage is deleted. Re-parent.
> +            m_webFrame->setParent(newPage);
> +            emit m_webFrame->webPageChanged();

I would do all these three things inside QWebFramePrivate::setPage, so that it
basically becomes:

void QWebFramePrivate::setPage(const QWebPage* newPage)
{
    page = newPage;
    setParent(newPage);
    emit q->pageChanged();
}


Otherwise the Qt parts look good to me! :)

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