Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Changeset 39234 in webkit


Ignore:
Timestamp:
Dec 12, 2008, 3:35:30 AM (16 years ago)
Author:
Simon Hausmann
Message:

2008-12-12 Ariya Hidayat <ariya.hidayat@trolltech.com>

Reviewed by Simon Hausmann.

Create the plugin widget even though the web page has no associated
view. This prevents the plugin to be uselessly constructed more than once.

  • WebCoreSupport/FrameLoaderClientQt.cpp: (WebCore::FrameLoaderClientQt::createPlugin):
  • tests/qwebpage/tst_qwebpage.cpp: (tst_QWebPage::createViewlessPlugin):
Location:
trunk/WebKit/qt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/qt/ChangeLog

    r39232 r39234  
     12008-12-12  Ariya Hidayat  <ariya.hidayat@trolltech.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        Create the plugin widget even though the web page has no associated
     6        view. This prevents the plugin to be uselessly constructed more than once.
     7
     8        * WebCoreSupport/FrameLoaderClientQt.cpp:
     9        (WebCore::FrameLoaderClientQt::createPlugin):
     10        * tests/qwebpage/tst_qwebpage.cpp:
     11        (tst_QWebPage::createViewlessPlugin):
     12
    1132008-12-11  Enrico Ros  <enrico.ros@m31.com>
    214
  • trunk/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp

    r39231 r39234  
    10871087        if (object) {
    10881088            QWidget* widget = qobject_cast<QWidget*>(object);
    1089             QWidget* view = m_webFrame->page()->view();
    1090             if (widget && view) {
    1091                 widget->setParent(view);
     1089            if (widget) {
     1090                QWidget* view = m_webFrame->page()->view();
     1091                if (view)
     1092                    widget->setParent(view);
    10921093                QtPluginWidget* w = new QtPluginWidget();
    10931094                w->setPlatformWidget(widget);
  • trunk/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp

    r39231 r39234  
    100100    void createPlugin();
    101101    void destroyPlugin();
     102    void createViewlessPlugin();
    102103
    103104private:
     
    585586}
    586587
     588void tst_QWebPage::createViewlessPlugin()
     589{
     590    PluginTrackedPage* page = new PluginTrackedPage;
     591    QString content("<html><body><object type=\"application/x-qt-plugin\" classid=\"QProgressBar\"></object></body></html>");
     592    page->mainFrame()->setHtml(content);
     593    QCOMPARE(page->count, 1);
     594    QVERIFY(page->widget != 0);
     595    delete page;
     596}
     597
    587598QTEST_MAIN(tst_QWebPage)
    588599#include "tst_qwebpage.moc"
Note: See TracChangeset for help on using the changeset viewer.