[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
darin at apple.com
darin at apple.com
Wed Dec 22 11:24:09 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 70512a5c4d7e50276344ba7e3cf8bca48bbcf32f
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Jul 22 00:46:26 2010 +0000
2010-07-21 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner needs to support dumping of scroll position
https://bugs.webkit.org/show_bug.cgi?id=42514
* platform/mac-wk2/Skipped: Removed now-passing tests from
skipped list and moved one miscategorized test.
2010-07-21 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner needs to support dumping of scroll position
https://bugs.webkit.org/show_bug.cgi?id=42514
* MiniBrowser/mac/WebBundle/WebBundleMain.m:
(_didClearWindowForFrame): Use JSGlobalContextRef instead of JSContextRef.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::_didClearWindowForFrame): Use JSGlobalContextRef
instead of JSContextRef.
(WTR::InjectedBundlePage::dump): Call dumpFrameScrollPosition when appropriate.
(WTR::numericWindowProperty): Added. Helper for dumpFrameScrollPosition.
(WTR::InjectedBundlePage::dumpFrameScrollPosition): Added.
(WTR::InjectedBundlePage::didClearWindowForFrame): Use JSGlobalContextRef
instead of JSContextRef.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Removed names from
arguments that simply repeat the argument type. Added dumpFrameScrollPosition.
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR::LayoutTestController::shouldDumpDOMAsWebArchive): Added. Currently
returns false.
(WTR::LayoutTestController::shouldDumpSourceAsWebArchive): Added. Currently
returns false.
(WTR::LayoutTestController::shouldDumpFrameScrollPositions): Added. Matches
the logic in DumpRenderTree.
* WebKitTestRunner/InjectedBundle/LayoutTestController.h: Updated for above changes.
* WebKitTestRunner/WebKitTestRunner.xcodeproj: Added property svn:ignore.
2010-07-21 Darin Adler <darin at apple.com>
Reviewed by Sam Weinig.
WebKitTestRunner needs to support dumping of scroll position
https://bugs.webkit.org/show_bug.cgi?id=42514
Added WKBundleFrameGetJavaScriptContext function.
* WebKit2.xcodeproj: Added property svn:ignore.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
(WKBundleFrameGetJavaScriptContext): Added.
* WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63866 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5ecf23e..63b7bb0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
+2010-07-21 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner needs to support dumping of scroll position
+ https://bugs.webkit.org/show_bug.cgi?id=42514
+
+ * platform/mac-wk2/Skipped: Removed now-passing tests from
+ skipped list and moved one miscategorized test.
+
2010-07-21 Justin Schuh <jschuh at chromium.org>
Reviewed by Oliver Hunt.
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 0bb5761..cd816be 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -57,8 +57,6 @@ compositing/animation/state-at-end-event-transform-layer.html
# WebKitTestRunner does not block remote resources or complain about them
# <https://bugs.webkit.org/show_bug.cgi?id=42139>
-canvas/philip/tests/security.pattern.canvas.timing.html
-canvas/philip/tests/security.pattern.create.html
fast/loader/null-request-after-willSendRequest.html
# Support layoutTestController.layerTreeAsText in WebKitTestRunner
@@ -2092,32 +2090,6 @@ platform/mac/fast/text/attributed-substring-from-range-002.html
platform/mac/fast/text/attributed-substring-from-range-in-textfield.html
editing/selection/move-left-right.html
-# WebKitTestRunner needs to support dumping of scroll position
-# <https://bugs.webkit.org/show_bug.cgi?id=42514>
-compositing/geometry/fixed-in-composited.html
-compositing/geometry/fixed-position.html
-compositing/geometry/horizontal-scroll-composited.html
-compositing/geometry/vertical-scroll-composited.html
-compositing/geometry/video-fixed-scrolling.html
-compositing/overflow/fixed-position-ancestor-clip.html
-fast/dom/focus-contenteditable.html
-fast/dynamic/anchor-lock.html
-fast/events/reveal-link-when-focused.html
-fast/layers/scroll-rect-to-visible.html
-fast/overflow/clip-rects-fixed-ancestor.html
-fast/overflow/position-fixed-transform-clipping.html
-fast/overflow/scrollRevealButton.html
-fast/repaint/fixed-child-move-after-scroll.html
-fast/repaint/fixed-child-of-fixed-move-after-scroll.html
-fast/repaint/fixed-child-of-transformed-move-after-scroll.html
-fast/repaint/fixed.html
-fast/repaint/fixed-move-after-scroll.html
-fast/repaint/fixed-tranformed.html
-fast/repaint/repaint-during-scroll.html
-svg/custom/scrolling-embedded-svg-file-image-repaint-problem.html
-transforms/2d/transform-fixed-container.html
-
-
# WebKitTestRunner needs to support needsDeletionUI mechanism to show deletion UI
# <https://bugs.webkit.org/show_bug.cgi?id=42535>
editing/deleting/5408255.html
@@ -2127,7 +2099,6 @@ platform/mac/editing/deleting/deletionUI-differing-background.html
platform/mac/editing/deleting/deletionUI-minimum-size.html
platform/mac/editing/deleting/deletionUI-successful-deletion.html
-
# WebKitTestRunner needs to support layoutTestController.setFrameFlatteningEnabled
# <https://bugs.webkit.org/show_bug.cgi?id=42536>
fast/frames/flattening/frameset-flattening-advanced.html
@@ -2142,7 +2113,6 @@ fast/frames/flattening/iframe-flattening-fixed-width.html
fast/frames/flattening/iframe-flattening-offscreen.html
fast/frames/flattening/iframe-flattening-simple.html
-
# WebKitTestRunner needs to support layoutTestController.counterValueForElementById
# <https://bugs.webkit.org/show_bug.cgi?id=42537>
fast/css/counters/adding-nodes.html
@@ -2156,7 +2126,6 @@ fast/css/counters/invalidate-cached-counter-node.html
fast/css/counters/counter-reset-000.html
fast/css/counters/nesting.html
-
# WebKitTestRunner needs to support layoutTestController.execCommand
# <https://bugs.webkit.org/show_bug.cgi?id=42538>
editing/deleting/5300379.html
@@ -2268,9 +2237,9 @@ svg/custom/manually-parsed-embedded-svg-disallowed-in-dashboard.html
svg/custom/manually-parsed-svg-disallowed-in-dashboard.html
svg/custom/svg-disallowed-in-dashboard-object.html
-
# WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
# <https://bugs.webkit.org/show_bug.cgi?id=42548>
+fast/overflow/scrollRevealButton.html
http/tests/navigation/anchor-frames.html
http/tests/navigation/anchor-subframeload.html
http/tests/navigation/relativeanchor-frames.html
@@ -2292,9 +2261,6 @@ transitions/transition-hit-test.html
transitions/transition-hit-test-transform.html
transitions/transition-shorthand-delay.html
-
-
-
# WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard
# <https://bugs.webkit.org/show_bug.cgi?id=42669>
editing/execCommand/clipboard-access.html
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index a0dab19..620590f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,26 @@
+2010-07-21 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner needs to support dumping of scroll position
+ https://bugs.webkit.org/show_bug.cgi?id=42514
+
+ Added WKBundleFrameGetJavaScriptContext function.
+
+ * WebKit2.xcodeproj: Added property svn:ignore.
+
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+ (WKBundleFrameGetJavaScriptContext): Added.
+ * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
+
+ * WebProcess/InjectedBundle/API/c/WKBundlePage.h:
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
+ (WebKit::InjectedBundlePageLoaderClient::didClearWindowObjectForFrame):
+ * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
+ * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
+ Use JSGlobalContextRef instead of JSContextRef and context instead of ct.
+
2010-07-21 Adam Roben <aroben at apple.com>
Handle broken pipes in more places in CoreIPC
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index 1bb75ff..61cad2b 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -28,8 +28,10 @@
#include "WKAPICast.h"
#include "WKBundleAPICast.h"
#include "WebFrame.h"
-#include <WebCore/PlatformString.h>
+#include <JavaScriptCore/APICast.h>
+#include <WebCore/Frame.h>
+using namespace WebCore;
using namespace WebKit;
bool WKBundleFrameIsMainFrame(WKBundleFrameRef frameRef)
@@ -63,3 +65,10 @@ bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frameRef, WKStr
{
return toWK(frameRef)->pauseAnimationOnElementWithId(toWK(name), toWK(elementID), time);
}
+
+JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef)
+{
+ // FIXME: Is there a way to get this and know that it's a JSGlobalContextRef?
+ // The const_cast here is a bit ugly.
+ return const_cast<JSGlobalContextRef>(toRef(toWK(frameRef)->coreFrame()->script()->globalObject(mainThreadNormalWorld())->globalExec()));
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
index 3208988..ada909d 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
@@ -26,6 +26,7 @@
#ifndef WKBundleFrame_h
#define WKBundleFrame_h
+#include <JavaScriptCore/JavaScript.h>
#include <WebKit2/WKBase.h>
#include <WebKit2/WKBundleBase.h>
@@ -39,6 +40,8 @@ extern "C" {
WK_EXPORT bool WKBundleFrameIsMainFrame(WKBundleFrameRef frame);
+WK_EXPORT JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frame);
+
WK_EXPORT WKURLRef WKBundleFrameGetURL(WKBundleFrameRef frame);
WK_EXPORT WKStringRef WKBundleFrameCopyInnerText(WKBundleFrameRef frame);
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
index a73ef43..b000177 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
@@ -43,7 +43,7 @@ typedef void (*WKBundlePageDidCommitLoadForFrameCallback)(WKBundlePageRef page,
typedef void (*WKBundlePageDidFinishLoadForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
typedef void (*WKBundlePageDidFailLoadWithErrorForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo); // FIXME: Add WKErrorRef.
typedef void (*WKBundlePageDidReceiveTitleForFrameCallback)(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo);
-typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo);
+typedef void (*WKBundlePageDidClearWindowObjectForFrameCallback)(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo);
struct WKBundlePageLoaderClient {
int version;
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
index 777e1b3..bfc4ba2 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp
@@ -88,10 +88,10 @@ void InjectedBundlePageLoaderClient::didReceiveTitleForFrame(WebPage* page, cons
m_client.didReceiveTitleForFrame(toRef(page), toRef(title.impl()), toRef(frame), m_client.clientInfo);
}
-void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, JSContextRef ctx, JSObjectRef window)
+void InjectedBundlePageLoaderClient::didClearWindowObjectForFrame(WebPage* page, WebFrame* frame, JSGlobalContextRef context, JSObjectRef window)
{
if (m_client.didClearWindowObjectForFrame)
- m_client.didClearWindowObjectForFrame(toRef(page), toRef(frame), ctx, window, m_client.clientInfo);
+ m_client.didClearWindowObjectForFrame(toRef(page), toRef(frame), context, window, m_client.clientInfo);
}
} // namespace WebKit
diff --git a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
index 81eda41..59782a5 100644
--- a/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
+++ b/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h
@@ -50,7 +50,7 @@ public:
void didFinishLoadForFrame(WebPage*, WebFrame*);
void didFailLoadWithErrorForFrame(WebPage*, WebFrame*);
void didReceiveTitleForFrame(WebPage*, const WebCore::String&, WebFrame*);
- void didClearWindowObjectForFrame(WebPage*, WebFrame*, JSContextRef, JSObjectRef);
+ void didClearWindowObjectForFrame(WebPage*, WebFrame*, JSGlobalContextRef, JSObjectRef);
private:
WKBundlePageLoaderClient m_client;
diff --git a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
index 76c05c6..60ea7ab 100644
--- a/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -870,7 +870,9 @@ void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld*
if (world != mainThreadNormalWorld())
return;
- JSContextRef context = toRef(m_frame->coreFrame()->script()->globalObject(world)->globalExec());
+ // FIXME: Is there a way to get this and know that it's a JSGlobalContextRef?
+ // The const_cast here is a bit ugly.
+ JSGlobalContextRef context = const_cast<JSGlobalContextRef>(toRef(m_frame->coreFrame()->script()->globalObject(world)->globalExec()));
JSObjectRef windowObject = toRef(m_frame->coreFrame()->script()->globalObject(world));
webPage->injectedBundleLoaderClient().didClearWindowObjectForFrame(webPage, m_frame, context, windowObject);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1423d88..1e0082c 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,37 @@
+2010-07-21 Darin Adler <darin at apple.com>
+
+ Reviewed by Sam Weinig.
+
+ WebKitTestRunner needs to support dumping of scroll position
+ https://bugs.webkit.org/show_bug.cgi?id=42514
+
+ * MiniBrowser/mac/WebBundle/WebBundleMain.m:
+ (_didClearWindowForFrame): Use JSGlobalContextRef instead of JSContextRef.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+ (WTR::InjectedBundlePage::_didClearWindowForFrame): Use JSGlobalContextRef
+ instead of JSContextRef.
+ (WTR::InjectedBundlePage::dump): Call dumpFrameScrollPosition when appropriate.
+ (WTR::numericWindowProperty): Added. Helper for dumpFrameScrollPosition.
+ (WTR::InjectedBundlePage::dumpFrameScrollPosition): Added.
+ (WTR::InjectedBundlePage::didClearWindowForFrame): Use JSGlobalContextRef
+ instead of JSContextRef.
+
+ * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Removed names from
+ arguments that simply repeat the argument type. Added dumpFrameScrollPosition.
+
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+ (WTR::LayoutTestController::shouldDumpDOMAsWebArchive): Added. Currently
+ returns false.
+ (WTR::LayoutTestController::shouldDumpSourceAsWebArchive): Added. Currently
+ returns false.
+ (WTR::LayoutTestController::shouldDumpFrameScrollPositions): Added. Matches
+ the logic in DumpRenderTree.
+
+ * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Updated for above changes.
+
+ * WebKitTestRunner/WebKitTestRunner.xcodeproj: Added property svn:ignore.
+
2010-07-21 Kevin Ollivier <kevino at theolliviers.com>
[wx] Build fix, adding the WebCore/bindings/generic dir to the list of build dirs.
diff --git a/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m b/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m
index f36aaae..4eea646 100644
--- a/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m
+++ b/WebKitTools/MiniBrowser/mac/WebBundle/WebBundleMain.m
@@ -65,7 +65,7 @@ void _didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleF
{
}
-void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo)
+void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
{
CFURLRef cfURL = WKURLCopyCFURL(0, WKBundleFrameGetURL(WKBundlePageGetMainFrame(page)));
LOG(@"WKBundlePageClient - _didClearWindowForFrame %@", [(NSURL *)cfURL absoluteString]);
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index cbba470..13aacc5 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -121,9 +121,9 @@ void InjectedBundlePage::_didReceiveTitleForFrame(WKBundlePageRef page, WKString
static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didReceiveTitleForFrame(title, frame);
}
-void InjectedBundlePage::_didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo)
+void InjectedBundlePage::_didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window, const void *clientInfo)
{
- static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, ctx, window);
+ static_cast<InjectedBundlePage*>(const_cast<void*>(clientInfo))->didClearWindowForFrame(frame, context, window);
}
void InjectedBundlePage::didStartProvisionalLoadForFrame(WKBundleFrameRef frame)
@@ -158,9 +158,34 @@ void InjectedBundlePage::dump()
OwnPtr<Vector<char> > utf8externalRepresentation = WKStringToUTF8(externalRepresentation.get());
InjectedBundle::shared().os() << utf8externalRepresentation->data();
}
+
+ if (InjectedBundle::shared().layoutTestController()->shouldDumpFrameScrollPositions())
+ dumpFrameScrollPosition(WKBundlePageGetMainFrame(m_page));
+
InjectedBundle::shared().done();
}
+static double numericWindowProperty(WKBundleFrameRef frame, const char* propertyName)
+{
+ JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame);
+ JSObjectRef window = JSContextGetGlobalObject(context);
+ JSValueRef exception = 0;
+ JSStringRef propertyNameString = JSStringCreateWithUTF8CString(propertyName);
+ JSValueRef value = JSObjectGetProperty(context, window, propertyNameString, &exception);
+ JSStringRelease(propertyNameString);
+ if (exception)
+ return 0;
+ return JSValueToNumber(context, value, &exception);
+}
+
+void InjectedBundlePage::dumpFrameScrollPosition(WKBundleFrameRef frame)
+{
+ double x = numericWindowProperty(frame, "pageXOffset");
+ double y = numericWindowProperty(frame, "pageYOffset");
+ if (fabs(x) > 0.00000001 || fabs(y) > 0.00000001)
+ InjectedBundle::shared().os() << "scrolled to " << x << "," << y << "\n";
+}
+
void InjectedBundlePage::didFinishLoadForFrame(WKBundleFrameRef frame)
{
if (!WKBundleFrameIsMainFrame(frame))
@@ -188,10 +213,10 @@ void InjectedBundlePage::didReceiveTitleForFrame(WKStringRef title, WKBundleFram
{
}
-void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window)
+void InjectedBundlePage::didClearWindowForFrame(WKBundleFrameRef frame, JSGlobalContextRef context, JSObjectRef window)
{
JSValueRef exception = 0;
- InjectedBundle::shared().layoutTestController()->makeWindowObject(ctx, window, &exception);
+ InjectedBundle::shared().layoutTestController()->makeWindowObject(context, window, &exception);
}
// UI Client Callbacks
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index bce9d2c..99ac9ca 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -42,35 +42,37 @@ public:
private:
// Loader Client
- static void _didStartProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didCommitLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didFinishLoadForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didFailLoadWithErrorForFrame(WKBundlePageRef page, WKBundleFrameRef frame, const void *clientInfo);
- static void _didReceiveTitleForFrame(WKBundlePageRef page, WKStringRef title, WKBundleFrameRef frame, const void *clientInfo);
- static void _didClearWindowForFrame(WKBundlePageRef page, WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window, const void *clientInfo);
- void didStartProvisionalLoadForFrame(WKBundleFrameRef frame);
- void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef frame);
- void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef frame);
- void didCommitLoadForFrame(WKBundleFrameRef frame);
- void didFinishLoadForFrame(WKBundleFrameRef frame);
- void didFailLoadWithErrorForFrame(WKBundleFrameRef frame);
- void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef frame);
- void didClearWindowForFrame(WKBundleFrameRef frame, JSContextRef ctx, JSObjectRef window);
+ static void _didStartProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didReceiveServerRedirectForProvisionalLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didFailProvisionalLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didCommitLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didFinishLoadForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didFailLoadWithErrorForFrame(WKBundlePageRef, WKBundleFrameRef, const void* clientInfo);
+ static void _didReceiveTitleForFrame(WKBundlePageRef, WKStringRef title, WKBundleFrameRef, const void* clientInfo);
+ static void _didClearWindowForFrame(WKBundlePageRef, WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window, const void* clientInfo);
+ void didStartProvisionalLoadForFrame(WKBundleFrameRef);
+ void didReceiveServerRedirectForProvisionalLoadForFrame(WKBundleFrameRef);
+ void didFailProvisionalLoadWithErrorForFrame(WKBundleFrameRef);
+ void didCommitLoadForFrame(WKBundleFrameRef);
+ void didFinishLoadForFrame(WKBundleFrameRef);
+ void didFailLoadWithErrorForFrame(WKBundleFrameRef);
+ void didReceiveTitleForFrame(WKStringRef title, WKBundleFrameRef);
+ void didClearWindowForFrame(WKBundleFrameRef, JSGlobalContextRef, JSObjectRef window);
// UI Client
- static void _willAddMessageToConsole(WKBundlePageRef page, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
- static void _willSetStatusbarText(WKBundlePageRef page, WKStringRef statusbarText, const void* clientInfo);
- static void _willRunJavaScriptAlert(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
- static void _willRunJavaScriptConfirm(WKBundlePageRef page, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
- static void _willRunJavaScriptPrompt(WKBundlePageRef page, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willAddMessageToConsole(WKBundlePageRef, WKStringRef message, uint32_t lineNumber, const void* clientInfo);
+ static void _willSetStatusbarText(WKBundlePageRef, WKStringRef statusbarText, const void* clientInfo);
+ static void _willRunJavaScriptAlert(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptConfirm(WKBundlePageRef, WKStringRef message, WKBundleFrameRef frame, const void* clientInfo);
+ static void _willRunJavaScriptPrompt(WKBundlePageRef, WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef frame, const void* clientInfo);
void willAddMessageToConsole(WKStringRef message, uint32_t lineNumber);
void willSetStatusbarText(WKStringRef statusbarText);
void willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef);
void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef);
void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef);
+ void dumpFrameScrollPosition(WKBundleFrameRef);
+
WKBundlePageRef m_page;
bool m_isLoading;
};
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index fafa1e3..fb06310 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -124,6 +124,21 @@ bool LayoutTestController::pauseAnimationAtTimeOnElementWithId(JSStringRef anima
return WKBundleFramePauseAnimationOnElementWithId(mainFrame, nameWK.get(), idWK.get(), time);
}
+bool LayoutTestController::shouldDumpDOMAsWebArchive() const
+{
+ return false;
+}
+
+bool LayoutTestController::shouldDumpSourceAsWebArchive() const
+{
+ return false;
+}
+
+bool LayoutTestController::shouldDumpFrameScrollPositions() const
+{
+ return !shouldDumpAsText() && !shouldDumpDOMAsWebArchive() && !shouldDumpSourceAsWebArchive();
+}
+
// Object Creation
void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index f9585a3..c92d17f 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -44,11 +44,14 @@ public:
void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
- bool shouldDumpAsText() const { return m_dumpAsText; }
void dumpAsText() { m_dumpAsText = true; }
+ void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
+ bool shouldDumpAsText() const { return m_dumpAsText; }
+ bool shouldDumpDOMAsWebArchive() const;
+ bool shouldDumpFrameScrollPositions() const;
+ bool shouldDumpSourceAsWebArchive() const;
bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
- void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
bool waitToDump() const { return m_waitToDump; }
void waitToDumpWatchdogTimerFired();
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list