Remove DRT/WTR implementations of layerTreeAsText
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 17:17:50 +0000 (17:17 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Oct 2012 17:17:50 +0000 (17:17 +0000)
https://bugs.webkit.org/show_bug.cgi?id=98697

Reviewed by Tim Horton, James Robinson, Alexey Proskuryakov.

Tools:

Remove code related to layerTreeAsText(), which is now on window.internals.

* DumpRenderTree/TestRunner.cpp:
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
(TestRunner):
* DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
* DumpRenderTree/chromium/DRTTestRunner.cpp:
(DRTTestRunner::DRTTestRunner):
* DumpRenderTree/chromium/DRTTestRunner.h:
(DRTTestRunner):
* DumpRenderTree/efl/TestRunnerEfl.cpp:
* DumpRenderTree/gtk/TestRunnerGtk.cpp:
* DumpRenderTree/mac/TestRunnerMac.mm:
* DumpRenderTree/qt/TestRunnerQt.cpp:
* DumpRenderTree/qt/TestRunnerQt.h:
(TestRunner):
* DumpRenderTree/win/TestRunnerWin.cpp:
* DumpRenderTree/wx/TestRunnerWx.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.h:

LayoutTests:

Fix a couple of tests missed in the previous chnage.

* compositing/geometry/preserve-3d-switching.html:
* compositing/visibility/visibility-image-layers-dynamic.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@130776 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
LayoutTests/ChangeLog
LayoutTests/compositing/geometry/preserve-3d-switching.html
LayoutTests/compositing/visibility/visibility-image-layers-dynamic.html
Tools/ChangeLog
Tools/DumpRenderTree/TestRunner.cpp
Tools/DumpRenderTree/TestRunner.h
Tools/DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp
Tools/DumpRenderTree/chromium/DRTTestRunner.cpp
Tools/DumpRenderTree/chromium/DRTTestRunner.h
Tools/DumpRenderTree/efl/TestRunnerEfl.cpp
Tools/DumpRenderTree/gtk/TestRunnerGtk.cpp
Tools/DumpRenderTree/mac/TestRunnerMac.mm
Tools/DumpRenderTree/qt/TestRunnerQt.cpp
Tools/DumpRenderTree/qt/TestRunnerQt.h
Tools/DumpRenderTree/win/TestRunnerWin.cpp
Tools/DumpRenderTree/wx/TestRunnerWx.cpp
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

index 61a476d..f2b20f5 100644 (file)
@@ -1,3 +1,15 @@
+2012-10-08  Simon Fraser  <simon.fraser@apple.com>
+
+        Remove DRT/WTR implementations of layerTreeAsText
+        https://bugs.webkit.org/show_bug.cgi?id=98697
+
+        Reviewed by Tim Horton, James Robinson, Alexey Proskuryakov.
+
+        Fix a couple of tests missed in the previous chnage.
+
+        * compositing/geometry/preserve-3d-switching.html:
+        * compositing/visibility/visibility-image-layers-dynamic.html:
+
 2012-10-09  Pravin D  <pravind.2k4@gmail.com>
 
         max-width property is does not overriding the width properties for css tables(display:table)
index 9051d8f..83005a3 100644 (file)
             setTimeout(function() {
                 document.getElementById("parent").style.webkitTransformStyle = "preserve-3d";
                 if (window.testRunner) {
-                    if (testRunner.layerTreeAsText) {
-                        var layerTree = window.internals.layerTreeAsText(document);
-                        document.getElementById("layerTree").innerHTML = "<pre>" + layerTree + "</pre>";
-                    }
+                    var layerTree = window.internals.layerTreeAsText(document);
+                    document.getElementById("layerTree").innerHTML = "<pre>" + layerTree + "</pre>";
                     testRunner.notifyDone();
                 }
             }, timeout);
index b36fd2d..eb46ec5 100644 (file)
         firstImage.style.visibility = 'visible';
 
         if (window.testRunner)
-          document.getElementById('layers2').innerText = testRunner.layerTreeAsText();
+          document.getElementById('layers2').innerText = window.internals.layerTreeAsText(document);
 
           window.setTimeout(function() {
             var secondContainer = document.querySelectorAll('.container')[1];
             secondContainer.style.visibility = 'visible';
 
             if (window.testRunner) {
-              document.getElementById('layers3').innerText = testRunner.layerTreeAsText();
+              document.getElementById('layers3').innerText = window.internals.layerTreeAsText(document);
               testRunner.notifyDone();
             }
           }, 0);
index 0aa6594..4acd193 100644 (file)
@@ -1,3 +1,32 @@
+2012-10-08  Simon Fraser  <simon.fraser@apple.com>
+
+        Remove DRT/WTR implementations of layerTreeAsText
+        https://bugs.webkit.org/show_bug.cgi?id=98697
+
+        Reviewed by Tim Horton, James Robinson, Alexey Proskuryakov.
+
+        Remove code related to layerTreeAsText(), which is now on window.internals.
+
+        * DumpRenderTree/TestRunner.cpp:
+        (TestRunner::staticFunctions):
+        * DumpRenderTree/TestRunner.h:
+        (TestRunner):
+        * DumpRenderTree/blackberry/TestRunnerBlackBerry.cpp:
+        * DumpRenderTree/chromium/DRTTestRunner.cpp:
+        (DRTTestRunner::DRTTestRunner):
+        * DumpRenderTree/chromium/DRTTestRunner.h:
+        (DRTTestRunner):
+        * DumpRenderTree/efl/TestRunnerEfl.cpp:
+        * DumpRenderTree/gtk/TestRunnerGtk.cpp:
+        * DumpRenderTree/mac/TestRunnerMac.mm:
+        * DumpRenderTree/qt/TestRunnerQt.cpp:
+        * DumpRenderTree/qt/TestRunnerQt.h:
+        (TestRunner):
+        * DumpRenderTree/win/TestRunnerWin.cpp:
+        * DumpRenderTree/wx/TestRunnerWx.cpp:
+        * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+        * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
 2012-10-09  Zoltan Horvath  <zoltan@webkit.org>
 
         Unreviewed. Remove myself from QtWebKit2 subscriptions.
index 12a194d..fe28a29 100644 (file)
@@ -699,13 +699,6 @@ static JSValueRef computedStyleIncludingVisitedInfoCallback(JSContextRef context
     return controller->computedStyleIncludingVisitedInfo(context, arguments[0]);
 }
 
-static JSValueRef layerTreeAsTextCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    // Has mac & windows implementation
-    TestRunner* controller = static_cast<TestRunner*>(JSObjectGetPrivate(thisObject));
-    return JSValueMakeString(context, controller->layerTreeAsText().get());
-}
-
 static JSValueRef notifyDoneCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     // Has mac & windows implementation
@@ -2244,7 +2237,6 @@ JSStaticFunction* TestRunner::staticFunctions()
         { "ignoreLegacyWebNotificationPermissionRequests", ignoreLegacyWebNotificationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "keepWebHistory", keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "layerTreeAsText", layerTreeAsTextCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "numberOfPendingGeolocationPermissionRequests", numberOfPendingGeolocationPermissionRequestsCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "markerTextForListItem", markerTextForListItemCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index 745c969..fa76c76 100644 (file)
@@ -336,8 +336,6 @@ public:
     // Simulate a request an embedding application could make, populating per-session credential storage.
     void authenticateSession(JSStringRef url, JSStringRef username, JSStringRef password);
 
-    JSRetainPtr<JSStringRef> layerTreeAsText() const;
-
     JSRetainPtr<JSStringRef> markerTextForListItem(JSContextRef, JSValueRef nodeObject) const;
 
     JSValueRef originsWithLocalStorage(JSContextRef);
index 143eef6..b595a2f 100644 (file)
@@ -585,12 +585,6 @@ JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, J
     return DumpRenderTreeSupport::computedStyleIncludingVisitedInfo(context, value);
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    notImplemented();
-    return 0;
-}
-
 JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     WebCore::Element* element = toElement(toJS(toJS(context), nodeObject));
index f4f3aed..8aee7c5 100644 (file)
@@ -166,7 +166,6 @@ DRTTestRunner::DRTTestRunner(TestShell* shell)
     bindMethod("findString", &DRTTestRunner::findString);
     bindMethod("isCommandEnabled", &DRTTestRunner::isCommandEnabled);
     bindMethod("hasCustomPageSizeStyle", &DRTTestRunner::hasCustomPageSizeStyle);
-    bindMethod("layerTreeAsText", &DRTTestRunner::layerTreeAsText);
     bindMethod("loseCompositorContext", &DRTTestRunner::loseCompositorContext);
     bindMethod("markerTextForListItem", &DRTTestRunner::markerTextForListItem);
     bindMethod("notifyDone", &DRTTestRunner::notifyDone);
@@ -1904,11 +1903,6 @@ void DRTTestRunner::startSpeechInput(const CppArgumentList& arguments, CppVarian
     input->startSpeechInput();
 }
 
-void DRTTestRunner::layerTreeAsText(const CppArgumentList& args, CppVariant* result)
-{
-    result->set(m_shell->webView()->mainFrame()->layerTreeAsText(m_showDebugLayerTree).utf8());
-}
-
 void DRTTestRunner::loseCompositorContext(const CppArgumentList& args, CppVariant*)
 {
     int numTimes;
index 55940ac..3041b86 100644 (file)
@@ -355,8 +355,6 @@ public:
 #endif
     void startSpeechInput(const CppArgumentList&, CppVariant*);
 
-    void layerTreeAsText(const CppArgumentList& args, CppVariant* result);
-
     void loseCompositorContext(const CppArgumentList& args, CppVariant* result);
 
     void markerTextForListItem(const CppArgumentList&, CppVariant*);
index 8fc926a..8c0c1e4 100644 (file)
@@ -117,13 +117,6 @@ JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, J
     return DumpRenderTreeSupportEfl::computedStyleIncludingVisitedInfo(context, value);
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    String result = DumpRenderTreeSupportEfl::layerTreeAsText(browser->mainFrame());
-
-    return JSRetainPtr<JSStringRef>(Adopt, JSStringCreateWithUTF8CString(result.utf8().data()));
-}
-
 size_t TestRunner::webHistoryItemCount()
 {
     const Ewk_History* history = ewk_view_history_get(browser->mainView());
index 6c9e11f..32d3dd5 100644 (file)
@@ -112,13 +112,6 @@ JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, J
     return DumpRenderTreeSupportGtk::computedStyleIncludingVisitedInfo(context, value);
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    // FIXME: implement
-    JSRetainPtr<JSStringRef> string(Adopt, JSStringCreateWithUTF8CString(""));
-    return string;
-}
-
 size_t TestRunner::webHistoryItemCount()
 {
     WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
index c0e084e..b520e09 100644 (file)
@@ -275,12 +275,6 @@ JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, J
     return [[mainFrame webView] _computedStyleIncludingVisitedInfo:context forElement:value];
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    JSRetainPtr<JSStringRef> string(Adopt, JSStringCreateWithCFString((CFStringRef)[mainFrame _layerTreeAsText]));
-    return string;
-}
-
 JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     DOMElement *element = [DOMElement _DOMElementFromJSContext:context value:nodeObject];
index 0cec380..ef72a67 100644 (file)
@@ -940,11 +940,6 @@ void TestRunner::setAutomaticLinkDetectionEnabled(bool)
     // FIXME: Implement this.
 }
 
-QString TestRunner::layerTreeAsText()
-{
-    return DumpRenderTreeSupportQt::layerTreeAsText(m_drt->webPage()->mainFrame());
-}
-
 void TestRunner::setTextDirection(const QString& directionName)
 {
     if (directionName == "auto")
index 311bcd9..9c58f1d 100644 (file)
@@ -270,7 +270,6 @@ public Q_SLOTS:
     long long localStorageDiskUsageForOrigin(const QString& originIdentifier);
     void observeStorageTrackerNotifications(unsigned number);
     void syncLocalStorage();
-    QString layerTreeAsText();
     void setTextDirection(const QString& directionName);
     void goBack();
     void setDefersLoading(bool);
index 5d59f2b..3e48ade 100644 (file)
@@ -179,21 +179,6 @@ JSValueRef TestRunner::computedStyleIncludingVisitedInfo(JSContextRef context, J
     return JSValueMakeUndefined(context);
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
-    if (!framePrivate)
-        return false;
-
-    BSTR textBSTR = 0;
-    HRESULT hr = framePrivate->layerTreeAsText(&textBSTR);
-
-    wstring text(textBSTR, SysStringLen(textBSTR));
-    SysFreeString(textBSTR);
-    JSRetainPtr<JSStringRef> textValueJS(Adopt, JSStringCreateWithCharacters(text.data(), text.length()));
-    return textValueJS;
-}
-
 JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     COMPtr<IWebView> webView;
index 874aa67..35a9137 100644 (file)
@@ -497,11 +497,6 @@ bool TestRunner::callShouldCloseOnWebView()
     return false;
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    return 0;
-}
-
 JSRetainPtr<JSStringRef> TestRunner::markerTextForListItem(JSContextRef context, JSValueRef nodeObject) const
 {
     return 0;
index 3212e92..0f86c27 100644 (file)
@@ -121,9 +121,6 @@ module WTR {
         void disallowIncreaseForApplicationCacheQuota();
         object originsWithApplicationCache();
 
-        // Compositing testing.
-        DOMString layerTreeAsText();
-
         // Text search testing.
         boolean findString(in DOMString target, in object optionsArray);
 
index 0fdc374..cc2f06d 100644 (file)
@@ -193,13 +193,6 @@ void TestRunner::suspendAnimations()
     WKBundleFrameSuspendAnimations(mainFrame);
 }
 
-JSRetainPtr<JSStringRef> TestRunner::layerTreeAsText() const
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    WKRetainPtr<WKStringRef> text(AdoptWK, WKBundleFrameCopyLayerTreeAsText(mainFrame));
-    return toJS(text);
-}
-
 void TestRunner::addUserScript(JSStringRef source, bool runAtStart, bool allFrames)
 {
     WKRetainPtr<WKStringRef> sourceWK = toWK(source);
index 0b36b8f..e808634 100644 (file)
@@ -132,9 +132,6 @@ public:
     bool pauseTransitionAtTimeOnElementWithId(JSStringRef propertyName, double time, JSStringRef elementId);
     void suspendAnimations();
     
-    // Compositing testing.
-    JSRetainPtr<JSStringRef> layerTreeAsText() const;
-    
     // UserContent testing.
     void addUserScript(JSStringRef source, bool runAtStart, bool allFrames);
     void addUserStyleSheet(JSStringRef source, bool allFrames);