[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-10851-g50815da

benjamin.poulain at nokia.com benjamin.poulain at nokia.com
Wed Dec 22 18:49:12 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit be63989c721463d2ae374048c850c838c1a04d86
Author: benjamin.poulain at nokia.com <benjamin.poulain at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Dec 20 14:57:30 2010 +0000

    [Qt] Improve the readability of FrameLoaderClientQt::createPlugin()
    https://bugs.webkit.org/show_bug.cgi?id=51330
    
    Reviewed by Andreas Kling.
    
    Redefine the scopes to improve readability. Objects are now created in
    the scope they are used in.
    
    * WebCoreSupport/FrameLoaderClientQt.cpp:
    (WebCore::FrameLoaderClientQt::createPlugin):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74344 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 0738f6c..7016d6c 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-20  Benjamin Poulain  <benjamin.poulain at nokia.com>
+
+        Reviewed by Andreas Kling.
+
+        [Qt] Improve the readability of FrameLoaderClientQt::createPlugin()
+        https://bugs.webkit.org/show_bug.cgi?id=51330
+
+        Redefine the scopes to improve readability. Objects are now created in
+        the scope they are used in.
+
+        * WebCoreSupport/FrameLoaderClientQt.cpp:
+        (WebCore::FrameLoaderClientQt::createPlugin):
+
 2010-12-17  Ariya Hidayat  <ariya at sencha.com>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 921e92f..849958f 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -1466,10 +1466,8 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
     QString urlStr(url.string());
     QUrl qurl = urlStr;
 
-    QObject* object = 0;
-
     if (mimeType == "application/x-qt-plugin" || mimeType == "application/x-qt-styled-widget") {
-        object = m_webFrame->page()->createPlugin(classid, qurl, params, values);
+        QObject* object = m_webFrame->page()->createPlugin(classid, qurl, params, values);
 #ifndef QT_NO_STYLE_STYLESHEET
         QWidget* widget = qobject_cast<QWidget*>(object);
         if (widget && mimeType == "application/x-qt-styled-widget") {
@@ -1490,7 +1488,6 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
             widget->setStyleSheet(styleSheet);
         }
 #endif // QT_NO_STYLE_STYLESHEET
-    }
 
         if (!object) {
             QWebPluginFactory* factory = m_webFrame->page()->pluginFactory();
@@ -1499,8 +1496,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
         }
 
         if (object) {
-            QWidget* widget = qobject_cast<QWidget*>(object);
-            if (widget) {
+            if (QWidget* widget = qobject_cast<QWidget*>(object)) {
                 QWidget* parentWidget = 0;
                 if (m_webFrame->page()->d->client)
                     parentWidget = qobject_cast<QWidget*>(m_webFrame->page()->d->client->pluginParent());
@@ -1514,8 +1510,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
                 return w;
             }
 
-            QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object);
-            if (graphicsWidget) {
+            if (QGraphicsWidget* graphicsWidget = qobject_cast<QGraphicsWidget*>(object)) {
                 QGraphicsObject* parentWidget = 0;
                 if (m_webFrame->page()->d->client)
                     parentWidget = qobject_cast<QGraphicsObject*>(m_webFrame->page()->d->client->pluginParent());
@@ -1530,6 +1525,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
 
             // FIXME: make things work for widgetless plugins as well
             delete object;
+        }
     }
 #if ENABLE(NETSCAPE_PLUGIN_API)
     else { // NPAPI Plugins

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list