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

robert at webkit.org robert at webkit.org
Wed Dec 22 15:19:34 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 3b7d3a69a074cb8ca1f436825e5f1807634ead36
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 1 02:30:49 2010 +0000

    2010-10-31  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Support nodesFromRect in DRT
    
            Unskip fast/dom/nodesFromRect-basic.html
    
            https://bugs.webkit.org/show_bug.cgi?id=48716
    
            * platform/qt/Skipped:
    2010-10-31  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Support nodesFromRect in DRT
    
            Pass a Document object as a QWebElement.
    
            https://bugs.webkit.org/show_bug.cgi?id=48716
    
            * bridge/qt/qt_runtime.cpp:
            (JSC::Bindings::convertValueToQVariant):
    2010-10-31  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Support nodesFromRect in DRT
    
            https://bugs.webkit.org/show_bug.cgi?id=48716
    
            * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
            (DumpRenderTreeSupportQt::nodesFromRect):
            * WebCoreSupport/DumpRenderTreeSupportQt.h:
    2010-10-31  Robert Hogan  <robert at webkit.org>
    
            Reviewed by Antonio Gomes.
    
            [Qt] Support nodesFromRect in DRT
    
            https://bugs.webkit.org/show_bug.cgi?id=48716
    
            * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
            (LayoutTestController::nodesFromRect):
            * DumpRenderTree/qt/LayoutTestControllerQt.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71004 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 9d608c4..26a9e5d 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-31  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Support nodesFromRect in DRT
+
+        Unskip fast/dom/nodesFromRect-basic.html
+
+        https://bugs.webkit.org/show_bug.cgi?id=48716
+
+        * platform/qt/Skipped:
+
 2010-10-31  Yael Aharon  <yael.aharon at nokia.com>
 
         Reviewed by Antonio Gomes.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 83853b1..935c7e7 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -5434,8 +5434,7 @@ fast/parser/pre-html5-parser-quirks.html
 # FileSystem API is not supported.
 fast/filesystem
 
-# LayoutTestController::nodesFromRect is not supported.
-fast/dom/nodesFromRect-basic.html
+# Needs more investigation.
 fast/dom/nodesFromRect-links-and-text.html
 fast/dom/nodesFromRect-inner-documents.html
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index ebbd4a6..cb3feac 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,16 @@
+2010-10-31  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Support nodesFromRect in DRT
+
+        Pass a Document object as a QWebElement. 
+
+        https://bugs.webkit.org/show_bug.cgi?id=48716
+
+        * bridge/qt/qt_runtime.cpp:
+        (JSC::Bindings::convertValueToQVariant):
+
 2010-10-31  Peter Kasting  <pkasting at google.com>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/bridge/qt/qt_runtime.cpp b/WebCore/bridge/qt/qt_runtime.cpp
index 96851fa..6595b84 100644
--- a/WebCore/bridge/qt/qt_runtime.cpp
+++ b/WebCore/bridge/qt/qt_runtime.cpp
@@ -28,6 +28,7 @@
 #include "Interpreter.h"
 #include "JSArray.h"
 #include "JSByteArray.h"
+#include "JSDocument.h"
 #include "JSDOMBinding.h"
 #include "JSDOMWindow.h"
 #include <JSFunction.h>
@@ -747,6 +748,8 @@ QVariant convertValueToQVariant(ExecState* exec, JSValue value, QMetaType::Type
             } else if (hint == (QMetaType::Type) qMetaTypeId<QWebElement>()) {
                 if (object && object->inherits(&JSHTMLElement::s_info))
                     ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSHTMLElement*>(object))->impl()));
+                else if (object && object->inherits(&JSDocument::s_info))
+                    ret = QVariant::fromValue<QWebElement>(QtWebElementRuntime::create((static_cast<JSDocument*>(object))->impl()->documentElement()));
                 else
                     ret = QVariant::fromValue<QWebElement>(QWebElement());
             } else if (hint == (QMetaType::Type) qMetaTypeId<QVariant>()) {
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index ab85cd4..8bffa0b 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-31  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Support nodesFromRect in DRT
+
+        https://bugs.webkit.org/show_bug.cgi?id=48716
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::nodesFromRect):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2010-10-31  Andreas Kling  <kling at webkit.org>
 
         Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 6a1d506..c474d21 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -47,6 +47,7 @@
 #include "HistoryItem.h"
 #include "HTMLInputElement.h"
 #include "InspectorController.h"
+#include "NodeList.h"
 #include "NotificationPresenterClientQt.h"
 #include "Page.h"
 #include "PageGroup.h"
@@ -780,6 +781,26 @@ QString DumpRenderTreeSupportQt::plainText(const QVariant& range)
     return map.value("innerText").toString();
 }
 
+QVariantList DumpRenderTreeSupportQt::nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping)
+{
+    QVariantList res;
+    WebCore::Element* webElement = document.m_element;
+    if (!webElement)
+        return res;
+
+    Document* doc = webElement->document();
+    if (!doc)
+        return res;
+    RefPtr<NodeList> nodes = doc->nodesFromRect(x, y, top, right, bottom, left, ignoreClipping);
+    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)));
+        res << v;
+    }
+    return res;
+}
+
 // Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
 
 void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 356b226..82d9319 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -133,6 +133,8 @@ public:
     static void addUserStyleSheet(QWebPage* page, const QString& sourceCode);
     static void simulateDesktopNotificationClick(const QString& title);
     static QString viewportAsText(QWebPage*, const QSize&);
+
+    static QVariantList nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
 };
 
 #endif
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 7f045ad..904aa97 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-31  Robert Hogan  <robert at webkit.org>
+
+        Reviewed by Antonio Gomes.
+
+        [Qt] Support nodesFromRect in DRT
+
+        https://bugs.webkit.org/show_bug.cgi?id=48716
+
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::nodesFromRect):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
 2010-10-30  Andreas Kling  <kling at webkit.org>
 
         Reviewed by Antonio Gomes.
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index f99ec4f..3e50e06 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -810,5 +810,10 @@ bool LayoutTestController::hasSpellingMarker(int, int)
     return false;
 }
 
+QVariantList LayoutTestController::nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping)
+{
+    return DumpRenderTreeSupportQt::nodesFromRect(document, x, y, top, right, bottom, left, ignoreClipping);
+}
+
 const unsigned LayoutTestController::maxViewWidth = 800;
 const unsigned LayoutTestController::maxViewHeight = 600;
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 11d72e4..dfb12fe 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -222,6 +222,8 @@ public slots:
     void abortModal() {}
     bool hasSpellingMarker(int from, int length);
 
+    QVariantList nodesFromRect(const QWebElement& document, int x, int y, unsigned top, unsigned right, unsigned bottom, unsigned left, bool ignoreClipping);
+
     /*
         Policy values: 'on', 'auto' or 'off'.
         Orientation values: 'vertical' or 'horizontal'.

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list