Diff
Modified: trunk/LayoutTests/ChangeLog (128611 => 128612)
--- trunk/LayoutTests/ChangeLog 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/LayoutTests/ChangeLog 2012-09-14 15:18:40 UTC (rev 128612)
@@ -1,3 +1,15 @@
+2012-09-14 Christophe Dumez <[email protected]>
+
+ WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
+ https://bugs.webkit.org/show_bug.cgi?id=42691
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Unskip fast/loader/stop-provisional-loads.html now that WebKitTestRunner
+ implements testrunner.setStopProvisionalFrameLoads().
+
+ * platform/wk2/Skipped:
+
2012-09-14 Mikhail Pozdnyakov <[email protected]>
[EFL] Attempt to create a theme for 0 sized element leads to assertion hit
Modified: trunk/LayoutTests/platform/wk2/Skipped (128611 => 128612)
--- trunk/LayoutTests/platform/wk2/Skipped 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/LayoutTests/platform/wk2/Skipped 2012-09-14 15:18:40 UTC (rev 128612)
@@ -428,10 +428,6 @@
# <https://bugs.webkit.org/show_bug.cgi?id=69548>
fast/events/show-modal-dialog-onblur-onfocus.html
-# WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
-# <https://bugs.webkit.org/show_bug.cgi?id=42691>
-fast/loader/stop-provisional-loads.html
-
# WebKitTestRunner needs layoutTestController.setPrinting
# <https://bugs.webkit.org/show_bug.cgi?id=42693>
printing/compositing-layer-printing.html
Modified: trunk/Source/WebKit2/ChangeLog (128611 => 128612)
--- trunk/Source/WebKit2/ChangeLog 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Source/WebKit2/ChangeLog 2012-09-14 15:18:40 UTC (rev 128612)
@@ -1,3 +1,25 @@
+2012-09-14 Christophe Dumez <[email protected]>
+
+ WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
+ https://bugs.webkit.org/show_bug.cgi?id=42691
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add WKBundleFrame private API to stop loading of a frame.
+ This is needed by WebKitTestRunner to implement
+ testrunner.setStopProvisionalFrameLoads.
+
+ Original patch by Alexey Proskuryakov.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+ (WKBundleFrameStopLoading):
+ * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h:
+ * WebProcess/WebPage/WebFrame.cpp:
+ (WebKit::WebFrame::stopLoading):
+ (WebKit):
+ * WebProcess/WebPage/WebFrame.h:
+ (WebFrame):
+
2012-09-14 Kenneth Rohde Christiansen <[email protected]>
[EFL] Add unit test for RefPtr<Evas_Object>
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp (128611 => 128612)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp 2012-09-14 15:18:40 UTC (rev 128612)
@@ -182,6 +182,11 @@
coreFrame->loader()->setOpener(0);
}
+void WKBundleFrameStopLoading(WKBundleFrameRef frameRef)
+{
+ toImpl(frameRef)->stopLoading();
+}
+
WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frameRef)
{
return toCopiedAPI(toImpl(frameRef)->layerTreeAsText());
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h (128611 => 128612)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h 2012-09-14 15:18:40 UTC (rev 128612)
@@ -49,6 +49,7 @@
WK_EXPORT unsigned WKBundleFrameGetPendingUnloadCount(WKBundleFrameRef frame);
WK_EXPORT WKStringRef WKBundleFrameCopyLayerTreeAsText(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameClearOpener(WKBundleFrameRef frame);
+WK_EXPORT void WKBundleFrameStopLoading(WKBundleFrameRef frame);
WK_EXPORT bool WKBundleFrameContainsAnyFormElements(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameSetTextDirection(WKBundleFrameRef frame, WKStringRef);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp (128611 => 128612)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.cpp 2012-09-14 15:18:40 UTC (rev 128612)
@@ -651,6 +651,14 @@
return false;
}
+void WebFrame::stopLoading()
+{
+ if (!m_coreFrame)
+ return;
+
+ m_coreFrame->loader()->stopForUserCancel();
+}
+
WebFrame* WebFrame::frameForContext(JSContextRef context)
{
JSObjectRef globalObjectRef = JSContextGetGlobalObject(context);
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h (128611 => 128612)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebFrame.h 2012-09-14 15:18:40 UTC (rev 128612)
@@ -113,6 +113,7 @@
bool hasVerticalScrollbar() const;
bool getDocumentBackgroundColor(double* red, double* green, double* blue, double* alpha);
bool containsAnyFormElements() const;
+ void stopLoading();
static WebFrame* frameForContext(JSContextRef);
Modified: trunk/Tools/ChangeLog (128611 => 128612)
--- trunk/Tools/ChangeLog 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Tools/ChangeLog 2012-09-14 15:18:40 UTC (rev 128612)
@@ -1,3 +1,25 @@
+2012-09-14 Christophe Dumez <[email protected]>
+
+ WebKitTestRunner needs layoutTestController.setStopProvisionalFrameLoads
+ https://bugs.webkit.org/show_bug.cgi?id=42691
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Add implementation for testrunner.setStopProvisionalFrameLoads()
+ in WebKitTestRunner.
+
+ Original patch by Alexey Proskuryakov.
+
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::didStartProvisionalLoadForFrame):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::TestRunner):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+ (TestRunner):
+ (WTR::TestRunner::setStopProvisionalFrameLoads):
+ (WTR::TestRunner::shouldStopProvisionalFrameLoads):
+
2012-09-14 Tor Arne Vestbø <[email protected]>
[Qt] Fix handling of debug/release/debug_and_release/build_all
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (128611 => 128612)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2012-09-14 15:18:40 UTC (rev 128612)
@@ -142,6 +142,7 @@
void setShouldStayOnPageAfterHandlingBeforeUnload(in boolean flag);
void setDefersLoading(in boolean flag);
+ void setStopProvisionalFrameLoads();
// Web intents testing.
void sendWebIntentResponse(in DOMString reply);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp (128611 => 128612)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp 2012-09-14 15:18:40 UTC (rev 128612)
@@ -732,9 +732,14 @@
InjectedBundle::shared().stringBuilder()->appendLiteral(" - didStartProvisionalLoadForFrame\n");
}
- if (InjectedBundle::shared().topLoadingFrame())
- return;
- InjectedBundle::shared().setTopLoadingFrame(frame);
+ if (!InjectedBundle::shared().topLoadingFrame())
+ InjectedBundle::shared().setTopLoadingFrame(frame);
+
+ if (InjectedBundle::shared().testRunner()->shouldStopProvisionalFrameLoads()) {
+ dumpFrameDescriptionSuitableForTestResult(frame);
+ InjectedBundle::shared().stringBuilder()->appendLiteral(" - stopping load in didStartProvisionalLoadForFrame callback\n");
+ WKBundleFrameStopLoading(frame);
+ }
}
void InjectedBundlePage::didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (128611 => 128612)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2012-09-14 15:18:40 UTC (rev 128612)
@@ -86,6 +86,7 @@
, m_testRepaint(false)
, m_testRepaintSweepHorizontally(false)
, m_willSendRequestReturnsNull(false)
+ , m_shouldStopProvisionalFrameLoads(false)
, m_policyDelegateEnabled(false)
, m_policyDelegatePermissive(false)
, m_globalFlag(false)
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (128611 => 128612)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2012-09-14 14:55:11 UTC (rev 128611)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2012-09-14 15:18:40 UTC (rev 128612)
@@ -206,6 +206,9 @@
void setShouldStayOnPageAfterHandlingBeforeUnload(bool);
void setDefersLoading(bool);
+
+ void setStopProvisionalFrameLoads() { m_shouldStopProvisionalFrameLoads = true; }
+ bool shouldStopProvisionalFrameLoads() const { return m_shouldStopProvisionalFrameLoads; }
bool globalFlag() const { return m_globalFlag; }
void setGlobalFlag(bool value) { m_globalFlag = value; }
@@ -282,6 +285,7 @@
bool m_testRepaintSweepHorizontally;
bool m_willSendRequestReturnsNull;
+ bool m_shouldStopProvisionalFrameLoads;
bool m_policyDelegateEnabled;
bool m_policyDelegatePermissive;