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

kenneth at webkit.org kenneth at webkit.org
Wed Apr 7 23:31:49 UTC 2010


The following commit has been merged in the webkit-1.2 branch:
commit 14d25c9e5ca9409d9b046c302ea4bc7f5de04dee
Author: kenneth at webkit.org <kenneth at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Nov 11 19:57:02 2009 +0000

    WebKit/qt: Unreviewed buildbot fix.
    
    Export a method to the DRT to know if the document has a
    document element.
    
    * Api/qwebframe.cpp:
    (qt_drt_hasDocumentElement):
    
    WebKitTools: Unreviewed Qt buildbot fix.
    
    My previous fix was wrong, so revert that change and fix it by
    returning when the document of the frame has no document element.
    Idea is borrowed from mac and win DRT.
    
    * DumpRenderTree/qt/DumpRenderTree.cpp:
    (WebCore::DumpRenderTree::dumpFramesAsText):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50832 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index b60b266..c85de6b 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -93,6 +93,11 @@ QT_BEGIN_NAMESPACE
 extern Q_GUI_EXPORT int qt_defaultDpi();
 QT_END_NAMESPACE
 
+bool QWEBKIT_EXPORT qt_drt_hasDocumentElement(QWebFrame* qframe)
+{
+    return QWebFramePrivate::core(qframe)->document()->documentElement();
+}
+
 void QWEBKIT_EXPORT qt_drt_setJavaScriptProfilingEnabled(QWebFrame* qframe, bool enabled)
 {
 #if ENABLE(JAVASCRIPT_DEBUGGER)
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index d94e859..1bb70dc 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,13 @@
+2009-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Unreviewed buildbot fix.
+
+        Export a method to the DRT to know if the document has a
+        document element.
+
+        * Api/qwebframe.cpp:
+        (qt_drt_hasDocumentElement):
+
 2009-11-11  Liang QI  <liang.qi at nokia.com>
 
         [Qt] Fix tst_qwebpage and tst_qwebframe compilation on Symbian.
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 3248f14..ec1e2eb 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-11  Kenneth Rohde Christiansen  <kenneth at webkit.org>
+
+        Unreviewed Qt buildbot fix.
+
+        My previous fix was wrong, so revert that change and fix it by
+        returning when the document of the frame has no document element.
+        Idea is borrowed from mac and win DRT.
+
+        * DumpRenderTree/qt/DumpRenderTree.cpp:
+        (WebCore::DumpRenderTree::dumpFramesAsText):
+
 2009-11-11  Eric Seidel  <eric at webkit.org>
 
         Reviewed byg Kenneth Rohde Christiansen.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
index 5923493..94ed867 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTree.cpp
@@ -70,6 +70,7 @@ extern void qt_dump_frame_loader(bool b);
 extern void qt_drt_clearFrameName(QWebFrame* qFrame);
 extern void qt_drt_overwritePluginDirectories();
 extern void qt_drt_resetOriginAccessWhiteLists();
+extern bool qt_drt_hasDocumentElement(QWebFrame* qFrame);
 
 namespace WebCore {
 
@@ -403,7 +404,7 @@ void DumpRenderTree::initJSObjects()
 
 QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
 {
-    if (!frame)
+    if (!frame || !qt_drt_hasDocumentElement(frame))
         return QString();
 
     QString result;
@@ -415,10 +416,8 @@ QString DumpRenderTree::dumpFramesAsText(QWebFrame* frame)
     }
 
     QString innerText = frame->toPlainText();
-    if (!innerText.isEmpty()) {
-        result.append(innerText);
-        result.append(QLatin1String("\n"));
-    }
+    result.append(innerText);
+    result.append(QLatin1String("\n"));
 
     if (m_controller->shouldDumpChildrenAsText()) {
         QList<QWebFrame *> children = frame->childFrames();

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list