[SCM] WebKit Debian packaging branch, debian/experimental, updated. debian/1.3.8-1-1049-g2e11a8e

robert at webkit.org robert at webkit.org
Fri Jan 21 15:04:19 UTC 2011


The following commit has been merged in the debian/experimental branch:
commit d1487c734e78b3c30faec9699c5909b8a1a33ad8
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jan 6 20:54:44 2011 +0000

    2011-01-06  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
    
            This allows LayoutTestController to pass WebCore::Node back to
            layout tests.
    
            Also amend nodesFromRect-links-and-text.html and
            nodesFromRect-inner-documents.html so that they do not produce
            platform-specific results.
    
            Unskip:
            fast/dom/nodesFromRect-links-and-text.html
            fast/dom/nodesFromRect-inner-documents.html
    
            https://bugs.webkit.org/show_bug.cgi?id=48957
    
            * fast/dom/nodesFromRect-inner-documents-expected.txt:
            * fast/dom/nodesFromRect-inner-documents.html:
            * fast/dom/nodesFromRect-links-and-text-expected.txt:
            * fast/dom/nodesFromRect-links-and-text.html:
            * fast/dom/resources/nodesFromRect.js:
            (check):
            (getTopFor):
            (getBottomFor):
            * platform/qt/Skipped:
    2011-01-06  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
    
            This allows LayoutTestController to pass WebCore::Node back to
            layout tests.
    
            Also amend nodesFromRect-links-and-text.html and
            nodesFromRect-inner-documents.html so that they do not produce
            platform-specific results.
    
            Unskip:
            fast/dom/nodesFromRect-links-and-text.html
            fast/dom/nodesFromRect-inner-documents.html
    
            https://bugs.webkit.org/show_bug.cgi?id=48957
    
            * bridge/qt/qt_runtime.cpp:
            (JSC::Bindings::QtDRTNodeRuntime::create):
            (JSC::Bindings::QtDRTNodeRuntime::get):
            (JSC::Bindings::convertValueToQVariant):
            (JSC::Bindings::convertQVariantToValue):
    2011-01-06  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
    
            This allows LayoutTestController to pass WebCore::Node back to
            layout tests.
    
            Also amend nodesFromRect-links-and-text.html and
            nodesFromRect-inner-documents.html so that they do not produce
            platform-specific results.
    
            Unskip:
            fast/dom/nodesFromRect-links-and-text.html
            fast/dom/nodesFromRect-inner-documents.html
    
            https://bugs.webkit.org/show_bug.cgi?id=48957
    
            * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
            (QDRTNode::QDRTNode):
            (QDRTNode::~QDRTNode):
            (DumpRenderTreeSupportQt::nodesFromRect):
            * WebCoreSupport/DumpRenderTreeSupportQt.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75189 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 14f299d..42f7af0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,32 @@
+2011-01-06  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
+
+        This allows LayoutTestController to pass WebCore::Node back to
+        layout tests.
+
+        Also amend nodesFromRect-links-and-text.html and
+        nodesFromRect-inner-documents.html so that they do not produce
+        platform-specific results.
+
+        Unskip:
+        fast/dom/nodesFromRect-links-and-text.html
+        fast/dom/nodesFromRect-inner-documents.html
+
+        https://bugs.webkit.org/show_bug.cgi?id=48957
+
+        * fast/dom/nodesFromRect-inner-documents-expected.txt:
+        * fast/dom/nodesFromRect-inner-documents.html:
+        * fast/dom/nodesFromRect-links-and-text-expected.txt:
+        * fast/dom/nodesFromRect-links-and-text.html:
+        * fast/dom/resources/nodesFromRect.js:
+        (check):
+        (getTopFor):
+        (getBottomFor):
+        * platform/qt/Skipped:
+
 2011-01-06  Stephen White  <senorblanco at chromium.org>
 
         Unreviewed; test expectations update.
diff --git a/LayoutTests/fast/dom/nodesFromRect-basic-expected.txt b/LayoutTests/fast/dom/nodesFromRect-basic-expected.txt
index 6f87bca..9319b14 100644
--- a/LayoutTests/fast/dom/nodesFromRect-basic-expected.txt
+++ b/LayoutTests/fast/dom/nodesFromRect-basic-expected.txt
@@ -1,48 +1,48 @@
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS All correct nodes found for rect [53,71], [0,0,0,0]
-PASS All correct nodes found for rect [53,71], [10,0,0,0]
-PASS All correct nodes found for rect [53,71], [0,10,0,0]
-PASS All correct nodes found for rect [53,71], [0,0,10,0]
-PASS All correct nodes found for rect [53,71], [0,0,0,10]
-PASS All correct nodes found for rect [53,71], [0,10,0,10]
-PASS All correct nodes found for rect [53,71], [10,0,10,0]
-PASS All correct nodes found for rect [53,71], [10,10,10,10]
-PASS All correct nodes found for rect [152,105], [10,0,0,0]
-PASS All correct nodes found for rect [152,105], [0,10,0,0]
-PASS All correct nodes found for rect [152,105], [0,0,10,0]
-PASS All correct nodes found for rect [152,105], [0,0,0,10]
-PASS All correct nodes found for rect [152,105], [10,0,10,0]
-PASS All correct nodes found for rect [152,105], [0,10,0,10]
-PASS All correct nodes found for rect [152,105], [10,10,10,10]
-PASS All correct nodes found for rect [153,193], [0,0,0,0]
-PASS All correct nodes found for rect [153,193], [0,20,0,20]
-PASS All correct nodes found for rect [153,193], [20,0,20,0]
-PASS All correct nodes found for rect [77,240], [0,0,0,0]
-PASS All correct nodes found for rect [77,240], [1,0,0,0]
-PASS All correct nodes found for rect [77,240], [0,0,1,0]
-PASS All correct nodes found for rect [77,240], [1,0,1,0]
-PASS All correct nodes found for rect [144,183], [0,0,0,0]
-PASS All correct nodes found for rect [144,183], [1,0,1,0]
-PASS All correct nodes found for rect [144,183], [0,1,0,1]
-PASS All correct nodes found for rect [144,183], [0,0,1,0]
-PASS All correct nodes found for rect [144,183], [0,0,0,1]
-PASS All correct nodes found for rect [144,183], [0,0,1,1]
-PASS All correct nodes found for rect [144,183], [1,1,1,1]
-PASS All correct nodes found for rect [77,240], [0,0,0,0]
-PASS All correct nodes found for rect [77,240], [0,1,0,1]
-PASS All correct nodes found for rect [77,240], [1,0,0,0]
-PASS All correct nodes found for rect [77,240], [0,0,1,0]
-PASS All correct nodes found for rect [77,240], [1,0,1,0]
-PASS All correct nodes found for rect [77,240], [1,1,1,1]
-PASS All correct nodes found for rect [39,212], [0,0,0,0]
-PASS All correct nodes found for rect [39,212], [10,0,0,0]
-PASS All correct nodes found for rect [39,212], [0,0,10,0]
-PASS All correct nodes found for rect [39,212], [10,1,30,0]
-PASS All correct nodes found for rect [39,212], [10,5,30,0]
-PASS All correct nodes found for rect [39,212], [10,15,30,0]
-PASS All correct nodes found for rect [39,212], [10,0,10,0]
-PASS All correct nodes found for rect [39,212], [0,10,0,10]
-PASS All correct nodes found for rect [39,212], [10,10,10,10]
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
 
diff --git a/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt b/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt
index e861ec3..912af15 100644
--- a/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt
+++ b/LayoutTests/fast/dom/nodesFromRect-inner-documents-expected.txt
@@ -1,10 +1,10 @@
 A   PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS All correct nodes found for rect [176,120], [0,0,0,0]
-PASS All correct nodes found for rect [176,120], [10,10,10,10]
-PASS All correct nodes found for rect [14,167], [0,10,0,0]
-PASS All correct nodes found for rect [150,17], [0,0,0,0]
-PASS All correct nodes found for rect [150,17], [0,0,10,0]
-PASS All correct nodes found for rect [150,17], [0,0,25,0]
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
 
diff --git a/LayoutTests/fast/dom/nodesFromRect-inner-documents.html b/LayoutTests/fast/dom/nodesFromRect-inner-documents.html
index c13c9bb..962887b 100644
--- a/LayoutTests/fast/dom/nodesFromRect-inner-documents.html
+++ b/LayoutTests/fast/dom/nodesFromRect-inner-documents.html
@@ -38,9 +38,11 @@
       var p = innerDocument.getElementsByTagName('p')[0];
       var body = innerDocument.getElementsByTagName('body')[0];
       var divCenter = getCenterFor(div);
+      var divBottom = getBottomFor(div);
+      var pCenter = getCenterFor(p);
       check(divCenter.x, divCenter.y, 0, 0, 0, 0, [div], innerDocument);
-      check(divCenter.x, divCenter.y, 0, 0, 10, 0, [div, body], innerDocument);
-      check(divCenter.x, divCenter.y, 0, 0, 25, 0, [p, div, body], innerDocument);
+      check(divCenter.x, divCenter.y, 0, 0, divBottom.y - divCenter.y, 0, [div, body], innerDocument);
+      check(divCenter.x, divCenter.y, 0, 0, pCenter.y - divCenter.y, 0, [p, div, body], innerDocument);
 
       if (window.layoutTestController)
         layoutTestController.notifyDone();
diff --git a/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.txt b/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.txt
index c9bd96e..a62e1c7 100644
--- a/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.txt
+++ b/LayoutTests/fast/dom/nodesFromRect-links-and-text-expected.txt
@@ -4,10 +4,10 @@ C
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS All correct nodes found for rect [37,32], [0,0,0,0]
-PASS All correct nodes found for rect [37,32], [10,0,0,0]
-PASS All correct nodes found for rect [37,32], [0,0,18,0]
-PASS All correct nodes found for rect [37,32], [0,11.5,0,0]
-PASS All correct nodes found for rect [37,32], [0,23,0,0]
-PASS All correct nodes found for rect [37,32], [0,23,18,0]
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
+PASS All correct nodes found for rect
 
diff --git a/LayoutTests/fast/dom/nodesFromRect-links-and-text.html b/LayoutTests/fast/dom/nodesFromRect-links-and-text.html
index 0b7b989..4571176 100644
--- a/LayoutTests/fast/dom/nodesFromRect-links-and-text.html
+++ b/LayoutTests/fast/dom/nodesFromRect-links-and-text.html
@@ -26,10 +26,12 @@
       var centerA1 = getCenterFor(e.a1);
       var centerA2 = getCenterFor(e.a2);
       var centerA3 = getCenterFor(e.a3);
+      var topP1 = getTopFor(e.p1);
+      var topA1 = getTopFor(e.a1);
       var centerText = { x : (centerA2.x + centerA1.x) / 2, y : centerA1.y }; //text node between a1 and a2
 
       check(centerA1.x, centerA1.y, 0, 0, 0, 0, [e.a1.firstChild]);
-      check(centerA1.x, centerA1.y, 10, 0, 0, 0, [e.a1.firstChild, e.a1, e.p1]);
+      check(centerA1.x, centerA1.y, topA1.y - topP1.y, 0, 0, 0, [e.a1.firstChild, e.a1, e.p1]);
 
       check(centerA1.x, centerA1.y, 0, 0, centerA3.y - centerA1.y, 0, [e.a3.firstChild, e.a3, e.p1, e.a1.firstChild, e.a1]);
       check(centerA1.x, centerA1.y, 0, centerText.x - centerA1.x, 0, 0, [e.p1.childNodes[2], e.a1.firstChild, e.a1, e.p1]);
diff --git a/LayoutTests/fast/dom/resources/nodesFromRect.js b/LayoutTests/fast/dom/resources/nodesFromRect.js
index 29a02cf..5e8d825 100644
--- a/LayoutTests/fast/dom/resources/nodesFromRect.js
+++ b/LayoutTests/fast/dom/resources/nodesFromRect.js
@@ -34,10 +34,7 @@ function check(x, y, topPadding, rightPadding, bottomPadding, leftPadding, list,
     }
   }
 
-  testPassed("All correct nodes found for rect "  +
-             "[" + x + "," + y + "], " +
-             "[" + topPadding + "," + rightPadding +
-             "," + bottomPadding + "," + leftPadding + "]");
+  testPassed("All correct nodes found for rect");
 }
 
 function getCenterFor(element)
@@ -46,4 +43,16 @@ function getCenterFor(element)
   return { x : parseInt((rect.left + rect.right) / 2) , y : parseInt((rect.top + rect.bottom) / 2)};
 }
 
+function getTopFor(element)
+{
+  var rect = element.getBoundingClientRect();
+  return { x : parseInt((rect.left + rect.right) / 2) , y : parseInt(rect.top)};
+}
+
+function getBottomFor(element)
+{
+  var rect = element.getBoundingClientRect();
+  return { x : parseInt((rect.left + rect.right) / 2) , y : parseInt(rect.bottom)};
+}
+
 var successfullyParsed = true;
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 0c876c5..77b1797 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5287,10 +5287,6 @@ fast/parser/pre-html5-parser-quirks.html
 # FileSystem API is not supported.
 fast/filesystem
 
-# Needs more investigation.
-fast/dom/nodesFromRect-links-and-text.html
-fast/dom/nodesFromRect-inner-documents.html
-
 # It fails, because 3D canvas is disabled by default.
 http/tests/canvas/webgl/origin-clean-conformance.html
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index faae1d8..bb59043 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,28 @@
+2011-01-06  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
+
+        This allows LayoutTestController to pass WebCore::Node back to
+        layout tests.
+
+        Also amend nodesFromRect-links-and-text.html and
+        nodesFromRect-inner-documents.html so that they do not produce
+        platform-specific results.
+
+        Unskip:
+        fast/dom/nodesFromRect-links-and-text.html
+        fast/dom/nodesFromRect-inner-documents.html
+
+        https://bugs.webkit.org/show_bug.cgi?id=48957
+
+        * bridge/qt/qt_runtime.cpp:
+        (JSC::Bindings::QtDRTNodeRuntime::create):
+        (JSC::Bindings::QtDRTNodeRuntime::get):
+        (JSC::Bindings::convertValueToQVariant):
+        (JSC::Bindings::convertQVariantToValue):
+
 2011-01-06  Joone Hur  <joone.hur at collabora.co.uk>
 
         Reviewed by Eric Seidel.
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 6595b84..0fb811b 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -24,6 +24,7 @@
 #include "DateInstance.h"
 #include "DateMath.h"
 #include "DatePrototype.h"
+#include "DumpRenderTreeSupportQt.h"
 #include "FunctionPrototype.h"
 #include "Interpreter.h"
 #include "JSArray.h"
@@ -133,6 +134,22 @@ public:
     }
 };
 
+// this is here as a proxy, so we'd have a class to friend in QDRTNode,
+// as getting/setting a WebCore in QDRTNode is private.
+// We only need to pass WebCore Nodes for layout tests.
+class QtDRTNodeRuntime {
+public:
+    static QDRTNode create(Node* node)
+    {
+        return QDRTNode(node);
+    }
+
+    static Node* get(const QDRTNode& node)
+    {
+        return node.m_node;
+    }
+};
+
 static JSRealType valueRealType(ExecState* exec, JSValue val)
 {
     if (val.isNumber())
@@ -752,6 +769,9 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
                     ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSDocument*>(object))->impl()->documentElement()));
                 else
                     ret = QVariant::fromValue<QWebElement>(QWebElement());
+            } else if (hint == (QMetaType::Type) qMetaTypeId<QDRTNode>()) {
+                if (object && object->inherits(&JSNode::s_info))
+                    ret = QVariant::fromValue<QDRTNode>(QtDRTNodeRuntime::create((static_cast<JSNode*>(object))->impl()));
             } else if (hint == (QMetaType::Type) qMetaTypeId<QVariant>()) {
                 if (value.isUndefinedOrNull()) {
                     if (distance)
@@ -898,6 +918,17 @@ JSValue convertQVariantToValue(ExecState* exec, PassRefPtr<RootObject> root, con
         return toJS(exec, toJSDOMGlobalObject(document, exec), QtWebElementRuntime::get(variant.value<QWebElement>()));
     }
 
+    if (type == qMetaTypeId<QDRTNode>()) {
+        if (!root->globalObject()->inherits(&JSDOMWindow::s_info))
+            return jsUndefined();
+
+        Document* document = (static_cast<JSDOMWindow*>(root->globalObject()))->impl()->document();
+        if (!document)
+            return jsUndefined();
+
+        return toJS(exec, toJSDOMGlobalObject(document, exec), QtDRTNodeRuntime::get(variant.value<QDRTNode>()));
+    }
+
     if (type == QMetaType::QVariantMap) {
         // create a new object, and stuff properties into it
         JSObject* ret = constructEmptyObject(exec);
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 25bd2c0..1c133ab 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,28 @@
+2011-01-06  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Introduce QDRTNode for passing WebCore::Node across JS bridge
+
+        This allows LayoutTestController to pass WebCore::Node back to
+        layout tests.
+
+        Also amend nodesFromRect-links-and-text.html and
+        nodesFromRect-inner-documents.html so that they do not produce
+        platform-specific results.
+
+        Unskip:
+        fast/dom/nodesFromRect-links-and-text.html
+        fast/dom/nodesFromRect-inner-documents.html
+
+        https://bugs.webkit.org/show_bug.cgi?id=48957
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (QDRTNode::QDRTNode):
+        (QDRTNode::~QDRTNode):
+        (DumpRenderTreeSupportQt::nodesFromRect):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2011-01-04  Girish Ramakrishnan  <girish at forwardbias.in>
 
         Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 754b20a..e958751 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -82,6 +82,27 @@ using namespace WebCore;
 
 QMap<int, QWebScriptWorld*> m_worldMap;
 
+QDRTNode::QDRTNode()
+    : m_node(0)
+{
+}
+
+QDRTNode::QDRTNode(WebCore::Node* node)
+    : m_node(0)
+{
+    if (node) {
+        m_node = node;
+        m_node->ref();
+    }
+}
+
+QDRTNode::~QDRTNode()
+{
+    if (m_node)
+        m_node->deref();
+}
+
+
 DumpRenderTreeSupportQt::DumpRenderTreeSupportQt()
 {
 }
@@ -854,7 +875,10 @@ QVariantList DumpRenderTreeSupportQt::nodesFromRect(const QWebElement& document,
     for (int i = 0; i < nodes->length(); i++) {
         QVariant v;
         // QWebElement will be null if the Node is not an HTML Element
-        v.setValue(QWebElement(nodes->item(i)));
+        if (nodes->item(i)->isHTMLElement())
+            v.setValue(QWebElement(nodes->item(i)));
+        else
+            v.setValue(QDRTNode(nodes->item(i)));
         res << v;
     }
     return res;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index e08d962..6917039 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -26,6 +26,26 @@
 #include "qwebkitglobal.h"
 #include <QVariant>
 
+namespace WebCore {
+class Text;
+class Node;
+}
+
+
+#if defined(WTF_USE_V8) && WTF_USE_V8
+namespace V8 {
+namespace Bindings {
+class QtDRTNodeRuntime;
+}
+}
+#else
+namespace JSC {
+namespace Bindings {
+class QtDRTNodeRuntime;
+}
+}
+#endif
+
 class QWebElement;
 class QWebFrame;
 class QWebPage;
@@ -34,6 +54,28 @@ class QWebScriptWorld;
 
 extern QMap<int, QWebScriptWorld*> m_worldMap;
 
+// Used to pass WebCore::Node's to layout tests using LayoutTestController
+class QWEBKIT_EXPORT QDRTNode {
+public:
+    QDRTNode();
+    ~QDRTNode();
+
+private:
+    explicit QDRTNode(WebCore::Node*);
+
+    friend class DumpRenderTreeSupportQt;
+
+#if defined(WTF_USE_V8) && WTF_USE_V8
+    friend class V8::Bindings::QtDRTNodeRuntime;
+#else
+    friend class JSC::Bindings::QtDRTNodeRuntime;
+#endif
+
+    WebCore::Node* m_node;
+};
+
+Q_DECLARE_METATYPE(QDRTNode)
+
 class QWEBKIT_EXPORT DumpRenderTreeSupportQt {
 
 public:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list