[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:23 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 0db36795eecce42669be79a4719069f6fb75c025
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 22 06:52:51 2010 +0000

    2010-07-21  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
            https://bugs.webkit.org/show_bug.cgi?id=42548
    
            * platform/mac-wk2/Skipped: Moved some tests into the correct section
            now that dumpChildFrameScrollPositions is no longer the reason they
            fail. Removed now-passing test. Resorted some of the tests.
    2010-07-21  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
            https://bugs.webkit.org/show_bug.cgi?id=42548
    
            * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
            * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
            (WTR::numericWindowPropertyValue): Renamed this and moved it up higher in the file.
            (WTR::dumpFrameScrollPosition): Added argument telling whether to dump the frame name.
            Changed to a file-internal function instead of a member function.
            (WTR::dumpDescendantFrameScrollPositions): Added.
            (WTR::InjectedBundlePage::dumpAllFrameScrollPositions): Added.
            (WTR::InjectedBundlePage::dump): Changed to call dumpAllFrameScrollPositions when
            appropriate. Also streamlined all the WKStringToUTF8 call sites.
            (WTR::InjectedBundlePage::willAddMessageToConsole): Streamlined use of WKStringToUTF8.
            (WTR::InjectedBundlePage::willSetStatusbarText): Ditto.
            (WTR::InjectedBundlePage::willRunJavaScriptAlert): Ditto.
            (WTR::InjectedBundlePage::willRunJavaScriptConfirm): Ditto.
            (WTR::InjectedBundlePage::willRunJavaScriptPrompt): Ditto.
    
            * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Updated for above changes.
    
            * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
            (WTR::LayoutTestController::LayoutTestController): Initialize
            m_shouldDumpAllFrameScrollPositions.
            (WTR::LayoutTestController::shouldDumpMainFrameScrollPosition): Renamed from
            shouldDumpFrameScrollPositions.
    
            * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Reorganized the file a
            bit, added dumpChildFrameScrollPositions and shouldDumpAllFrameScrollPositions,
            and renamed shouldDumpFrameScrollPositions to shouldDumpMainFrameScrollPosition.
    2010-07-21  Darin Adler  <darin at apple.com>
    
            Reviewed by Sam Weinig.
    
            WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
            https://bugs.webkit.org/show_bug.cgi?id=42548
    
            Added WKBundleFrameCopyName.
    
            * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
            (WKBundleFrameCopyName): Added.
            * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
    
            * WebProcess/WebPage/WebFrame.cpp:
            (WebKit::WebFrame::name): Added.
            * WebProcess/WebPage/WebFrame.h: Ditto.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63877 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 5a86562..0d33bb0 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,14 @@
+2010-07-21  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
+        https://bugs.webkit.org/show_bug.cgi?id=42548
+
+        * platform/mac-wk2/Skipped: Moved some tests into the correct section
+        now that dumpChildFrameScrollPositions is no longer the reason they
+        fail. Removed now-passing test. Resorted some of the tests.
+
 2010-07-21  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Darin Adler.
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index cd816be..58500b5 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -1661,10 +1661,12 @@ http/tests/history/redirect-307.pl
 http/tests/history/redirect-js-location-2-seconds.html
 http/tests/incremental/frame-focus-before-load.html
 http/tests/navigation/anchor-basic.html
+http/tests/navigation/anchor-frames.html
 http/tests/navigation/anchor-goback.html
+http/tests/navigation/anchor-subframeload.html
 http/tests/navigation/back-to-slow-frame.html
-http/tests/navigation/document-location-click.html
 http/tests/navigation/document-location-click-timeout.html
+http/tests/navigation/document-location-click.html
 http/tests/navigation/document-location-mouseover.html
 http/tests/navigation/document-location-onload.html
 http/tests/navigation/dynamic-iframe-dynamic-form-back-entry.html
@@ -1687,8 +1689,8 @@ http/tests/navigation/metaredirect-goback.html
 http/tests/navigation/metaredirect-subframeload.html
 http/tests/navigation/multiple-back-forward-entries.html
 http/tests/navigation/onload-navigation-iframe-2.html
-http/tests/navigation/onload-navigation-iframe.html
 http/tests/navigation/onload-navigation-iframe-timeout.html
+http/tests/navigation/onload-navigation-iframe.html
 http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html
 http/tests/navigation/post-basic.html
 http/tests/navigation/post-frames.html
@@ -1706,13 +1708,14 @@ http/tests/navigation/redirect302-frames.html
 http/tests/navigation/redirect302-goback.html
 http/tests/navigation/redirect302-subframeload.html
 http/tests/navigation/relativeanchor-basic.html
+http/tests/navigation/relativeanchor-frames.html
 http/tests/navigation/relativeanchor-goback.html
 http/tests/navigation/restore-form-state-https.html
 http/tests/navigation/slowmetaredirect-basic.html
 http/tests/navigation/slowtimerredirect-basic.html
 http/tests/navigation/success200-basic.html
-http/tests/navigation/success200-frames.html
 http/tests/navigation/success200-frames-loadsame.html
+http/tests/navigation/success200-frames.html
 http/tests/navigation/success200-goback.html
 http/tests/navigation/success200-loadsame.html
 http/tests/navigation/success200-reload.html
@@ -2237,13 +2240,6 @@ 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
-
 # WebKitTestRunner needs layoutTestController.markerTextForListItem
 # <https://bugs.webkit.org/show_bug.cgi?id=42549>
 fast/lists/ol-nested-items.html
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 620590f..59e9e9f 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -2,6 +2,23 @@
 
         Reviewed by Sam Weinig.
 
+        WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
+        https://bugs.webkit.org/show_bug.cgi?id=42548
+
+        Added WKBundleFrameCopyName.
+
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp:
+        (WKBundleFrameCopyName): Added.
+        * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: Ditto.
+
+        * WebProcess/WebPage/WebFrame.cpp:
+        (WebKit::WebFrame::name): Added.
+        * WebProcess/WebPage/WebFrame.h: Ditto.
+
+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
 
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index 61cad2b..45a6644 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -72,3 +72,10 @@ JSGlobalContextRef WKBundleFrameGetJavaScriptContext(WKBundleFrameRef frameRef)
     // The const_cast here is a bit ugly.
     return const_cast<JSGlobalContextRef>(toRef(toWK(frameRef)->coreFrame()->script()->globalObject(mainThreadNormalWorld())->globalExec()));
 }
+
+WKStringRef WKBundleFrameCopyName(WKBundleFrameRef frameRef)
+{
+    WebCore::String string = toWK(frameRef)->name();
+    string.impl()->ref();
+    return toRef(string.impl());
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
index ada909d..97e4304 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.h
@@ -52,6 +52,8 @@ WK_EXPORT unsigned WKBundleFrameGetNumberOfActiveAnimations(WKBundleFrameRef fra
 
 WK_EXPORT bool WKBundleFramePauseAnimationOnElementWithId(WKBundleFrameRef frame, WKStringRef name, WKStringRef elementID, double time);
 
+WK_EXPORT WKStringRef WKBundleFrameCopyName(WKBundleFrameRef frame);
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.cpp b/WebKit2/WebProcess/WebPage/WebFrame.cpp
index 09e7743..109df71 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.cpp
+++ b/WebKit2/WebProcess/WebPage/WebFrame.cpp
@@ -163,6 +163,14 @@ bool WebFrame::isMainFrame() const
     return m_page->mainFrame() == this;
 }
 
+String WebFrame::name() const
+{
+    if (!m_coreFrame)
+        return String();
+
+    return m_coreFrame->tree()->name();
+}
+
 String WebFrame::url() const
 {
     if (!m_coreFrame)
diff --git a/WebKit2/WebProcess/WebPage/WebFrame.h b/WebKit2/WebProcess/WebPage/WebFrame.h
index 2d65be5..d39c4ad 100644
--- a/WebKit2/WebProcess/WebPage/WebFrame.h
+++ b/WebKit2/WebProcess/WebPage/WebFrame.h
@@ -65,6 +65,7 @@ public:
 
     // WKBundleFrame API functions
     bool isMainFrame() const;
+    WebCore::String name() const;
     WebCore::String url() const;
     WebCore::String innerText() const;
     PassRefPtr<ImmutableArray> childFrames();
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 1e0082c..26cf151 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -2,6 +2,40 @@
 
         Reviewed by Sam Weinig.
 
+        WebKitTestRunner needs layoutTestController.dumpChildFrameScrollPositions
+        https://bugs.webkit.org/show_bug.cgi?id=42548
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
+        (WTR::numericWindowPropertyValue): Renamed this and moved it up higher in the file.
+        (WTR::dumpFrameScrollPosition): Added argument telling whether to dump the frame name.
+        Changed to a file-internal function instead of a member function.
+        (WTR::dumpDescendantFrameScrollPositions): Added.
+        (WTR::InjectedBundlePage::dumpAllFrameScrollPositions): Added.
+        (WTR::InjectedBundlePage::dump): Changed to call dumpAllFrameScrollPositions when
+        appropriate. Also streamlined all the WKStringToUTF8 call sites.
+        (WTR::InjectedBundlePage::willAddMessageToConsole): Streamlined use of WKStringToUTF8.
+        (WTR::InjectedBundlePage::willSetStatusbarText): Ditto.
+        (WTR::InjectedBundlePage::willRunJavaScriptAlert): Ditto.
+        (WTR::InjectedBundlePage::willRunJavaScriptConfirm): Ditto.
+        (WTR::InjectedBundlePage::willRunJavaScriptPrompt): Ditto.
+
+        * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: Updated for above changes.
+
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::LayoutTestController): Initialize
+        m_shouldDumpAllFrameScrollPositions.
+        (WTR::LayoutTestController::shouldDumpMainFrameScrollPosition): Renamed from
+        shouldDumpFrameScrollPositions.
+
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Reorganized the file a
+        bit, added dumpChildFrameScrollPositions and shouldDumpAllFrameScrollPositions,
+        and renamed shouldDumpFrameScrollPositions to shouldDumpMainFrameScrollPosition.
+
+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
 
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
index 7da2e81..34784d0 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -26,18 +26,21 @@
 module WTR {
 
     interface LayoutTestController {
+        // The basics.
         void dumpAsText();
-        void dumpStatusCallbacks();
-
         void waitUntilDone();
         void notifyDone();
 
-        // Repaint testing
+        // Other kinds of dumping.
+        void dumpChildFrameScrollPositions();
+        void dumpStatusCallbacks();
+
+        // Repaint testing.
         void testRepaint();
         void repaintSweepHorizontally();
         void display();
 
-        // Animation testing
+        // Animation testing.
         int numberOfActiveAnimations();
         boolean pauseAnimationAtTimeOnElementWithId(in DOMString animationName, in double time, in DOMString elementId);
     };
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
index 13aacc5..ed6c715 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
@@ -26,6 +26,8 @@
 #include "InjectedBundlePage.h"
 
 #include "InjectedBundle.h"
+#include <JavaScriptCore/JSRetainPtr.h>
+#include <WebKit2/WKArray.h>
 #include <WebKit2/WKBundleFrame.h>
 #include <WebKit2/WKBundlePagePrivate.h>
 #include <WebKit2/WKRetainPtr.h>
@@ -144,6 +146,52 @@ void InjectedBundlePage::didCommitLoadForFrame(WKBundleFrameRef frame)
 {
 }
 
+static double numericWindowPropertyValue(WKBundleFrameRef frame, const char* propertyName)
+{
+    JSGlobalContextRef context = WKBundleFrameGetJavaScriptContext(frame);
+    JSObjectRef window = JSContextGetGlobalObject(context);
+    JSValueRef exception = 0;
+    JSRetainPtr<JSStringRef> propertyNameString(Adopt, JSStringCreateWithUTF8CString(propertyName));
+    JSValueRef value = JSObjectGetProperty(context, window, propertyNameString.get(), &exception);
+    if (exception)
+        return 0;
+    return JSValueToNumber(context, value, &exception);
+}
+
+enum FrameNamePolicy { ShouldNotIncludeFrameName, ShouldIncludeFrameName };
+
+static void dumpFrameScrollPosition(WKBundleFrameRef frame, FrameNamePolicy shouldIncludeFrameName = ShouldNotIncludeFrameName)
+{
+    double x = numericWindowPropertyValue(frame, "pageXOffset");
+    double y = numericWindowPropertyValue(frame, "pageYOffset");
+    if (fabs(x) > 0.00000001 || fabs(y) > 0.00000001) {
+        if (shouldIncludeFrameName) {
+            WKRetainPtr<WKStringRef> name(AdoptWK, WKBundleFrameCopyName(frame));
+            InjectedBundle::shared().os() << "frame '" << WKStringToUTF8(name.get())->data() << "' ";
+        }
+        InjectedBundle::shared().os() << "scrolled to " << x << "," << y << "\n";
+    }
+}
+
+static void dumpDescendantFrameScrollPositions(WKBundleFrameRef frame)
+{
+    WKRetainPtr<WKArrayRef> childFrames(AdoptWK, WKBundleFrameCopyChildFrames(frame));
+    size_t size = WKArrayGetSize(childFrames.get());
+    for (size_t i = 0; i < size; ++i) {
+        // FIXME: I don't like that we have to const_cast here. Can we change WKArray?
+        WKBundleFrameRef subframe = static_cast<WKBundleFrameRef>(const_cast<void*>(WKArrayGetItemAtIndex(childFrames.get(), i)));
+        dumpFrameScrollPosition(subframe, ShouldIncludeFrameName);
+        dumpDescendantFrameScrollPositions(subframe);
+    }
+}
+
+void InjectedBundlePage::dumpAllFrameScrollPositions()
+{
+    WKBundleFrameRef frame = WKBundlePageGetMainFrame(m_page);
+    dumpFrameScrollPosition(frame);
+    dumpDescendantFrameScrollPositions(frame);
+}
+
 void InjectedBundlePage::dump()
 {
     InjectedBundle::shared().layoutTestController()->invalidateWaitToDumpWatchdog();
@@ -151,41 +199,20 @@ void InjectedBundlePage::dump()
     if (InjectedBundle::shared().layoutTestController()->shouldDumpAsText()) {
         // FIXME: Support dumping subframes when layoutTestController()->dumpChildFramesAsText() is true.
         WKRetainPtr<WKStringRef> innerText(AdoptWK, WKBundleFrameCopyInnerText(WKBundlePageGetMainFrame(m_page)));
-        OwnPtr<Vector<char> > utf8InnerText = WKStringToUTF8(innerText.get());
-        InjectedBundle::shared().os() << utf8InnerText->data() << "\n";
+        InjectedBundle::shared().os() << WKStringToUTF8(innerText.get())->data() << "\n";
     } else {
         WKRetainPtr<WKStringRef> externalRepresentation(AdoptWK, WKBundlePageCopyRenderTreeExternalRepresentation(m_page));
-        OwnPtr<Vector<char> > utf8externalRepresentation = WKStringToUTF8(externalRepresentation.get());
-        InjectedBundle::shared().os() << utf8externalRepresentation->data();
+        InjectedBundle::shared().os() << WKStringToUTF8(externalRepresentation.get())->data();
     }
 
-    if (InjectedBundle::shared().layoutTestController()->shouldDumpFrameScrollPositions())
+    if (InjectedBundle::shared().layoutTestController()->shouldDumpAllFrameScrollPositions())
+        dumpAllFrameScrollPositions();
+    else if (InjectedBundle::shared().layoutTestController()->shouldDumpMainFrameScrollPosition())
         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))
@@ -249,8 +276,7 @@ void InjectedBundlePage::_willRunJavaScriptPrompt(WKBundlePageRef page, WKString
 void InjectedBundlePage::willAddMessageToConsole(WKStringRef message, uint32_t lineNumber)
 {
     // FIXME: Strip file: urls.
-    OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
-    InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << utf8Message->data() << "\n";
+    InjectedBundle::shared().os() << "CONSOLE MESSAGE: line " << lineNumber << ": " << WKStringToUTF8(message)->data() << "\n";
 }
 
 void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
@@ -258,27 +284,22 @@ void InjectedBundlePage::willSetStatusbarText(WKStringRef statusbarText)
     if (!InjectedBundle::shared().layoutTestController()->shouldDumpStatusCallbacks())
         return;
 
-    OwnPtr<Vector<char> > utf8StatusbarText = WKStringToUTF8(statusbarText);
-    InjectedBundle::shared().os() << "UI DELEGATE STATUS CALLBACK: setStatusText:" << utf8StatusbarText->data() << "\n";
+    InjectedBundle::shared().os() << "UI DELEGATE STATUS CALLBACK: setStatusText:" << WKStringToUTF8(statusbarText)->data() << "\n";
 }
 
 void InjectedBundlePage::willRunJavaScriptAlert(WKStringRef message, WKBundleFrameRef)
 {
-    OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
-    InjectedBundle::shared().os() << "ALERT: " << utf8Message->data() << "\n";
+    InjectedBundle::shared().os() << "ALERT: " << WKStringToUTF8(message)->data() << "\n";
 }
 
 void InjectedBundlePage::willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef)
 {
-    OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
-    InjectedBundle::shared().os() << "CONFIRM: " << utf8Message->data() << "\n";
+    InjectedBundle::shared().os() << "CONFIRM: " << WKStringToUTF8(message)->data() << "\n";
 }
 
 void InjectedBundlePage::willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef)
 {
-    OwnPtr<Vector<char> > utf8Message = WKStringToUTF8(message);
-    OwnPtr<Vector<char> > utf8DefaultValue = WKStringToUTF8(defaultValue);
-    InjectedBundle::shared().os() << "PROMPT: " << utf8Message->data() << ", default text: " << utf8DefaultValue->data() <<  "\n";
+    InjectedBundle::shared().os() << "PROMPT: " << WKStringToUTF8(message)->data() << ", default text: " << WKStringToUTF8(defaultValue)->data() <<  "\n";
 }
 
 } // namespace WTR
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
index 99ac9ca..7c7ddb3 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
@@ -71,7 +71,7 @@ private:
     void willRunJavaScriptConfirm(WKStringRef message, WKBundleFrameRef);
     void willRunJavaScriptPrompt(WKStringRef message, WKStringRef defaultValue, WKBundleFrameRef);
 
-    void dumpFrameScrollPosition(WKBundleFrameRef);
+    void dumpAllFrameScrollPositions();
 
     WKBundlePageRef m_page;
     bool m_isLoading;
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index fb06310..8b1fe1c 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -43,6 +43,7 @@ PassRefPtr<LayoutTestController> LayoutTestController::create(const std::string&
 
 LayoutTestController::LayoutTestController(const std::string& testPathOrURL)
     : m_dumpAsText(false)
+    , m_shouldDumpAllFrameScrollPositions(false)
     , m_dumpStatusCallbacks(false)
     , m_waitToDump(false)
     , m_testRepaint(false)
@@ -134,7 +135,7 @@ bool LayoutTestController::shouldDumpSourceAsWebArchive() const
     return false;
 }
 
-bool LayoutTestController::shouldDumpFrameScrollPositions() const
+bool LayoutTestController::shouldDumpMainFrameScrollPosition() const
 {
     return !shouldDumpAsText() && !shouldDumpDOMAsWebArchive() && !shouldDumpSourceAsWebArchive();
 }
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index c92d17f..b9c7d2d 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -37,39 +37,47 @@ namespace WTR {
 class LayoutTestController : public JSWrappable {
 public:
     static PassRefPtr<LayoutTestController> create(const std::string& testPathOrURL);
-    ~LayoutTestController();
+    virtual ~LayoutTestController();
 
     // JSWrappable
-    JSClassRef wrapperClass();
+    virtual JSClassRef wrapperClass();
 
-    void makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception);
+    void makeWindowObject(JSContextRef, JSObjectRef windowObject, JSValueRef* exception);
 
+    // The basics.
     void dumpAsText() { m_dumpAsText = true; }
+    void waitUntilDone();
+    void notifyDone();
+
+    // Other kinds of dumping.
+    void dumpChildFrameScrollPositions() { m_shouldDumpAllFrameScrollPositions = true; }
     void dumpStatusCallbacks() { m_dumpStatusCallbacks = true; }
 
+    // Repaint testing.
+    void testRepaint() { m_testRepaint = true; }
+    void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
+    void display();
+
+    // Animation testing.
+    unsigned numberOfActiveAnimations() const;
+    bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
+
+    bool shouldDumpAllFrameScrollPositions() const { return m_shouldDumpAllFrameScrollPositions; }
     bool shouldDumpAsText() const { return m_dumpAsText; }
     bool shouldDumpDOMAsWebArchive() const;
-    bool shouldDumpFrameScrollPositions() const;
+    bool shouldDumpMainFrameScrollPosition() const;
     bool shouldDumpSourceAsWebArchive() const;
     bool shouldDumpStatusCallbacks() const { return m_dumpStatusCallbacks; }
 
     bool waitToDump() const { return m_waitToDump; }
     void waitToDumpWatchdogTimerFired();
     void invalidateWaitToDumpWatchdog();
-    void waitUntilDone();
-    void notifyDone();
-
-    void testRepaint() { m_testRepaint = true; }
-    void repaintSweepHorizontally() { m_testRepaintSweepHorizontally = true; }
-    void display();
-
-    unsigned numberOfActiveAnimations() const;
-    bool pauseAnimationAtTimeOnElementWithId(JSStringRef animationName, double time, JSStringRef elementId);
 
 private:
     LayoutTestController(const std::string& testPathOrURL);
 
     bool m_dumpAsText;
+    bool m_shouldDumpAllFrameScrollPositions;
     bool m_dumpStatusCallbacks;
     bool m_waitToDump; // True if waitUntilDone() has been called, but notifyDone() has not yet been called.
     bool m_testRepaint;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list