Skip to content
Browse files

2008-12-11 Cameron Zwarich <zwarich@apple.com>

        Rubber-stamped by Mark Rowe.

        Roll out r39212 due to assertion failures during layout tests, multiple
        layout test failures, memory leaks, and obvious incorrectness.

        WebKit/mac:

        * WebView/WebPreferenceKeysPrivate.h:
        * WebView/WebPreferences.mm:
        (-[WebPreferences fullDocumentTeardownEnabled]):
        * WebView/WebPreferencesPrivate.h:

        WebKit/win:

        * Interfaces/IWebPreferencesPrivate.idl:
        * WebPreferenceKeysPrivate.h:
        * WebPreferences.cpp:
        * WebPreferences.h:

        WebKitTools:

        * DumpRenderTree/LayoutTestController.cpp:
        (LayoutTestController::staticFunctions):
        * DumpRenderTree/LayoutTestController.h:
        * DumpRenderTree/mac/DumpRenderTree.mm:
        (resetWebViewToConsistentStateBeforeTesting):
        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
        * DumpRenderTree/win/DumpRenderTree.cpp:
        (resetWebViewToConsistentStateBeforeTesting):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::pauseTransitionAtTimeOnElementWithId):

        LayoutTests:

        * security/override-preferences-2-expected.txt: Removed.
        * security/override-preferences-2.html: Removed.
        * security/override-preferences-expected.txt: Removed.
        * security/override-preferences.html: Removed.
        * security/override-zzz-reset-expected.txt: Removed.
        * security/override-zzz-reset.html: Removed.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39227 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information...
1 parent 36be661 commit c5be090b852b3a05e82d9531a60b77eeb9365900 cwzwarich@webkit.org committed Dec 12, 2008
View
14 LayoutTests/ChangeLog
@@ -1,3 +1,17 @@
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * security/override-preferences-2-expected.txt: Removed.
+ * security/override-preferences-2.html: Removed.
+ * security/override-preferences-expected.txt: Removed.
+ * security/override-preferences.html: Removed.
+ * security/override-zzz-reset-expected.txt: Removed.
+ * security/override-zzz-reset.html: Removed.
+
2008-12-11 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
Reviewed by Holger Freyther.
View
3 LayoutTests/security/override-preferences-2-expected.txt
@@ -1,3 +0,0 @@
-This test verifies that layoutTestController can have its default preferences overriden. This test verifies that the API will accept string values and also override the default font size. You should see "PASS" below.
-
-PASS
View
18 LayoutTests/security/override-preferences-2.html
@@ -1,18 +0,0 @@
-<html>
-<script>
- if(window.layoutTestController) {
- layoutTestController.dumpAsText();
- layoutTestController.overridePreference("WebKitDefaultFontSize", "24");
- }
-</script>
-<body>
- <p>This test verifies that layoutTestController can have its default preferences overriden.
- This test verifies that the API will accept string values and also override the default font size.
- You should see "PASS" below.</p>
- <script>
- var p = document.getElementsByTagName("p")[0];
- if(!window.layoutTestController || window.getComputedStyle(p).fontSize == "24px")
- document.write("PASS");
- </script>
-</body>
-</html>
View
3 LayoutTests/security/override-preferences-expected.txt
@@ -1,3 +0,0 @@
-This is a test that verifies that layoutTestController can have its default preferences overridden. This test specifically checks that Javascript can be disabled, and you should see "PASS" below if viewing with a browser.
-
-PASS
View
18 LayoutTests/security/override-preferences.html
@@ -1,18 +0,0 @@
-<html>
-<body>
-<script>
- if(window.layoutTestController) {
- layoutTestController.dumpAsText()
- layoutTestController.overridePreference("WebKitJavaScriptEnabled", false);
- }
-
- function loadstatus() {
- if(window.layoutTestController)
- document.getElementById("status").innerHTML="FAIL";
- }
-</script>
-<body onload="loadstatus()">
- <p>This is a test that verifies that layoutTestController can have its default preferences overridden. This test specifically checks that Javascript can be disabled, and you should see "PASS" below if viewing with a browser.</p>
- <span id="status">PASS</span>
-</body>
-</html>
View
3 LayoutTests/security/override-zzz-reset-expected.txt
@@ -1,3 +0,0 @@
-This test verifies that the layoutTestController will reset its default preferences after every layout test. You should see "PASS" below.
-
-PASS
View
14 LayoutTests/security/override-zzz-reset.html
@@ -1,14 +0,0 @@
-<html>
-<body>
-<script>
- if(window.layoutTestController)
- layoutTestController.dumpAsText();
-</script>
-<body>
- <p>This test verifies that the layoutTestController will reset its default preferences after every layout test. You should see "PASS" below.</p>
- <span id="status">FAIL</span>
- <script>
- document.getElementById("status").innerHTML="PASS";
- </script>
-</body>
-</html>
View
12 WebKit/mac/ChangeLog
@@ -1,3 +1,15 @@
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (-[WebPreferences fullDocumentTeardownEnabled]):
+ * WebView/WebPreferencesPrivate.h:
+
2008-12-11 Stephanie Lewis <slewis@apple.com>
Fix build.
View
1 WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -72,7 +72,6 @@
#define WebKitEnableFullDocumentTeardownPreferenceKey @"WebKitEnableFullDocumentTeardown"
#define WebKitOfflineWebApplicationCacheEnabledPreferenceKey @"WebKitOfflineWebApplicationCacheEnabled"
#define WebKitZoomsTextOnlyPreferenceKey @"WebKitZoomsTextOnly"
-#define WebKitDefaultPreferencesOverridden @"WebKitDefaultPreferencesOverridden"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
View
19 WebKit/mac/WebView/WebPreferences.mm
@@ -1095,25 +1095,6 @@ - (BOOL)fullDocumentTeardownEnabled
{
return [self _boolValueForKey:WebKitEnableFullDocumentTeardownPreferenceKey];
}
-
-- (void)resetToDefaults
-{
- if (![self _boolValueForKey:WebKitDefaultPreferencesOverridden])
- return;
- [self init];
-
- [self _setBoolValue:false forKey:WebKitDefaultPreferencesOverridden];
- [self _postPreferencesChangesNotification];
-}
-
-- (void)overridePreference:(NSString *)key flag:(NSString *)preferenceFlag
-{
- [self _setStringValue:preferenceFlag forKey:key];
- [self _setBoolValue:true forKey:WebKitDefaultPreferencesOverridden];
-}
-
-
-
@end
@implementation WebPreferences (WebInternal)
View
9 WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -102,15 +102,6 @@ extern NSString *WebPreferencesRemovedNotification;
- (WebTextDirectionSubmenuInclusionBehavior)textDirectionSubmenuInclusionBehavior;
- (void)setTextDirectionSubmenuInclusionBehavior:(WebTextDirectionSubmenuInclusionBehavior)behavior;
-// This method is meant for overriding preferences for tests run
-// with DumpRenderTree only.
--(void)overridePreference:(NSString *)key flag:(NSString *)flag;
-
-// This method is meant for resetting overridden preferences for tests run
-// with DumpRenderTree only.
--(void)resetToDefaults;
-
-
// If site-specific spoofing is enabled, some pages that do inappropriate user-agent string checks will be
// passed a nonstandard user-agent string to get them to work correctly. This method might be removed in
// the future when there's no more need for it.
View
12 WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * Interfaces/IWebPreferencesPrivate.idl:
+ * WebPreferenceKeysPrivate.h:
+ * WebPreferences.cpp:
+ * WebPreferences.h:
+
2008-12-10 Glenn Wilson <gwilson@google.com>
Reviewed by Adam Roben.
View
9 WebKit/win/Interfaces/IWebPreferencesPrivate.idl
@@ -66,13 +66,4 @@ interface IWebPreferencesPrivate : IUnknown
HRESULT setLocalStorageEnabled([in] BOOL enabled);
HRESULT localStorageEnabled([out, retval] BOOL *enabled);
-
- // This method is meant for overriding preferences for tests run
- // with DumpRenderTree only.
- HRESULT overridePreference([in] BSTR key, [in] BSTR value);
-
- // This method is meant for resetting overridden preferences for tests run
- // with DumpRenderTree only.
- HRESULT resetToDefaults();
-
}
View
1 WebKit/win/WebPreferenceKeysPrivate.h
@@ -62,7 +62,6 @@
#define WebKitUsesPageCachePreferenceKey "WebKitUsesPageCachePreferenceKey"
#define WebKitCacheModelPreferenceKey "WebKitCacheModelPreferenceKey"
#define WebKitLocalStorageDatabasePathPreferenceKey "WebKitLocalStorageDatabasePath"
-#define WebKitDefaultPreferencesOverridden "WebKitDefaultPreferencesOverridden"
// These are private both because callers should be using the cover methods and because the
// cover methods themselves are private.
View
33 WebKit/win/WebPreferences.cpp
@@ -1223,39 +1223,6 @@ HRESULT WebPreferences::zoomsTextOnly(BOOL* zoomsTextOnly)
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebPreferences::overridePreference(BSTR key, BSTR value)
-{
- if (!SysStringLen(key) || !SysStringLen(value))
- return E_FAIL;
- RetainPtr<CFStringRef> keyRef(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<UniChar*>(key), SysStringLen(key)));
- setStringValue(keyRef.get(), value);
- setBoolValue(CFSTR(WebKitDefaultPreferencesOverridden), true);
- return S_OK;
-}
-
-HRESULT STDMETHODCALLTYPE WebPreferences::resetToDefaults()
-{
- if (!boolValueForKey(CFSTR(WebKitDefaultPreferencesOverridden)))
- return S_OK;
-
- int count = CFDictionaryGetCount(defaultSettings);
- if (count <= 0)
- return S_OK;
-
- OwnArrayPtr<CFTypeRef> keys(new CFTypeRef[count]);
- OwnArrayPtr<CFTypeRef> values(new CFTypeRef[count]);
- CFDictionaryGetKeysAndValues(defaultSettings, keys.get(), values.get());
-
- for (int i = 0; i < count; ++i)
- setValueForKey(static_cast<CFStringRef>(keys[i]), values[i]);
-
- setBoolValue(CFSTR(WebKitDefaultPreferencesOverridden), false);
-
- postPreferencesChangesNotification();
-
- return S_OK;
-}
-
void WebPreferences::willAddToWebView()
{
++m_numWebViews;
View
10 WebKit/win/WebPreferences.h
@@ -338,16 +338,6 @@ class WebPreferences : public IWebPreferences, public IWebPreferencesPrivate {
virtual HRESULT STDMETHODCALLTYPE zoomsTextOnly(
/* [retval][out] */ BOOL *zoomsTextOnly);
- // This method is meant for overriding preferences for tests run
- // with DumpRenderTree only.
- virtual HRESULT STDMETHODCALLTYPE overridePreference(
- /* [in] */ BSTR key,
- /* [in] */ BSTR value);
-
- // This method is meant for resetting overridden preferences for tests run
- // with DumpRenderTree only.
- virtual HRESULT STDMETHODCALLTYPE resetToDefaults();
-
// WebPreferences
// This method accesses a different preference key than developerExtrasEnabled.
View
18 WebKitTools/ChangeLog
@@ -1,3 +1,21 @@
+2008-12-11 Cameron Zwarich <zwarich@apple.com>
+
+ Rubber-stamped by Mark Rowe.
+
+ Roll out r39212 due to assertion failures during layout tests, multiple
+ layout test failures, memory leaks, and obvious incorrectness.
+
+ * DumpRenderTree/LayoutTestController.cpp:
+ (LayoutTestController::staticFunctions):
+ * DumpRenderTree/LayoutTestController.h:
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+ * DumpRenderTree/win/DumpRenderTree.cpp:
+ (resetWebViewToConsistentStateBeforeTesting):
+ * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+ (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
+
2008-12-10 Glenn Wilson <gwilson@google.com>
Reviewed by Adam Roben.
View
17 WebKitTools/DumpRenderTree/LayoutTestController.cpp
@@ -348,22 +348,6 @@ static JSValueRef isCommandEnabledCallback(JSContextRef context, JSObjectRef fun
return JSValueMakeBoolean(context, controller->isCommandEnabled(name.get()));
}
-static JSValueRef overridePreferenceCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
- if (argumentCount < 2)
- return JSValueMakeUndefined(context);
-
- JSRetainPtr<JSStringRef> key(Adopt, JSValueToStringCopy(context, arguments[0], exception));
- ASSERT(!*exception);
- JSRetainPtr<JSStringRef> value(Adopt, JSValueToStringCopy(context, arguments[1], exception));
- ASSERT(!*exception);
-
- LayoutTestController* controller = reinterpret_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
- controller->overridePreference(key.get(), value.get());
-
- return JSValueMakeUndefined(context);
-}
-
static JSValueRef keepWebHistoryCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Has mac implementation
@@ -818,7 +802,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
{ "isCommandEnabled", isCommandEnabledCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "keepWebHistory", keepWebHistoryCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "notifyDone", notifyDoneCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
- { "overridePreference", overridePreferenceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "pathToLocalResource", pathToLocalResourceCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueBackNavigation", queueBackNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
{ "queueForwardNavigation", queueForwardNavigationCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
View
1 WebKitTools/DumpRenderTree/LayoutTestController.h
@@ -73,7 +73,6 @@ class LayoutTestController : public RefCounted<LayoutTestController> {
void setUserStyleSheetLocation(JSStringRef path);
void setPersistentUserStyleSheetLocation(JSStringRef path);
void clearPersistentUserStyleSheet();
- void overridePreference(JSStringRef key, JSStringRef flag);
int windowCount();
bool elementDoesAutoCompleteForElementWithId(JSStringRef id);
View
1 WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
@@ -978,7 +978,6 @@ static void resetWebViewToConsistentStateBeforeTesting()
[webView _clearMainFrameName];
WebPreferences *preferences = [webView preferences];
- [preferences resetToDefaults];
[preferences setPrivateBrowsingEnabled:NO];
[preferences setAuthorAndUserStylesEnabled:YES];
[preferences setJavaScriptCanOpenWindowsAutomatically:YES];
View
11 WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
@@ -267,17 +267,6 @@ - (NSInteger)tag
[[WebPreferences standardPreferences] setUserStyleSheetLocation:url];
}
-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef flag)
-{
- RetainPtr<CFStringRef> keyCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, key));
- NSString *keyNS = (NSString *)keyCF.get();
-
- RetainPtr<CFStringRef> flagCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, flag));
- NSString *flagNS = (NSString *)flagCF.get();
-
- [[WebPreferences standardPreferences] overridePreference:keyNS flag:flagNS];
-}
-
void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)
{
RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL));
View
1 WebKitTools/DumpRenderTree/win/DumpRenderTree.cpp
@@ -656,7 +656,6 @@ static void resetWebViewToConsistentStateBeforeTesting()
COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
if (prefsPrivate) {
- prefsPrivate->resetToDefaults();
prefsPrivate->setAuthorAndUserStylesEnabled(TRUE);
prefsPrivate->setDeveloperExtrasEnabled(FALSE);
}
View
22 WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
@@ -41,7 +41,6 @@
#include <JavaScriptCore/Assertions.h>
#include <JavaScriptCore/JavaScriptCore.h>
#include <JavaScriptCore/JSRetainPtr.h>
-#include <JavaScriptCore/JSStringRefBSTR.h>
#include <WebKit/WebKit.h>
#include <string>
#include <CoreFoundation/CoreFoundation.h>
@@ -659,24 +658,3 @@ bool LayoutTestController::pauseTransitionAtTimeOnElementWithId(JSStringRef prop
{
return false; // FIXME: Implement this on Windows
}
-
-void LayoutTestController::overridePreference(JSStringRef key, JSStringRef flag)
-{
- COMPtr<IWebView> webView;
- if (FAILED(frame->webView(&webView)))
- return;
-
- COMPtr<IWebPreferences> preferences;
- if (FAILED(webView->preferences(&preferences)))
- return;
-
- COMPtr<IWebPreferencesPrivate> prefsPrivate(Query, preferences);
- if (!prefsPrivate)
- return;
-
- BSTR keyBSTR = JSStringCopyBSTR(key);
- BSTR flagBSTR = JSStringCopyBSTR(flag);
- prefsPrivate->overridePreference(keyBSTR, flagBSTR);
- SysFreeString(keyBSTR);
- SysFreeString(flagBSTR);
-}

0 comments on commit c5be090

Please sign in to comment.
Something went wrong with that request. Please try again.