[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373

zecke at webkit.org zecke at webkit.org
Wed Apr 7 23:57:52 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 87659e2ad1531b3a39ce4759e455c431f8d1d817
Author: zecke at webkit.org <zecke at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Nov 26 10:34:50 2009 +0000

    [Qt] Add automatic test case for plugins that use QWidget
    
    https://bugs.webkit.org/show_bug.cgi?id=31203
    
    Change the RenderTreeAsText to look into the WebCore::Widget
    and print the state of the platformWidget. Change the DRT to
    use QtUiTools to be able to initiate QProgressBar and such
    as a plugin. Add the test case, add the result, update the
    other results due the new test.
    
    WebCore:
    * rendering/RenderTreeAsText.cpp:
    (WebCore::operator<<): Add special case for RenderPart
    
    WebKitTools:
    * DumpRenderTree/qt/DumpRenderTree.cpp:
    (WebCore::WebPage::createPlugin):
    * DumpRenderTree/qt/DumpRenderTree.h:
    * DumpRenderTree/qt/DumpRenderTree.pro:
    
    LayoutTest:
    * platform/gtk/Skipped:
    * platform/mac/Skipped:
    * platform/qt/plugins/netscape-dom-access-expected.txt: Added
    * platform/qt/plugins/qt-qwidget-plugin-expected.txt: Added
    * platform/win/Skipped:
    * plugins/qt-qwidget-plugin.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51410 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 3fdaff8..184a656 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,25 @@
+2009-11-21  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Add automatic test for Qt Plugins.
+        https://bugs.webkit.org/show_bug.cgi?id=31203
+
+        Add a test case for Qt plugins. In this case one
+        RenderPart should be visible on screen and the other
+        should be invisible. The internal QWidget should
+        have the same state as the WebCore::Widget.
+
+        Add Qt specific netscape-dom-access-expected.txt because
+        that was using a native widget inside a RenderPart as well.
+
+        * platform/gtk/Skipped:
+        * platform/mac/Skipped:
+        * platform/qt/plugins/netscape-dom-access-expected.txt: Added
+        * platform/qt/plugins/qt-qwidget-plugin-expected.txt: Added
+        * platform/win/Skipped:
+        * plugins/qt-qwidget-plugin.html: Added.
+
 2009-11-25  Csaba Osztrogonác  <ossy at webkit.org>
 
         [Qt] Audio related layout tests are failing on the buildbot
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 358c2d3..1663ba1 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -3624,6 +3624,8 @@ plugins/jsobjc-simple.html
 plugins/root-object-premature-delete-crash.html
 plugins/throw-on-dealloc.html
 plugins/undefined-property-crash.html
+#   These test require Qt Widgets
+plugins/qt-qwidget-plugin.html
 #   Tests failing
 plugins/embed-attributes-setting.html
 plugins/get-url-with-blank-target.html
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 82ac670..a362e94 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -106,3 +106,5 @@ fast/history/back-forward-reset-after-error-handling.html
 plugins/reloadplugins-and-pages.html
 plugins/reloadplugins-no-pages.html
 
+# These test require Qt Widgets
+plugins/qt-qwidget-plugin.html
diff --git a/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt b/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt
index 1fb09fe..38b5b42 100644
--- a/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt
+++ b/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt
@@ -9,7 +9,7 @@ layer at (0,0) size 800x600
           text run at (573,0) width 185: "The plug-in should have a"
           text run at (0,20) width 107: "3px red border."
       RenderBlock (anonymous) at (0,56) size 784x206
-        RenderPartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)]
+        RenderPartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)] [QT: geometry: {at (8,64) size 200x200} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 200x200} ] 
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
         RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/qt/plugins/qt-qwidget-plugin-expected.txt b/LayoutTests/platform/qt/plugins/qt-qwidget-plugin-expected.txt
new file mode 100644
index 0000000..fcca77d
--- /dev/null
+++ b/LayoutTests/platform/qt/plugins/qt-qwidget-plugin-expected.txt
@@ -0,0 +1,23 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock (anonymous) at (0,0) size 784x104
+        RenderText {#text} at (0,0) size 48x20
+          text run at (0,0) width 48: "Image:"
+        RenderBR {BR} at (48,16) size 0x0
+        RenderImage {IMG} at (0,20) size 80x80
+        RenderText {#text} at (80,84) size 4x20
+          text run at (80,84) width 4: " "
+        RenderBR {BR} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,104) size 784x34
+        RenderText {#text} at (0,14) size 123x20
+          text run at (0,14) width 123: "QT progress bar: "
+        RenderPartObject {OBJECT} at (123,0) size 300x30 [QT: geometry: {at (131,112) size 300x30} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 300x30} ] 
+        RenderText {#text} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,138) size 784x34
+        RenderText {#text} at (0,14) size 174x20
+          text run at (0,14) width 174: "You should not see this: "
+        RenderPartObject {OBJECT} at (174,0) size 300x30 [QT: geometry: {at (182,146) size 300x30} isHidden: 1 isSelfVisible: 0 isParentVisible: 1 mask: {at (0,0) size 300x30} ] 
+        RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/win/Skipped b/LayoutTests/platform/win/Skipped
index 41a3a28..a4d5ba2 100644
--- a/LayoutTests/platform/win/Skipped
+++ b/LayoutTests/platform/win/Skipped
@@ -712,3 +712,7 @@ fast/forms/validationMessage.html
 # Need to implement this in plugins code in WebKit
 plugins/reloadplugins-and-pages.html
 plugins/reloadplugins-no-pages.html
+
+# These tests require Qt Widgets
+plugins/qt-qwidget-plugin.html
+
diff --git a/LayoutTests/plugins/qt-qwidget-plugin.html b/LayoutTests/plugins/qt-qwidget-plugin.html
new file mode 100644
index 0000000..5d1f008
--- /dev/null
+++ b/LayoutTests/plugins/qt-qwidget-plugin.html
@@ -0,0 +1,20 @@
+<html>
+<body>
+Image:<br/>
+ <img src="qrc:/webkit/inspector/Images/largerResourcesButtonGlyph.png" width="80" height="80"/>
+ <br/>
+
+<!-- visible progressbar -->
+<div>
+QT progress bar:
+<object type="application/x-qt-plugin" classid="QProgressBar" name="progressbar1" height=30></object>
+</div>
+
+<!-- should not be visible -->
+<div style="visibility: hidden;">
+You should not see this:
+<object type="application/x-qt-plugin" classid="QProgressBar" name="progressbar2" height=30></object>
+</div>
+
+</body>
+</html>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 60e0fdb..e29769e 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2009-11-21  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Add Qt specific information of RenderPart
+        https://bugs.webkit.org/show_bug.cgi?id=31203
+
+        The WebCore::Widget of the RenderPart (RenderWidget) might be
+        backed with a platform widget. Print both the WebCore::Widget
+        and platform widget state. In the above bug we had a problem
+        that the WebCore::Widget was invisible but the QWidget was
+        visible.
+
+        * rendering/RenderTreeAsText.cpp:
+        (WebCore::operator<<): Add special case for RenderPart
+
 2009-11-17  Holger Hans Peter Freyther  <zecke at selfish.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebCore/rendering/RenderTreeAsText.cpp b/WebCore/rendering/RenderTreeAsText.cpp
index d4684e7..a6f5144 100644
--- a/WebCore/rendering/RenderTreeAsText.cpp
+++ b/WebCore/rendering/RenderTreeAsText.cpp
@@ -39,6 +39,7 @@
 #include "RenderFileUploadControl.h"
 #include "RenderInline.h"
 #include "RenderListMarker.h"
+#include "RenderPart.h"
 #include "RenderTableCell.h"
 #include "RenderView.h"
 #include "RenderWidget.h"
@@ -56,6 +57,10 @@
 #include "SVGRenderTreeAsText.h"
 #endif
 
+#if PLATFORM(QT)
+#include <QWidget>
+#endif
+
 namespace WebCore {
 
 using namespace HTMLNames;
@@ -340,6 +345,24 @@ static TextStream &operator<<(TextStream& ts, const RenderObject& o)
         }
     }
 
+#if PLATFORM(QT)
+    // Print attributes of embedded QWidgets. E.g. when the WebCore::Widget
+    // is invisible the QWidget should be invisible too.
+    if (o.isRenderPart()) {
+        const RenderPart* part = toRenderPart(const_cast<RenderObject*>(&o));
+        if (part->widget() && part->widget()->platformWidget()) {
+            QWidget* wid = part->widget()->platformWidget();
+
+            ts << " [QT: ";
+            ts << "geometry: {" << wid->geometry() << "} ";
+            ts << "isHidden: " << wid->isHidden() << " ";
+            ts << "isSelfVisible: " << part->widget()->isSelfVisible() << " ";
+            ts << "isParentVisible: " << part->widget()->isParentVisible() << " ";
+            ts << "mask: {" << wid->mask().boundingRect() << "} ] ";
+        }
+    }
+#endif
+
     return ts;
 }
 
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index fbe25cd..e4ece64 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2009-11-21  Holger Hans Peter Freyther  <zecke at selfish.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Link DumpRenderTree to the Qt Ui Tools
+        https://bugs.webkit.org/show_bug.cgi?id=31203
+
+        Implement QWebPage::createPlugin using the Qt Ui Tools
+        to be able to create classes like QProgressBar from within
+        the <object></object> tags This is required for the
+        new automatic test of Qt Plugins.
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::WebPage::createPlugin):
+        * DumpRenderTree/qt/DumpRenderTree.h:
+        * DumpRenderTree/qt/DumpRenderTree.pro:
+
 2009-11-25  Yuzo Fujishima  <yuzo at google.com>
 
         Reviewed by Eric Seidel.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
index ebb3146..9ad7583 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -60,6 +60,10 @@
 #include <qwebsettings.h>
 #include <qwebsecurityorigin.h>
 
+#ifndef QT_NO_UITOOLS
+#include <QtUiTools/QUiLoader>
+#endif
+
 #ifdef Q_WS_X11
 #include <fontconfig/fontconfig.h>
 #endif
@@ -270,6 +274,20 @@ bool WebPage::extension(Extension extension, const ExtensionOption *option, Exte
     return true;
 }
 
+QObject* WebPage::createPlugin(const QString& classId, const QUrl& url, const QStringList& paramNames, const QStringList& paramValues)
+{
+    Q_UNUSED(url);
+    Q_UNUSED(paramNames);
+    Q_UNUSED(paramValues);
+#ifndef QT_NO_UITOOLS
+    QUiLoader loader;
+    return loader.createWidget(classId, view());
+#else
+    Q_UNUSED(classId);
+    return 0;
+#endif
+}
+
 DumpRenderTree::DumpRenderTree()
     : m_dumpPixels(false)
     , m_stdin(0)
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
index f19a67a..2da789b 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.h
@@ -154,6 +154,8 @@ public:
     virtual bool supportsExtension(QWebPage::Extension extension) const;
     virtual bool extension(Extension extension, const ExtensionOption *option, ExtensionReturn *output);
 
+    QObject* createPlugin(const QString&, const QUrl&, const QStringList&, const QStringList&);
+
 public slots:
     bool shouldInterruptJavaScript() { return false; }
 
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
index 56a43ea..81e929b 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.pro
@@ -1,5 +1,6 @@
 TARGET = DumpRenderTree
 CONFIG  -= app_bundle
+CONFIG += uitools
 
 mac:!static:contains(QT_CONFIG, qt_framework):!CONFIG(webkit_no_framework) {
     CONFIG -= debug

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list