REGRESSION (r117428): WebKit API/SPI was removed
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 17:27:50 +0000 (17:27 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 May 2012 17:27:50 +0000 (17:27 +0000)
https://bugs.webkit.org/show_bug.cgi?id=86748

Reverted r117428.

.:

* Source/autotools/symbols.filter:

Source/WebCore:

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setMediaPlaybackRequiresUserGesture):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/chromium:

* public/WebView.h:
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::setDomainRelaxationForbidden):
(WebKit):
* src/WebViewImpl.h:
(WebViewImpl):

Source/WebKit/gtk:

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
(DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme):
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/mac:

* WebKit.order:
* WebView/WebView.mm:
(+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
* WebView/WebViewPrivate.h:

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme):
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::setDomainRelaxationForbiddenForURLScheme):
* WebView.h:
(WebView):

Source/WebKit2:

* win/WebKit2.def:

Tools:

* DumpRenderTree/LayoutTestController.cpp:
(setDomainRelaxationForbiddenForURLSchemeCallback):
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
(LayoutTestController::setDomainRelaxationForbiddenForURLScheme):

LayoutTests:

* http/tests/security/setDomainRelaxationForbiddenForURLScheme.html:

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

41 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/http/tests/security/setDomainRelaxationForbiddenForURLScheme.html
Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/public/WebView.h
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.h
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebKit.order
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/mac/WebView/WebViewPrivate.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebViewPrivate.idl
Source/WebKit/win/WebView.cpp
Source/WebKit/win/WebView.h
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/autotools/symbols.filter
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp

index 51df024..e28abdd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * Source/autotools/symbols.filter:
+
 2012-05-17  Thiago Marcos P. Santos  <thiago.santos@intel.com>
 
         [EFL] Fix link error caused by not directly linking with edbus
index c9342cb..8474da6 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * http/tests/security/setDomainRelaxationForbiddenForURLScheme.html:
+
 2012-05-17  Zan Dobersek  <zandobersek@gmail.com>
 
         Unreviewed, adding GTK baselines for new tests added in r115641, r116975 and r117339.
index 552910a..b631f97 100644 (file)
@@ -36,8 +36,8 @@
 
         log("Forbidding domain relaxation for the http: scheme");
 
-        if (window.internals)
-            internals.settings.setDomainRelaxationForbiddenForURLScheme(true, "http");
+        if (window.layoutTestController)
+            layoutTestController.setDomainRelaxationForbiddenForURLScheme(true, "http");
 
         var exception;
         try {
@@ -53,8 +53,8 @@
 
         domainShouldBe("0.0.1");
 
-        if (window.internals)
-            internals.settings.setDomainRelaxationForbiddenForURLScheme(false, "http");
+        if (window.layoutTestController)
+            layoutTestController.setDomainRelaxationForbiddenForURLScheme(false, "http");
 
         log("Allowing domain relaxation for the http: scheme");
 
 
         log("Forbidding domain relaxation for the not-http: scheme");
 
-        if (window.internals)
-            internals.settings.setDomainRelaxationForbiddenForURLScheme(true, "not-http");
+        if (window.layoutTestController)
+            layoutTestController.setDomainRelaxationForbiddenForURLScheme(true, "not-http");
 
         document.domain = "1";
         domainShouldBe("1");
 
         log("Allowing domain relaxation for the not-http: scheme");
 
-        if (window.internals)
-            internals.settings.setDomainRelaxationForbiddenForURLScheme(false, "not-http");
+        if (window.layoutTestController)
+            layoutTestController.setDomainRelaxationForbiddenForURLScheme(false, "not-http");
     </script>
 </body>
 </html>
index b4c2a33..8a099ec 100644 (file)
@@ -1,3 +1,16 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::setMediaPlaybackRequiresUserGesture):
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+
 2012-05-17  Pavel Feldman  <pfeldman@chromium.org>
 
         Web Inspector: create SourceFrames with content providers.
index d1c6db2..493a39d 100644 (file)
@@ -36,7 +36,6 @@
 #include "LocaleToScriptMapping.h"
 #include "Page.h"
 #include "RuntimeEnabledFeatures.h"
-#include "SchemeRegistry.h"
 #include "Settings.h"
 
 #if ENABLE(INPUT_TYPE_COLOR)
@@ -329,10 +328,5 @@ void InternalSettings::setMediaPlaybackRequiresUserGesture(bool enabled, Excepti
     InternalSettingsGuardForSettings();
     settings()->setMediaPlaybackRequiresUserGesture(enabled);
 }
-    
-void InternalSettings::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String& urlScheme, ExceptionCode&)
-{
-    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, urlScheme);
-}
 
 }
index 4e7f5d2..6619767 100644 (file)
@@ -74,7 +74,6 @@ public:
     bool scrollAnimatorEnabled(ExceptionCode&);
     void setCSSExclusionsEnabled(bool enabled, ExceptionCode&);
     void setMediaPlaybackRequiresUserGesture(bool, ExceptionCode&);
-    void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const String& urlScheme, ExceptionCode&);
 
     void restoreTo(Settings*);
 
index 3fc97d3..bbabe3a 100644 (file)
@@ -53,7 +53,6 @@ module window {
         boolean scrollAnimatorEnabled() raises(DOMException);
         void setCSSExclusionsEnabled(in boolean enabled) raises(DOMException);
         void setMediaPlaybackRequiresUserGesture(in boolean enabled) raises(DOMException);
-        void setDomainRelaxationForbiddenForURLScheme(in boolean forbidden, in DOMString urlScheme) raises(DOMException);
     };
 }
 
index f05cb4e..2d0af43 100644 (file)
@@ -1,3 +1,17 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * public/WebView.h:
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::setDomainRelaxationForbidden):
+        (WebKit):
+        * src/WebViewImpl.h:
+        (WebViewImpl):
+
 2012-05-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
index 8722bd5..0f7093a 100644 (file)
@@ -141,6 +141,9 @@ public:
     virtual bool isActive() const = 0;
     virtual void setIsActive(bool) = 0;
 
+    // Allows disabling domain relaxation.
+    virtual void setDomainRelaxationForbidden(bool, const WebString& scheme) = 0;
+
 
     // Closing -------------------------------------------------------------
 
index 25c9ecb..d38bc96 100644 (file)
@@ -2949,6 +2949,11 @@ bool WebViewImpl::isActive() const
     return (page() && page()->focusController()) ? page()->focusController()->isActive() : false;
 }
 
+void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString& scheme)
+{
+    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme));
+}
+
 void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
                                      unsigned activeColor,
                                      unsigned trackColor) {
index cfb45fc..06d7438 100644 (file)
@@ -177,6 +177,7 @@ public:
     virtual void setTabKeyCyclesThroughElements(bool value);
     virtual bool isActive() const;
     virtual void setIsActive(bool value);
+    virtual void setDomainRelaxationForbidden(bool, const WebString& scheme);
     virtual bool dispatchBeforeUnloadEvent();
     virtual void dispatchUnloadEvent();
     virtual WebFrame* mainFrame();
index e3e6ff3..bbd7e94 100644 (file)
@@ -1,3 +1,15 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        (DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme):
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+        (DumpRenderTreeSupportGtk):
+
 2012-05-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
index 34b09a0..03827b4 100644 (file)
@@ -56,6 +56,7 @@
 #include "RenderListItem.h"
 #include "RenderTreeAsText.h"
 #include "RenderView.h"
+#include "SchemeRegistry.h"
 #include "SecurityOrigin.h"
 #include "SecurityPolicy.h"
 #include "Settings.h"
@@ -879,3 +880,8 @@ void DumpRenderTreeSupportGtk::deliverAllMutationsIfNecessary()
     WebKitMutationObserver::deliverAllMutations();
 #endif
 }
+
+void DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const char* urlScheme)
+{
+    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String::fromUTF8(urlScheme));
+}
index 21b7175..a0fd1a5 100644 (file)
@@ -126,6 +126,7 @@ public:
     static void setPageCacheSupportsPlugins(WebKitWebView*, bool enabled);
 
     static void deliverAllMutationsIfNecessary();
+    static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const char* urlScheme);
 
 private:
     static bool s_drtRun;
index 316d768..3cbcdd4 100644 (file)
@@ -1,3 +1,15 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * WebKit.order:
+        * WebView/WebView.mm:
+        (+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
+        * WebView/WebViewPrivate.h:
+
 2012-05-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
index dfa3efc..1a1eb0c 100644 (file)
@@ -55,6 +55,7 @@ _WKGetWebDefaultCFStringEncoding
 -[NSURL(WebNSURLExtras) _web_originalData]
 _WebLocalizedString
 +[WebView(WebPrivate) _registerURLSchemeAsSecure:]
++[WebView(WebPrivate) _setDomainRelaxationForbidden:forURLScheme:]
 -[WebPreferences(WebPrivate) setDeveloperExtrasEnabled:]
 -[WebPreferences _setBoolValue:forKey:]
 +[NSPasteboard(WebExtras) _web_dragTypesForURL]
index 7b9d8e5..ccf5541 100644 (file)
@@ -2706,6 +2706,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
         frame->animation()->resumeAnimations();
 }
 
++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme
+{
+    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
 + (void)_registerURLSchemeAsSecure:(NSString *)scheme
 {
     SchemeRegistry::registerURLSchemeAsSecure(scheme);
index 56ed898..02f7bcc 100644 (file)
@@ -550,6 +550,7 @@ Could be worth adding to the API.
 */
 - (void)setCSSAnimationsSuspended:(BOOL)suspended;
 
++ (void)_setDomainRelaxationForbidden:(BOOL)forbidden forURLScheme:(NSString *)scheme;
 + (void)_registerURLSchemeAsSecure:(NSString *)scheme;
 + (void)_registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing:(NSString *)scheme;
 + (void)_registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing:(NSString *)scheme;
index dc78b4b..8738f02 100644 (file)
@@ -1,3 +1,14 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        (DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme):
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2012-05-17  Tsarko Yaroslav  <eriktsarko@googlemail.com>
 
         Reviewed by Yury Semikhatsky.
index 4ff3349..2d4fb50 100644 (file)
@@ -71,6 +71,7 @@
 #include "PrintContext.h"
 #include "RenderListItem.h"
 #include "RenderTreeAsText.h"
+#include "SchemeRegistry.h"
 #include "ScriptController.h"
 #include "ScriptSourceCode.h"
 #include "ScriptValue.h"
@@ -484,6 +485,11 @@ void DumpRenderTreeSupportQt::resetOriginAccessWhiteLists()
     SecurityPolicy::resetOriginAccessWhitelists();
 }
 
+void DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+{
+    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
 void DumpRenderTreeSupportQt::setCaretBrowsingEnabled(QWebPage* page, bool value)
 {
     page->handle()->page->settings()->setCaretBrowsingEnabled(value);
index a963975..373f60e 100644 (file)
@@ -115,6 +115,7 @@ public:
     static void suspendActiveDOMObjects(QWebFrame* frame);
     static void resumeActiveDOMObjects(QWebFrame* frame);
 
+    static void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
     static void setFrameFlatteningEnabled(QWebPage*, bool);
     static void setCaretBrowsingEnabled(QWebPage* page, bool value);
     static void setAuthorAndUserStylesEnabled(QWebPage*, bool);
index 9f33e09..cb96900 100644 (file)
@@ -1,3 +1,16 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * Interfaces/IWebViewPrivate.idl:
+        * WebView.cpp:
+        (WebView::setDomainRelaxationForbiddenForURLScheme):
+        * WebView.h:
+        (WebView):
+
 2012-05-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
index 60e4a57..b461949 100644 (file)
@@ -227,6 +227,8 @@ interface IWebViewPrivate : IUnknown
     HRESULT geolocationDidChangePosition([in] IWebGeolocationPosition* position);
     HRESULT geolocationDidFailWithError([in] IWebError* error);
 
+    HRESULT setDomainRelaxationForbiddenForURLScheme([in] BOOL forbidden, [in] BSTR scheme);
+
     HRESULT registerURLSchemeAsSecure([in] BSTR scheme);
 
     HRESULT nextDisplayIsSynchronous();
index 0c4f88e..26e5835 100644 (file)
@@ -6606,6 +6606,12 @@ HRESULT WebView::geolocationDidFailWithError(IWebError* error)
     return S_OK;
 }
 
+HRESULT WebView::setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme)
+{
+    SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, String(scheme, SysStringLen(scheme)));
+    return S_OK;
+}
+
 HRESULT WebView::registerURLSchemeAsSecure(BSTR scheme)
 {
     SchemeRegistry::registerURLSchemeAsSecure(toString(scheme));
index dd3cc34..3a0f95a 100644 (file)
@@ -824,6 +824,7 @@ public:
     virtual HRESULT STDMETHODCALLTYPE geolocationDidChangePosition(IWebGeolocationPosition* position);
     virtual HRESULT STDMETHODCALLTYPE geolocationDidFailWithError(IWebError* error);
 
+    virtual HRESULT STDMETHODCALLTYPE setDomainRelaxationForbiddenForURLScheme(BOOL forbidden, BSTR scheme);
     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsSecure(BSTR);
     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsAllowingLocalStorageAccessInPrivateBrowsing(BSTR);
     virtual HRESULT STDMETHODCALLTYPE registerURLSchemeAsAllowingDatabaseAccessInPrivateBrowsing(BSTR);
index 28b7dbb..9a9aee9 100644 (file)
@@ -1,3 +1,12 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * win/WebKit2.def:
+
 2012-05-17  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface
index 63ee2c3..8e3c2c4 100644 (file)
@@ -256,4 +256,3 @@ EXPORTS
         ?isPageBoxVisible@Document@WebCore@@QAE_NH@Z
         ?suspendAnimations@AnimationController@WebCore@@QAEXXZ
         ?resumeAnimations@AnimationController@WebCore@@QAEXXZ
-        ?setDomainRelaxationForbiddenForURLScheme@SchemeRegistry@WebCore@@SAX_NABVString@WTF@@@Z
index 5b33921..09a95ea 100644 (file)
@@ -144,7 +144,6 @@ _ZN7WebCore8Document34webkitDidEnterFullScreenForElementEPNS_7ElementE;
 _ZN7WebCore8Document34webkitWillExitFullScreenForElementEPNS_7ElementE;
 _ZN7WebCore8Document35webkitWillEnterFullScreenForElementEPNS_7ElementE;
 _ZN7WebCore17JSDOMGlobalObject6s_infoE;
-_ZN7WebCore14SchemeRegistry40setDomainRelaxationForbiddenForURLSchemeEbRKN3WTF6StringE;
 local:
 _Z*;
 cti*;
index a4f2afd..50e16f3 100644 (file)
@@ -1,3 +1,37 @@
+2012-05-17  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r117428): WebKit API/SPI was removed
+        https://bugs.webkit.org/show_bug.cgi?id=86748
+
+        Reverted r117428.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (setDomainRelaxationForbiddenForURLSchemeCallback):
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        (LayoutTestController):
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        (LayoutTestController::setDomainRelaxationForbiddenForURLScheme):
+
 2012-05-17  Li Yin  <li.yin@intel.com>
 
         [chromium] run-webkit-tests can't work on ubuntu 12.04
index f28d4e6..836ddef 100644 (file)
@@ -1231,6 +1231,21 @@ static JSValueRef setDefersLoadingCallback(JSContextRef context, JSObjectRef fun
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef setDomainRelaxationForbiddenForURLSchemeCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    // Has Mac and Windows implementation
+    if (argumentCount < 2)
+        return JSValueMakeUndefined(context);
+
+    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
+
+    bool forbidden = JSValueToBoolean(context, arguments[0]);
+    JSRetainPtr<JSStringRef> scheme(Adopt, JSValueToStringCopy(context, arguments[1], 0));
+    controller->setDomainRelaxationForbiddenForURLScheme(forbidden, scheme.get());
+
+    return JSValueMakeUndefined(context);
+}
+
 static JSValueRef setMockDeviceOrientationCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     if (argumentCount < 6)
@@ -2359,6 +2374,7 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "setDatabaseQuota", setDatabaseQuotaCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 
         { "setDeferMainResourceDataLoad", setDeferMainResourceDataLoadCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setDefersLoading", setDefersLoadingCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+        { "setDomainRelaxationForbiddenForURLScheme", setDomainRelaxationForbiddenForURLSchemeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setEditingBehavior", setEditingBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setFrameFlatteningEnabled", setFrameFlatteningEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setGeolocationPermission", setGeolocationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
index add9fca..e3d3182 100644 (file)
@@ -96,6 +96,7 @@ public:
     void setCacheModel(int);
     void setCustomPolicyDelegate(bool setDelegate, bool permissive);
     void setDatabaseQuota(unsigned long long quota);
+    void setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme);
     void setDefersLoading(bool);
     void setIconDatabaseEnabled(bool iconDatabaseEnabled);
     void setJavaScriptProfilingEnabled(bool profilingEnabled);
index f41d804..a799b04 100644 (file)
@@ -38,6 +38,7 @@
 #include "OwnArrayPtr.h"
 #include "Page.h"
 #include "RenderTreeAsText.h"
+#include "SchemeRegistry.h"
 #include "SecurityOrigin.h"
 #include "SecurityPolicy.h"
 #include "Settings.h"
@@ -222,6 +223,11 @@ void LayoutTestController::setDatabaseQuota(unsigned long long quota)
     WebCore::DatabaseTracker::tracker().setQuota(mainFrame->document()->securityOrigin(), quota);
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+    WebCore::SchemeRegistry::setDomainRelaxationForbiddenForURLScheme(forbidden, jsStringRefToWebCoreString(scheme));
+}
+
 void LayoutTestController::setIconDatabaseEnabled(bool iconDatabaseEnabled)
 {
     UNUSED_PARAM(iconDatabaseEnabled);
index 670dc91..d2823af 100644 (file)
@@ -190,6 +190,7 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("setCustomPolicyDelegate", &LayoutTestController::setCustomPolicyDelegate);
     bindMethod("setDatabaseQuota", &LayoutTestController::setDatabaseQuota);
     bindMethod("setDeferMainResourceDataLoad", &LayoutTestController::setDeferMainResourceDataLoad);
+    bindMethod("setDomainRelaxationForbiddenForURLScheme", &LayoutTestController::setDomainRelaxationForbiddenForURLScheme);
     bindMethod("setEditingBehavior", &LayoutTestController::setEditingBehavior);
     bindMethod("setAudioData", &LayoutTestController::setAudioData);
     bindMethod("setGeolocationPermission", &LayoutTestController::setGeolocationPermission);
@@ -1192,6 +1193,13 @@ void LayoutTestController::simulateDesktopNotificationClick(const CppArgumentLis
 }
 #endif
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(const CppArgumentList& arguments, CppVariant* result)
+{
+    if (arguments.size() != 2 || !arguments[0].isBool() || !arguments[1].isString())
+        return;
+    m_shell->webView()->setDomainRelaxationForbidden(cppVariantToBool(arguments[0]), cppVariantToWebString(arguments[1]));
+}
+
 void LayoutTestController::setDeferMainResourceDataLoad(const CppArgumentList& arguments, CppVariant* result)
 {
     if (arguments.size() == 1)
index 1108810..793afdf 100644 (file)
@@ -255,6 +255,7 @@ public:
     void simulateDesktopNotificationClick(const CppArgumentList&, CppVariant*);
 #endif
 
+    void setDomainRelaxationForbiddenForURLScheme(const CppArgumentList&, CppVariant*);
     void setDeferMainResourceDataLoad(const CppArgumentList&, CppVariant*);
     void setEditingBehavior(const CppArgumentList&, CppVariant*);
 
index 1995d8e..16f727f 100644 (file)
@@ -614,6 +614,11 @@ void LayoutTestController::syncLocalStorage()
     notImplemented();
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
+{
+    notImplemented();
+}
+
 void LayoutTestController::goBack()
 {
     ewk_frame_back(browser->mainFrame());
index e1386a5..5eb7fbe 100644 (file)
@@ -739,6 +739,12 @@ void LayoutTestController::syncLocalStorage()
     // FIXME: implement
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+    GOwnPtr<gchar> urlScheme(JSStringCopyUTF8CString(scheme));
+    DumpRenderTreeSupportGtk::setDomainRelaxationForbiddenForURLScheme(forbidden, urlScheme.get());
+}
+
 void LayoutTestController::goBack()
 {
     WebKitWebView* webView = webkit_web_frame_get_web_view(mainFrame);
index a8c716c..b8356c9 100644 (file)
@@ -492,6 +492,12 @@ void LayoutTestController::setDefersLoading(bool defers)
     [[mainFrame webView] setDefersCallbacks:defers];
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+    RetainPtr<CFStringRef> schemeCFString(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, scheme));
+    [WebView _setDomainRelaxationForbidden:forbidden forURLScheme:(NSString *)schemeCFString.get()];
+}
+
 void LayoutTestController::setMockDeviceOrientation(bool canProvideAlpha, double alpha, bool canProvideBeta, double beta, bool canProvideGamma, double gamma)
 {
     // DumpRenderTree configured the WebView to use WebDeviceOrientationProviderMock.
index 8a0beef..3e875d1 100644 (file)
@@ -720,6 +720,11 @@ void LayoutTestController::setUserStyleSheetEnabled(bool enabled)
         m_drt->webPage()->settings()->setUserStyleSheetUrl(QUrl());
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme)
+{
+    DumpRenderTreeSupportQt::setDomainRelaxationForbiddenForURLScheme(forbidden, scheme);
+}
+
 int LayoutTestController::workerThreadCount()
 {
     return DumpRenderTreeSupportQt::workerThreadCount();
index e341d9c..24ab097 100644 (file)
@@ -211,6 +211,7 @@ public slots:
     void overridePreference(const QString& name, const QVariant& value);
     void setUserStyleSheetLocation(const QString& url);
     void setUserStyleSheetEnabled(bool enabled);
+    void setDomainRelaxationForbiddenForURLScheme(bool forbidden, const QString& scheme);
     int workerThreadCount();
     int pageNumberForElementById(const QString& id, float width = 0, float height = 0);
     int numberOfPages(float width = maxViewWidth, float height = maxViewHeight);
index 913737c..fb237b1 100644 (file)
@@ -1043,6 +1043,17 @@ void LayoutTestController::setDefersLoading(bool)
     // FIXME: implement to enable loader/navigation-while-deferring-loads.html
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool forbidden, JSStringRef scheme)
+{
+    COMPtr<IWebViewPrivate> webView;
+    if (FAILED(WebKitCreateInstance(__uuidof(WebView), 0, __uuidof(webView), reinterpret_cast<void**>(&webView))))
+        return;
+
+    BSTR schemeBSTR = JSStringCopyBSTR(scheme);
+    webView->setDomainRelaxationForbiddenForURLScheme(forbidden, schemeBSTR);
+    SysFreeString(schemeBSTR);
+}
+
 void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
 {
     printf("ERROR: LayoutTestController::setAppCacheMaximumSize() not implemented\n");
index 54cf739..2139e7c 100644 (file)
@@ -297,6 +297,11 @@ void LayoutTestController::setDefersLoading(bool)
     // FIXME: implement to enable loader/navigation-while-deferring-loads.html
 }
 
+void LayoutTestController::setDomainRelaxationForbiddenForURLScheme(bool, JSStringRef)
+{
+    // FIXME: implement
+}
+
 void LayoutTestController::setAppCacheMaximumSize(unsigned long long size)
 {
     // FIXME: implement