[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 13:27:58 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 672b9a504cfa111145d85caa083f537a2442e61a
Author: robert at webkit.org <robert at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 16 13:15:02 2010 +0000
2010-09-16 Robert Hogan <robert at webkit.org>
Reviewed by Antonio Gomes.
[Qt] Support globalhistory tests
https://bugs.webkit.org/show_bug.cgi?id=45774
* platform/qt/Skipped:
2010-09-16 Robert Hogan <robert at webkit.org>
Reviewed by Antonio Gomes.
[Qt] Support globalhistory tests
https://bugs.webkit.org/show_bug.cgi?id=45774
* WebCoreSupport/ChromeClientQt.cpp:
(WebCore::ChromeClientQt::populateVisitedLinks):
* WebCoreSupport/ChromeClientQt.h:
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::dumpHistoryCallbacks):
(DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(WebCore::FrameLoaderClientQt::setTitle):
(WebCore::FrameLoaderClientQt::updateGlobalHistory):
(WebCore::FrameLoaderClientQt::updateGlobalHistoryRedirectLinks):
* WebCoreSupport/FrameLoaderClientQt.h:
2010-09-16 Robert Hogan <robert at webkit.org>
Reviewed by Antonio Gomes.
[Qt] Support globalhistory tests
https://bugs.webkit.org/show_bug.cgi?id=45774
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::isGlobalHistoryTest):
(WebCore::DumpRenderTree::open):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::reset):
(LayoutTestController::dumpHistoryCallbacks):
(LayoutTestController::removeAllVisitedLinks):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 4c89e98..a482636 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-16 Robert Hogan <robert at webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Support globalhistory tests
+ https://bugs.webkit.org/show_bug.cgi?id=45774
+
+ * platform/qt/Skipped:
+
2010-09-16 Yong Li <yoli at rim.com>
Reviewed by George Staikos.
diff --git a/LayoutTests/platform/qt/Skipped b/LayoutTests/platform/qt/Skipped
index 102ff7d..84bdfbf 100644
--- a/LayoutTests/platform/qt/Skipped
+++ b/LayoutTests/platform/qt/Skipped
@@ -151,9 +151,6 @@ http/tests/cookies/third-party-cookie-relaxing.html
http/tests/loading/basic-credentials-sent-automatically.html
http/tests/loading/basic-auth-resend-wrong-credentials.html
-# This port doesn't have a global history delegate yet
-http/tests/globalhistory
-
# Skip failing http/tests/misc tests
# - pixel differences only?
http/tests/misc/acid3.html
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 60ffaaf..bd4b2c2 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,23 @@
+2010-09-16 Robert Hogan <robert at webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Support globalhistory tests
+ https://bugs.webkit.org/show_bug.cgi?id=45774
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::populateVisitedLinks):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::dumpHistoryCallbacks):
+ (DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::setTitle):
+ (WebCore::FrameLoaderClientQt::updateGlobalHistory):
+ (WebCore::FrameLoaderClientQt::updateGlobalHistoryRedirectLinks):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
2010-09-16 Diego Gonzalez <diegohcg at webkit.org>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 1531822..a5dfdc7 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -75,6 +75,8 @@
namespace WebCore {
+bool ChromeClientQt::dumpVisitedLinksCallbacks = false;
+
ChromeClientQt::ChromeClientQt(QWebPage* webPage)
: m_webPage(webPage)
, m_eventLoop(0)
@@ -662,4 +664,14 @@ PassRefPtr<SearchPopupMenu> ChromeClientQt::createSearchPopupMenu(PopupMenuClien
return adoptRef(new SearchPopupMenuQt(createPopupMenu(client)));
}
+void ChromeClientQt::populateVisitedLinks()
+{
+ // We don't need to do anything here because history is tied to QWebPage rather than stored
+ // in a separate database
+ if (dumpVisitedLinksCallbacks) {
+ printf("Asked to populate visited links for WebView \"%s\"\n",
+ qPrintable(m_webPage->mainFrame()->url().toString()));
+ }
+}
+
} // namespace WebCore
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index d18f993..56801aa 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -173,6 +173,7 @@ namespace WebCore {
virtual bool selectItemWritingDirectionIsNatural();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
virtual PassRefPtr<SearchPopupMenu> createSearchPopupMenu(PopupMenuClient*) const;
+ virtual void populateVisitedLinks();
QWebSelectMethod* createSelectPopup() const;
@@ -188,6 +189,8 @@ namespace WebCore {
bool menuBarVisible;
QEventLoop* m_eventLoop;
+ static bool dumpVisitedLinksCallbacks;
+
mutable QtPlatformPlugin m_platformPlugin;
};
}
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 135cc94..c4ad199 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -24,6 +24,7 @@
#include "DumpRenderTreeSupportQt.h"
#include "CSSComputedStyleDeclaration.h"
+#include "ChromeClientQt.h"
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
#include "ContextMenuController.h"
@@ -603,6 +604,16 @@ void DumpRenderTreeSupportQt::setCustomPolicyDelegate(bool enabled, bool permiss
FrameLoaderClientQt::policyDelegatePermissive = permissive;
}
+void DumpRenderTreeSupportQt::dumpHistoryCallbacks(bool b)
+{
+ FrameLoaderClientQt::dumpHistoryCallbacks = b;
+}
+
+void DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(bool b)
+{
+ ChromeClientQt::dumpVisitedLinksCallbacks = b;
+}
+
void DumpRenderTreeSupportQt::dumpEditingCallbacks(bool b)
{
EditorClientQt::dumpEditingCallbacks = b;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index c4efc56..5a59475 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -106,6 +106,8 @@ public:
static void setWillSendRequestReturnsNullOnRedirect(bool b);
static void setWillSendRequestReturnsNull(bool b);
static void setWillSendRequestClearHeaders(const QStringList& headers);
+ static void dumpHistoryCallbacks(bool b);
+ static void dumpVisitedLinksCallbacks(bool b);
static void setDeferMainResourceDataLoad(bool b);
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 161732a..4aadeb0 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -165,6 +165,7 @@ bool FrameLoaderClientQt::sendRequestReturnsNullOnRedirect = false;
bool FrameLoaderClientQt::sendRequestReturnsNull = false;
bool FrameLoaderClientQt::dumpResourceResponseMIMETypes = false;
bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
+bool FrameLoaderClientQt::dumpHistoryCallbacks = false;
QStringList FrameLoaderClientQt::sendRequestClearHeaders;
QString FrameLoaderClientQt::dumpResourceLoadCallbacksPath;
@@ -673,9 +674,17 @@ void FrameLoaderClientQt::prepareForDataSourceReplacement()
{
}
-void FrameLoaderClientQt::setTitle(const String&, const KURL&)
+void FrameLoaderClientQt::setTitle(const String& title, const KURL& url)
{
- // no need for, dispatchDidReceiveTitle is the right callback
+ // Used by Apple WebKit to update the title of an existing history item.
+ // QtWebKit doesn't accomodate this on history items. If it ever does,
+ // it should be privateBrowsing-aware.For now, we are just passing
+ // globalhistory layout tests.
+ if (dumpHistoryCallbacks) {
+ printf("WebView updated the title for history URL \"%s\" to \"%s\".\n",
+ qPrintable(drtDescriptionSuitableForTestResult(url)),
+ qPrintable(QString(title)));
+ }
}
@@ -738,12 +747,48 @@ void FrameLoaderClientQt::registerForIconNotification(bool)
void FrameLoaderClientQt::updateGlobalHistory()
{
QWebHistoryInterface *history = QWebHistoryInterface::defaultInterface();
+ WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader();
if (history)
- history->addHistoryEntry(m_frame->loader()->documentLoader()->urlForHistory().prettyURL());
+ history->addHistoryEntry(loader->urlForHistory().prettyURL());
+
+ if (dumpHistoryCallbacks) {
+ printf("WebView navigated to url \"%s\" with title \"%s\" with HTTP equivalent method \"%s\". The navigation was %s and was %s%s.\n",
+ qPrintable(drtDescriptionSuitableForTestResult(loader->urlForHistory())),
+ qPrintable(QString(loader->title())),
+ qPrintable(QString(loader->request().httpMethod())),
+ ((loader->substituteData().isValid() || (loader->response().httpStatusCode() >= 400)) ? "a failure" : "successful"),
+ ((!loader->clientRedirectSourceForHistory().isEmpty()) ? "a client redirect from " : "not a client redirect"),
+ (!loader->clientRedirectSourceForHistory().isEmpty()) ? qPrintable(drtDescriptionSuitableForTestResult(loader->clientRedirectSourceForHistory())) : "");
+ }
}
void FrameLoaderClientQt::updateGlobalHistoryRedirectLinks()
{
+ // Apple WebKit is the only port that makes use of this callback. It calls
+ // WebCore::HistoryItem::addRedirectURL() with the contents of
+ // loader->[server|client]RedirectDestinationForHistory().
+ // WebCore can associate a bunch of redirect URLs with a particular
+ // item in the history, presumably this allows Safari to skip the redirections
+ // when navigating to that history item. That might be a feature Qt wants to
+ // offer through QWebHistoryInterface in the future. For now, we're just
+ // passing tests in LayoutTests/http/tests/globalhistory.
+ WebCore::DocumentLoader* loader = m_frame->loader()->documentLoader();
+
+ if (!loader->clientRedirectSourceForHistory().isNull()) {
+ if (dumpHistoryCallbacks) {
+ printf("WebView performed a client redirect from \"%s\" to \"%s\".\n",
+ qPrintable(QString(loader->clientRedirectSourceForHistory())),
+ qPrintable(QString(loader->clientRedirectDestinationForHistory())));
+ }
+ }
+
+ if (!loader->serverRedirectSourceForHistory().isNull()) {
+ if (dumpHistoryCallbacks) {
+ printf("WebView performed a server redirect from \"%s\" to \"%s\".\n",
+ qPrintable(QString(loader->serverRedirectSourceForHistory())),
+ qPrintable(QString(loader->serverRedirectDestinationForHistory())));
+ }
+ }
}
bool FrameLoaderClientQt::shouldGoToHistoryItem(WebCore::HistoryItem *) const
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 70ac7c4..edcb25c 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -238,6 +238,7 @@ public:
static bool policyDelegateEnabled;
static bool policyDelegatePermissive;
static bool deferMainResourceDataLoad;
+ static bool dumpHistoryCallbacks;
private:
Frame *m_frame;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 96ce849..8c13923 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,19 @@
+2010-09-16 Robert Hogan <robert at webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Support globalhistory tests
+ https://bugs.webkit.org/show_bug.cgi?id=45774
+
+ * DumpRenderTree/qt/DumpRenderTreeQt.cpp:
+ (WebCore::isGlobalHistoryTest):
+ (WebCore::DumpRenderTree::open):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::dumpHistoryCallbacks):
+ (LayoutTestController::removeAllVisitedLinks):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
2010-09-10 Tony Chang <tony at chromium.org>
Reviewed by Eric Seidel.
diff --git a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
index dc81f56..4e6f049 100644
--- a/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
@@ -567,6 +567,13 @@ void DumpRenderTree::resetToConsistentStateBeforeTesting()
setlocale(LC_ALL, "");
}
+static bool isGlobalHistoryTest(const QUrl& url)
+{
+ if (url.path().contains("globalhistory/"))
+ return true;
+ return false;
+}
+
static bool isWebInspectorTest(const QUrl& url)
{
if (url.path().contains("inspector/"))
@@ -595,6 +602,9 @@ void DumpRenderTree::open(const QUrl& url)
layoutTestController()->showWebInspector();
}
+ if (isGlobalHistoryTest(url))
+ layoutTestController()->dumpHistoryCallbacks();
+
// W3C SVG tests expect to be 480x360
bool isW3CTest = url.toString().contains("svg/W3C-SVG-1.1");
int width = isW3CTest ? 480 : LayoutTestController::maxViewWidth;
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index 7d697bc..b2ef716 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -81,6 +81,8 @@ void LayoutTestController::reset()
DumpRenderTreeSupportQt::setWillSendRequestClearHeaders(QStringList());
DumpRenderTreeSupportQt::clearScriptWorlds();
DumpRenderTreeSupportQt::setCustomPolicyDelegate(false, false);
+ DumpRenderTreeSupportQt::dumpHistoryCallbacks(false);
+ DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(false);
setIconDatabaseEnabled(false);
emit hidePage();
@@ -254,6 +256,11 @@ void LayoutTestController::dumpResourceResponseMIMETypes()
DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(true);
}
+void LayoutTestController::dumpHistoryCallbacks()
+{
+ DumpRenderTreeSupportQt::dumpHistoryCallbacks(true);
+}
+
void LayoutTestController::setWillSendRequestReturnsNullOnRedirect(bool enabled)
{
DumpRenderTreeSupportQt::setWillSendRequestReturnsNullOnRedirect(enabled);
@@ -780,5 +787,12 @@ void LayoutTestController::addUserStyleSheet(const QString& sourceCode)
DumpRenderTreeSupportQt::addUserStyleSheet(m_drt->webPage(), sourceCode);
}
+void LayoutTestController::removeAllVisitedLinks()
+{
+ QWebHistory* history = m_drt->webPage()->history();
+ history->clear();
+ DumpRenderTreeSupportQt::dumpVisitedLinksCallbacks(true);
+}
+
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 ba31f1f..ec89acb 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -108,6 +108,7 @@ public slots:
void dumpFrameLoadCallbacks();
void dumpResourceLoadCallbacks();
void dumpResourceResponseMIMETypes();
+ void dumpHistoryCallbacks();
void dumpConfigurationForViewport(int availableWidth, int availableHeight);
void setWillSendRequestReturnsNullOnRedirect(bool enabled);
void setWillSendRequestReturnsNull(bool enabled);
@@ -137,6 +138,7 @@ public slots:
void showWebInspector();
void closeWebInspector();
void evaluateInWebInspector(long callId, const QString& script);
+ void removeAllVisitedLinks();
void setMediaType(const QString& type);
void setFrameFlatteningEnabled(bool enable);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list