Changeset 67554 in webkit


Ignore:
Timestamp:
Sep 15, 2010 6:32:02 AM (14 years ago)
Author:
Simon Hausmann
Message:

[Qt] QtTestBrowser crashes when enabling QGraphicsView mode after first loading page without it enabled
https://bugs.webkit.org/show_bug.cgi?id=35247

Reviewed by Tor Arne Vestbø.

The main issue when changing the views is that the plugins and any other components that
depend on view specific attributes such as the native window id are not teared down.
Even if we had a tear-down procedure, we'd have to re-initialize the plugin after
switching to the new view (QGraphicsWebView). This is a rather uncommon situation, so
we decided to work around this in QtTestBrowser by making toggling between QWebView
and QGraphicsWebView also re-create the page.

  • QtTestBrowser/launcherwindow.cpp:

(LauncherWindow::initializeView):

  • QtTestBrowser/mainwindow.h:
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r67527 r67554  
     12010-09-15  Simon Hausmann  <simon.hausmann@nokia.com>
     2
     3        Reviewed by Tor Arne Vestbø.
     4
     5        [Qt] QtTestBrowser crashes when enabling QGraphicsView mode after first loading page without it enabled
     6        https://bugs.webkit.org/show_bug.cgi?id=35247
     7
     8        The main issue when changing the views is that the plugins and any other components that
     9        depend on view specific attributes such as the native window id are not teared down.
     10        Even if we had a tear-down procedure, we'd have to re-initialize the plugin after
     11        switching to the new view (QGraphicsWebView). This is a rather uncommon situation, so
     12        we decided to work around this in QtTestBrowser by making toggling between QWebView
     13        and QGraphicsWebView also re-create the page.
     14
     15        * QtTestBrowser/launcherwindow.cpp:
     16        (LauncherWindow::initializeView):
     17        * QtTestBrowser/mainwindow.h:
     18
    1192010-09-14  Mihai Parparita  <mihaip@chromium.org>
    220
  • trunk/WebKitTools/QtTestBrowser/launcherwindow.cpp

    r65792 r67554  
    104104void LauncherWindow::initializeView()
    105105{
     106    QUrl url = m_page->mainFrame()->url();
     107    delete m_page;
    106108    delete m_view;
     109    m_page = new WebPage(this);
    107110
    108111    QSplitter* splitter = static_cast<QSplitter*>(centralWidget());
     
    128131        m_view = view;
    129132    }
     133
     134    if (url.isValid())
     135        m_page->mainFrame()->load(url);
    130136
    131137#if QT_VERSION >= QT_VERSION_CHECK(4, 6, 0)
  • trunk/WebKitTools/QtTestBrowser/mainwindow.h

    r63090 r67554  
    6666    LocationEdit* urlEdit;
    6767
     68protected:
    6869    WebPage* m_page;
    6970};
Note: See TracChangeset for help on using the changeset viewer.