[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
commit-queue at webkit.org
commit-queue at webkit.org
Wed Dec 22 14:56:14 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit c8d9beb4474b514bf1b3c4a3f5b59b6c210c689f
Author: commit-queue at webkit.org <commit-queue at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 25 19:03:08 2010 +0000
2010-10-25 Johnny Ding <jnd at chromium.org>
Reviewed by Tony Chang.
Dump the gesture status of frame in frame load callbacks in DumpRenderTree
by adding a new method dumpUserGestureInFrameLoadCallbacks.
Now only dump the gesture status in "DidStartProvisionalLoad" callback.
https://bugs.webkit.org/show_bug.cgi?id=47849
* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader):
* WebCoreSupport/DumpRenderTreeSupportQt.h:
* WebCoreSupport/FrameLoaderClientQt.cpp:
(drtPrintFrameUserGestureStatus):
(WebCore::FrameLoaderClientQt::dispatchDidHandleOnloadEvents):
(WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage):
(WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage):
(WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
(WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
* WebCoreSupport/FrameLoaderClientQt.h:
2010-10-25 Johnny Ding <jnd at chromium.org>
Reviewed by Tony Chang.
Dump the gesture status of frame in frame load callbacks in DumpRenderTree
by adding a new method dumpUserGestureInFrameLoadCallbacks.
Now only dump the gesture status in "DidStartProvisionalLoad" callback.
https://bugs.webkit.org/show_bug.cgi?id=47849
* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(dumpUserGestureInFrameLoadCallbacksCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
(LayoutTestController::setDumpUserGestureInFrameLoadCallbacks):
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
(LayoutTestController::reset):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController::shouldDumpUserGestureInFrameLoadCallbacks):
(LayoutTestController::setShouldDumpUserGestureInFrameLoadCallbacks):
* DumpRenderTree/chromium/TestShell.h:
(TestShell::shouldDumpUserGestureInFrameLoadCallbacks):
* DumpRenderTree/chromium/WebViewHost.cpp:
(WebViewHost::didStartProvisionalLoad):
(WebViewHost::printFrameUserGestureStatus):
* DumpRenderTree/chromium/WebViewHost.h:
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[WebFrame _drt_printFrameUserGestureStatus]):
(-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
(-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
(-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
(-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
(-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
(-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
(-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::reset):
(LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70470 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 970b09d..c0c0601 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,24 @@
+2010-10-25 Johnny Ding <jnd at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Dump the gesture status of frame in frame load callbacks in DumpRenderTree
+ by adding a new method dumpUserGestureInFrameLoadCallbacks.
+ Now only dump the gesture status in "DidStartProvisionalLoad" callback.
+ https://bugs.webkit.org/show_bug.cgi?id=47849
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (drtPrintFrameUserGestureStatus):
+ (WebCore::FrameLoaderClientQt::dispatchDidHandleOnloadEvents):
+ (WebCore::FrameLoaderClientQt::dispatchDidPushStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidReplaceStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidPopStateWithinPage):
+ (WebCore::FrameLoaderClientQt::dispatchDidStartProvisionalLoad):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
2010-10-22 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 28f6810..4309e5c 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -561,6 +561,11 @@ void DumpRenderTreeSupportQt::dumpFrameLoader(bool b)
FrameLoaderClientQt::dumpFrameLoaderCallbacks = b;
}
+void DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(bool b)
+{
+ FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = b;
+}
+
void DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(bool b)
{
FrameLoaderClientQt::dumpResourceLoadCallbacks = b;
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 0e76f04..356b226 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -101,6 +101,7 @@ public:
static QString plainText(const QVariant& rng);
static void dumpFrameLoader(bool b);
+ static void dumpUserGestureInFrameLoader(bool b);
static void dumpResourceLoadCallbacks(bool b);
static void dumpResourceResponseMIMETypes(bool b);
static void dumpResourceLoadCallbacksPath(const QString& path);
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index a0b2330..2316481 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -106,6 +106,13 @@ static QString drtDescriptionSuitableForTestResult(WebCore::Frame* _frame)
}
}
+static QString drtPrintFrameUserGestureStatus(WebCore::Frame* frame)
+{
+ if (frame->loader()->isProcessingUserGesture())
+ return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("true"));
+ return QString::fromLatin1("Frame with user gesture \"%1\"").arg(QLatin1String("false"));
+}
+
static QString drtDescriptionSuitableForTestResult(const WebCore::KURL& _url)
{
if (_url.isEmpty() || !_url.isLocalFile())
@@ -159,6 +166,7 @@ namespace WebCore
{
bool FrameLoaderClientQt::dumpFrameLoaderCallbacks = false;
+bool FrameLoaderClientQt::dumpUserGestureInFrameLoaderCallbacks = false;
bool FrameLoaderClientQt::dumpResourceLoadCallbacks = false;
bool FrameLoaderClientQt::sendRequestReturnsNullOnRedirect = false;
bool FrameLoaderClientQt::sendRequestReturnsNull = false;
@@ -314,7 +322,6 @@ void FrameLoaderClientQt::dispatchDidHandleOnloadEvents()
// don't need this one
if (dumpFrameLoaderCallbacks)
printf("%s - didHandleOnloadEventsForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
}
@@ -373,7 +380,7 @@ void FrameLoaderClientQt::dispatchDidPushStateWithinPage()
{
if (dumpFrameLoaderCallbacks)
printf("%s - dispatchDidPushStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
+
notImplemented();
}
@@ -381,7 +388,7 @@ void FrameLoaderClientQt::dispatchDidReplaceStateWithinPage()
{
if (dumpFrameLoaderCallbacks)
printf("%s - dispatchDidReplaceStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
+
notImplemented();
}
@@ -389,7 +396,7 @@ void FrameLoaderClientQt::dispatchDidPopStateWithinPage()
{
if (dumpFrameLoaderCallbacks)
printf("%s - dispatchDidPopStateWithinPage\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
-
+
notImplemented();
}
@@ -403,6 +410,9 @@ void FrameLoaderClientQt::dispatchDidStartProvisionalLoad()
if (dumpFrameLoaderCallbacks)
printf("%s - didStartProvisionalLoadForFrame\n", qPrintable(drtDescriptionSuitableForTestResult(m_frame)));
+ if (dumpUserGestureInFrameLoaderCallbacks)
+ printf("%s - in didStartProvisionalLoadForFrame\n", qPrintable(drtPrintFrameUserGestureStatus(m_frame)));
+
if (m_webFrame)
emit m_webFrame->provisionalLoad();
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 8aef069..91013df 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -233,6 +233,7 @@ public:
virtual PassRefPtr<FrameNetworkingContext> createNetworkingContext();
static bool dumpFrameLoaderCallbacks;
+ static bool dumpUserGestureInFrameLoaderCallbacks;
static bool dumpResourceLoadCallbacks;
static bool dumpResourceResponseMIMETypes;
static QString dumpResourceLoadCallbacksPath;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 66c840c..0342fa3 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,46 @@
+2010-10-25 Johnny Ding <jnd at chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Dump the gesture status of frame in frame load callbacks in DumpRenderTree
+ by adding a new method dumpUserGestureInFrameLoadCallbacks.
+ Now only dump the gesture status in "DidStartProvisionalLoad" callback.
+ https://bugs.webkit.org/show_bug.cgi?id=47849
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (dumpUserGestureInFrameLoadCallbacksCallback):
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ (LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
+ (LayoutTestController::setDumpUserGestureInFrameLoadCallbacks):
+ * DumpRenderTree/chromium/LayoutTestController.cpp:
+ (LayoutTestController::LayoutTestController):
+ (LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
+ (LayoutTestController::reset):
+ * DumpRenderTree/chromium/LayoutTestController.h:
+ (LayoutTestController::shouldDumpUserGestureInFrameLoadCallbacks):
+ (LayoutTestController::setShouldDumpUserGestureInFrameLoadCallbacks):
+ * DumpRenderTree/chromium/TestShell.h:
+ (TestShell::shouldDumpUserGestureInFrameLoadCallbacks):
+ * DumpRenderTree/chromium/WebViewHost.cpp:
+ (WebViewHost::didStartProvisionalLoad):
+ (WebViewHost::printFrameUserGestureStatus):
+ * DumpRenderTree/chromium/WebViewHost.h:
+ * DumpRenderTree/mac/FrameLoadDelegate.mm:
+ (-[WebFrame _drt_printFrameUserGestureStatus]):
+ (-[FrameLoadDelegate webView:didStartProvisionalLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didCommitLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:didFinishLoadForFrame:]):
+ (-[FrameLoadDelegate webView:didFailLoadWithError:forFrame:]):
+ (-[FrameLoadDelegate webView:windowScriptObjectAvailable:]):
+ (-[FrameLoadDelegate webView:didReceiveTitle:forFrame:]):
+ * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+ (LayoutTestController::reset):
+ (LayoutTestController::dumpUserGestureInFrameLoadCallbacks):
+ * DumpRenderTree/qt/LayoutTestControllerQt.h:
+
2010-10-25 Sheriff Bot <webkit.review.bot at gmail.com>
Unreviewed, rolling out r70442.
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
index b5cc874..83655bd 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -51,6 +51,7 @@ LayoutTestController::LayoutTestController(const std::string& testPathOrURL, con
, m_dumpDatabaseCallbacks(false)
, m_dumpEditingCallbacks(false)
, m_dumpFrameLoadCallbacks(false)
+ , m_dumpUserGestureInFrameLoadCallbacks(false)
, m_dumpHistoryDelegateCallbacks(false)
, m_dumpResourceLoadCallbacks(false)
, m_dumpResourceResponseMIMETypes(false)
@@ -167,6 +168,13 @@ static JSValueRef dumpFrameLoadCallbacksCallback(JSContextRef context, JSObjectR
return JSValueMakeUndefined(context);
}
+static JSValueRef dumpUserGestureInFrameLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+ LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+ controller->setDumpUserGestureInFrameLoadCallbacks(true);
+ return JSValueMakeUndefined(context);
+}
+
static JSValueRef dumpResourceLoadCallbacksCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -1889,6 +1897,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "dumpDatabaseCallbacks", dumpDatabaseCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpEditingCallbacks", dumpEditingCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpFrameLoadCallbacks", dumpFrameLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+ { "dumpUserGestureInFrameLoadCallbacks", dumpUserGestureInFrameLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpResourceLoadCallbacks", dumpResourceLoadCallbacksCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpResourceResponseMIMETypes", dumpResourceResponseMIMETypesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "dumpSelectionRect", dumpSelectionRectCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
diff --git a/WebKitTools/DumpRenderTree/LayoutTestController.h b/WebKitTools/DumpRenderTree/LayoutTestController.h
index 689e114..27518b7 100644
--- a/WebKitTools/DumpRenderTree/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -154,6 +154,9 @@ public:
bool dumpFrameLoadCallbacks() const { return m_dumpFrameLoadCallbacks; }
void setDumpFrameLoadCallbacks(bool dumpFrameLoadCallbacks) { m_dumpFrameLoadCallbacks = dumpFrameLoadCallbacks; }
+
+ bool dumpUserGestureInFrameLoadCallbacks() const { return m_dumpUserGestureInFrameLoadCallbacks; }
+ void setDumpUserGestureInFrameLoadCallbacks(bool dumpUserGestureInFrameLoadCallbacks) { m_dumpUserGestureInFrameLoadCallbacks = dumpUserGestureInFrameLoadCallbacks; }
bool dumpHistoryDelegateCallbacks() const { return m_dumpHistoryDelegateCallbacks; }
void setDumpHistoryDelegateCallbacks(bool dumpHistoryDelegateCallbacks) { m_dumpHistoryDelegateCallbacks = dumpHistoryDelegateCallbacks; }
@@ -311,6 +314,7 @@ private:
bool m_dumpDatabaseCallbacks;
bool m_dumpEditingCallbacks;
bool m_dumpFrameLoadCallbacks;
+ bool m_dumpUserGestureInFrameLoadCallbacks;
bool m_dumpHistoryDelegateCallbacks;
bool m_dumpResourceLoadCallbacks;
bool m_dumpResourceResponseMIMETypes;
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
index 82fd085..1a6187e 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
@@ -94,6 +94,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
bindMethod("dumpDatabaseCallbacks", &LayoutTestController::dumpDatabaseCallbacks);
bindMethod("dumpEditingCallbacks", &LayoutTestController::dumpEditingCallbacks);
bindMethod("dumpFrameLoadCallbacks", &LayoutTestController::dumpFrameLoadCallbacks);
+ bindMethod("dumpUserGestureInFrameLoadCallbacks", &LayoutTestController::dumpUserGestureInFrameLoadCallbacks);
bindMethod("dumpResourceLoadCallbacks", &LayoutTestController::dumpResourceLoadCallbacks);
bindMethod("dumpResourceResponseMIMETypes", &LayoutTestController::dumpResourceResponseMIMETypes);
bindMethod("dumpSelectionRect", &LayoutTestController::dumpSelectionRect);
@@ -288,6 +289,12 @@ void LayoutTestController::dumpFrameLoadCallbacks(const CppArgumentList&, CppVar
result->setNull();
}
+void LayoutTestController::dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant* result)
+{
+ m_dumpUserGestureInFrameLoadCallbacks = true;
+ result->setNull();
+}
+
void LayoutTestController::dumpResourceLoadCallbacks(const CppArgumentList&, CppVariant* result)
{
m_dumpResourceLoadCallbacks = true;
@@ -522,6 +529,7 @@ void LayoutTestController::reset()
m_dumpAsText = false;
m_dumpEditingCallbacks = false;
m_dumpFrameLoadCallbacks = false;
+ m_dumpUserGestureInFrameLoadCallbacks = false;
m_dumpResourceLoadCallbacks = false;
m_dumpResourceResponseMIMETypes = false;
m_dumpBackForwardList = false;
diff --git a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
index ae1a7a2..fc16827 100644
--- a/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
+++ b/WebKitTools/DumpRenderTree/chromium/LayoutTestController.h
@@ -88,6 +88,11 @@ public:
// ignores any that may be present.
void dumpFrameLoadCallbacks(const CppArgumentList&, CppVariant*);
+ // This function sets a flag that tells the test_shell to print a line of
+ // user gesture status text for some frame load callbacks. It takes no
+ // arguments, and ignores any that may be present.
+ void dumpUserGestureInFrameLoadCallbacks(const CppArgumentList&, CppVariant*);
+
// This function sets a flag that tells the test_shell to print out a text
// representation of the back/forward list. It ignores all arguments.
void dumpBackForwardList(const CppArgumentList&, CppVariant*);
@@ -340,6 +345,8 @@ public:
bool shouldDumpEditingCallbacks() { return m_dumpEditingCallbacks; }
bool shouldDumpFrameLoadCallbacks() { return m_dumpFrameLoadCallbacks; }
void setShouldDumpFrameLoadCallbacks(bool value) { m_dumpFrameLoadCallbacks = value; }
+ bool shouldDumpUserGestureInFrameLoadCallbacks() { return m_dumpUserGestureInFrameLoadCallbacks; }
+ void setShouldDumpUserGestureInFrameLoadCallbacks(bool value) { m_dumpUserGestureInFrameLoadCallbacks = value; }
bool shouldDumpResourceLoadCallbacks() {return m_dumpResourceLoadCallbacks; }
void setShouldDumpResourceResponseMIMETypes(bool value) { m_dumpResourceResponseMIMETypes = value; }
bool shouldDumpResourceResponseMIMETypes() {return m_dumpResourceResponseMIMETypes; }
@@ -460,6 +467,10 @@ private:
// load callback.
bool m_dumpFrameLoadCallbacks;
+ // If true, the test_shell will output a line of the user gesture status
+ // text for some frame load callbacks.
+ bool m_dumpUserGestureInFrameLoadCallbacks;
+
// If true, the test_shell will output a descriptive line for each resource
// load callback.
bool m_dumpResourceLoadCallbacks;
diff --git a/WebKitTools/DumpRenderTree/chromium/TestShell.h b/WebKitTools/DumpRenderTree/chromium/TestShell.h
index a15d9ec..d8e9c69 100644
--- a/WebKitTools/DumpRenderTree/chromium/TestShell.h
+++ b/WebKitTools/DumpRenderTree/chromium/TestShell.h
@@ -109,6 +109,7 @@ public:
void setFocus(WebKit::WebWidget*, bool enable);
bool shouldDumpFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpFrameLoadCallbacks(); }
+ bool shouldDumpUserGestureInFrameLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpUserGestureInFrameLoadCallbacks(); }
bool shouldDumpResourceLoadCallbacks() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceLoadCallbacks(); }
bool shouldDumpResourceResponseMIMETypes() const { return (m_testIsPreparing || m_testIsPending) && layoutTestController()->shouldDumpResourceResponseMIMETypes(); }
void setIsLoading(bool flag) { m_isLoading = flag; }
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
index ab8dbf0..9767605 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.cpp
@@ -813,6 +813,8 @@ void WebViewHost::didCreateDataSource(WebFrame*, WebDataSource* ds)
void WebViewHost::didStartProvisionalLoad(WebFrame* frame)
{
+ if (m_shell->shouldDumpUserGestureInFrameLoadCallbacks())
+ printFrameUserGestureStatus(frame, " - in didStartProvisionalLoadForFrame\n");
if (m_shell->shouldDumpFrameLoadCallbacks()) {
printFrameDescription(frame);
fputs(" - didStartProvisionalLoadForFrame\n", stdout);
@@ -1305,6 +1307,12 @@ void WebViewHost::printFrameDescription(WebFrame* webframe)
printf("frame \"%s\"", name8.c_str());
}
+void WebViewHost::printFrameUserGestureStatus(WebFrame* webframe, const char* msg)
+{
+ bool isUserGesture = webframe->isProcessingUserGesture();
+ printf("Frame with user gesture \"%s\"%s", isUserGesture ? "true" : "false", msg);
+}
+
void WebViewHost::printResourceDescription(unsigned identifier)
{
ResourceMap::iterator it = m_resourceIdentifierMap.find(identifier);
diff --git a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
index 429d3ab..ea70574 100644
--- a/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
+++ b/WebKitTools/DumpRenderTree/chromium/WebViewHost.h
@@ -220,6 +220,9 @@ private:
// Dumping a frame to the console.
void printFrameDescription(WebKit::WebFrame*);
+ // Dumping the user gesture status to the console.
+ void printFrameUserGestureStatus(WebKit::WebFrame*, const char*);
+
bool hasWindow() const { return m_hasWindow; }
void resetScrollRect();
void discardBackingStore();
diff --git a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
index 963eae7..a36982c 100644
--- a/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/FrameLoadDelegate.mm
@@ -50,6 +50,7 @@
#import <WebKit/WebNSURLExtras.h>
#import <WebKit/WebScriptWorld.h>
#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebViewPrivate.h>
#import <wtf/Assertions.h>
@interface NSURL (DRTExtras)
@@ -89,6 +90,12 @@
return @"frame (anonymous)";
}
}
+
+- (NSString *)_drt_printFrameUserGestureStatus
+{
+ BOOL isUserGesture = [[self webView] _isProcessingUserGesture];
+ return [NSString stringWithFormat:@"Frame with user gesture \"%@\"", isUserGesture ? @"true" : @"false"];
+}
@end
@implementation FrameLoadDelegate
@@ -146,7 +153,12 @@
NSString *string = [NSString stringWithFormat:@"%@ - didStartProvisionalLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
printf ("%s\n", [string UTF8String]);
}
-
+
+ if (!done && gLayoutTestController->dumpUserGestureInFrameLoadCallbacks()) {
+ NSString *string = [NSString stringWithFormat:@"%@ - in didStartProvisionalLoadForFrame", [frame _drt_printFrameUserGestureStatus]];
+ printf ("%s\n", [string UTF8String]);
+ }
+
ASSERT([frame provisionalDataSource]);
// Make sure we only set this once per test. If it gets cleared, and then set again, we might
// end up doing two dumps for one test.
@@ -166,7 +178,7 @@
NSString *string = [NSString stringWithFormat:@"%@ - didCommitLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
printf ("%s\n", [string UTF8String]);
}
-
+
ASSERT(![frame provisionalDataSource]);
ASSERT([frame dataSource]);
@@ -190,7 +202,7 @@
ASSERT_NOT_REACHED();
return;
}
-
+
ASSERT([frame provisionalDataSource]);
[self webView:sender locationChangeDone:error forDataSource:[frame provisionalDataSource]];
}
@@ -204,7 +216,7 @@
NSString *string = [NSString stringWithFormat:@"%@ - didFinishLoadForFrame", [frame _drt_descriptionSuitableForTestResult]];
printf ("%s\n", [string UTF8String]);
}
-
+
// FIXME: This call to displayIfNeeded can be removed when <rdar://problem/5092361> is fixed.
// After that is fixed, we will reenable painting after WebCore is done loading the document,
// and this call will no longer be needed.
@@ -220,7 +232,7 @@
NSString *string = [NSString stringWithFormat:@"%@ - didFailLoadWithError", [frame _drt_descriptionSuitableForTestResult]];
printf ("%s\n", [string UTF8String]);
}
-
+
ASSERT(![frame provisionalDataSource]);
ASSERT([frame dataSource]);
@@ -233,7 +245,7 @@
NSString *string = [NSString stringWithFormat:@"?? - windowScriptObjectAvailable"];
printf ("%s\n", [string UTF8String]);
}
-
+
ASSERT_NOT_REACHED();
}
@@ -314,7 +326,7 @@
NSString *string = [NSString stringWithFormat:@"%@ - didReceiveTitle: %@", [frame _drt_descriptionSuitableForTestResult], title];
printf ("%s\n", [string UTF8String]);
}
-
+
if (gLayoutTestController->dumpTitleChanges())
printf("TITLE CHANGED: %s\n", [title UTF8String]);
}
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
index d36a074..b2c3807 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
@@ -73,6 +73,7 @@ void LayoutTestController::reset()
DumpRenderTreeSupportQt::dumpEditingCallbacks(false);
DumpRenderTreeSupportQt::dumpFrameLoader(false);
+ DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(false);
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(false);
DumpRenderTreeSupportQt::dumpResourceResponseMIMETypes(false);
DumpRenderTreeSupportQt::setDeferMainResourceDataLoad(true);
@@ -246,6 +247,11 @@ void LayoutTestController::dumpFrameLoadCallbacks()
DumpRenderTreeSupportQt::dumpFrameLoader(true);
}
+void LayoutTestController::dumpUserGestureInFrameLoadCallbacks()
+{
+ DumpRenderTreeSupportQt::dumpUserGestureInFrameLoader(true);
+}
+
void LayoutTestController::dumpResourceLoadCallbacks()
{
DumpRenderTreeSupportQt::dumpResourceLoadCallbacks(true);
diff --git a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
index 3684946..68ebe1d 100644
--- a/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
+++ b/WebKitTools/DumpRenderTree/qt/LayoutTestControllerQt.h
@@ -106,6 +106,7 @@ public slots:
void handleErrorPages() { m_handleErrorPages = true; }
void dumpEditingCallbacks();
void dumpFrameLoadCallbacks();
+ void dumpUserGestureInFrameLoadCallbacks();
void dumpResourceLoadCallbacks();
void dumpResourceResponseMIMETypes();
void dumpHistoryCallbacks();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list