Title: [122667] trunk
Revision
122667
Author
[email protected]
Date
2012-07-14 03:53:53 -0700 (Sat, 14 Jul 2012)

Log Message

Unreviewed, rolling out r122665.
http://trac.webkit.org/changeset/122665
https://bugs.webkit.org/show_bug.cgi?id=91321

Broke Mac builds (Requested by rniwa on #webkit).

Patch by Sheriff Bot <[email protected]> on 2012-07-14

Source/WebKit/mac: 

* WebView/WebPreferences.mm:
(-[WebPreferences initWithIdentifier:]):
(-[WebPreferences setCacheModel:]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(+[WebView initialize]):
(+[WebView _preferencesChangedNotification:]):

Tools: 

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (122666 => 122667)


--- trunk/Source/WebKit/mac/ChangeLog	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-07-14 10:53:53 UTC (rev 122667)
@@ -1,3 +1,19 @@
+2012-07-14  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r122665.
+        http://trac.webkit.org/changeset/122665
+        https://bugs.webkit.org/show_bug.cgi?id=91321
+
+        Broke Mac builds (Requested by rniwa on #webkit).
+
+        * WebView/WebPreferences.mm:
+        (-[WebPreferences initWithIdentifier:]):
+        (-[WebPreferences setCacheModel:]):
+        * WebView/WebPreferencesPrivate.h:
+        * WebView/WebView.mm:
+        (+[WebView initialize]):
+        (+[WebView _preferencesChangedNotification:]):
+
 2012-07-13  Benjamin Poulain  <[email protected]>
 
         [Mac] Do not try to update the cache model for every WebPreferences change

Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (122666 => 122667)


--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm	2012-07-14 10:53:53 UTC (rev 122667)
@@ -47,7 +47,6 @@
 NSString *WebPreferencesChangedNotification = @"WebPreferencesChangedNotification";
 NSString *WebPreferencesRemovedNotification = @"WebPreferencesRemovedNotification";
 NSString *WebPreferencesChangedInternalNotification = @"WebPreferencesChangedInternalNotification";
-NSString *WebPreferencesCacheModelChangedInternalNotification = @"WebPreferencesCacheModelChangedInternalNotification";
 
 #define KEY(x) (_private->identifier ? [_private->identifier stringByAppendingString:(x)] : (x))
 
@@ -223,7 +222,6 @@
     [[self class] _setInstance:self forIdentifier:_private->identifier];
 
     [self _postPreferencesChangedNotification];
-    [self _postCacheModelChangedNotification];
 
     return self;
 }
@@ -804,21 +802,10 @@
     return [self _boolValueForKey:WebKitUsesPageCachePreferenceKey];
 }
 
-- (void)_postCacheModelChangedNotification
-{
-    if (!pthread_main_np()) {
-        [self performSelectorOnMainThread:_cmd withObject:nil waitUntilDone:NO];
-        return;
-    }
-
-    [[NSNotificationCenter defaultCenter] postNotificationName:WebPreferencesCacheModelChangedInternalNotification object:self userInfo:nil];
-}
-
 - (void)setCacheModel:(WebCacheModel)cacheModel
 {
     [self _setIntegerValue:cacheModel forKey:WebKitCacheModelPreferenceKey];
     [self setAutomaticallyDetectsCacheModel:NO];
-    [self _postCacheModelChangedNotification];
 }
 
 - (WebCacheModel)cacheModel

Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (122666 => 122667)


--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h	2012-07-14 10:53:53 UTC (rev 122667)
@@ -46,7 +46,6 @@
 extern NSString *WebPreferencesChangedNotification;
 extern NSString *WebPreferencesRemovedNotification;
 extern NSString *WebPreferencesChangedInternalNotification;
-extern NSString *WebPreferencesCacheModelChangedInternalNotification;
 
 @interface WebPreferences (WebPrivate)
 

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (122666 => 122667)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2012-07-14 10:53:53 UTC (rev 122667)
@@ -3040,7 +3040,7 @@
     WebCore::RunLoop::initializeMainRunLoop();
 
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_applicationWillTerminate) name:NSApplicationWillTerminateNotification object:NSApp];
-    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_cacheModelChangedNotification:) name:WebPreferencesCacheModelChangedInternalNotification object:nil];
+    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesChangedNotification:) name:WebPreferencesChangedInternalNotification object:nil];
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(_preferencesRemovedNotification:) name:WebPreferencesRemovedNotification object:nil];    
 
     continuousSpellCheckingEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:WebContinuousSpellCheckingEnabled];
@@ -5913,7 +5913,7 @@
     return cacheModel;
 }
 
-+ (void)_cacheModelChangedNotification:(NSNotification *)notification
++ (void)_preferencesChangedNotification:(NSNotification *)notification
 {
     WebPreferences *preferences = (WebPreferences *)[notification object];
     ASSERT([preferences isKindOfClass:[WebPreferences class]]);

Modified: trunk/Tools/ChangeLog (122666 => 122667)


--- trunk/Tools/ChangeLog	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Tools/ChangeLog	2012-07-14 10:53:53 UTC (rev 122667)
@@ -1,3 +1,14 @@
+2012-07-14  Sheriff Bot  <[email protected]>
+
+        Unreviewed, rolling out r122665.
+        http://trac.webkit.org/changeset/122665
+        https://bugs.webkit.org/show_bug.cgi?id=91321
+
+        Broke Mac builds (Requested by rniwa on #webkit).
+
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm: Removed.
+
 2012-07-13  Benjamin Poulain  <[email protected]>
 
         [Mac] Do not try to update the cache model for every WebPreferences change

Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (122666 => 122667)


--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj	2012-07-14 10:53:53 UTC (rev 122667)
@@ -20,7 +20,6 @@
 		1ADBEFAE130C689C00D61D19 /* ForceRepaint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */; };
 		1ADBEFE3130C6AA100D61D19 /* simple-accelerated-compositing.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */; };
 		1AEDE22613E5E7E700E62FE8 /* InjectedBundleControllerMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */; };
-		261516D615B0E60500A2C201 /* SetAndUpdateCacheModel.mm in Sources */ = {isa = PBXBuildFile; fileRef = 261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */; };
 		26DF5A5E15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 26DF5A5D15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm */; };
 		26DF5A6315A2A27E003689C2 /* CancelLoadFromResourceLoadDelegate.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */; };
 		333B9CE21277F23100FEFCE3 /* PreventEmptyUserAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */; };
@@ -241,7 +240,6 @@
 		1ADBEFAD130C689C00D61D19 /* ForceRepaint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ForceRepaint.cpp; sourceTree = "<group>"; };
 		1ADBEFBC130C6A0100D61D19 /* simple-accelerated-compositing.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "simple-accelerated-compositing.html"; sourceTree = "<group>"; };
 		1AEDE22413E5E7A000E62FE8 /* InjectedBundleControllerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = InjectedBundleControllerMac.mm; sourceTree = "<group>"; };
-		261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SetAndUpdateCacheModel.mm; sourceTree = "<group>"; };
 		26DF5A5D15A29BAA003689C2 /* CancelLoadFromResourceLoadDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CancelLoadFromResourceLoadDelegate.mm; sourceTree = "<group>"; };
 		26DF5A6115A2A22B003689C2 /* CancelLoadFromResourceLoadDelegate.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = CancelLoadFromResourceLoadDelegate.html; sourceTree = "<group>"; };
 		333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = "<group>"; };
@@ -697,7 +695,6 @@
 				E1220D9F155B25480013E2FC /* MemoryCacheDisableWithinResourceLoadDelegate.mm */,
 				517E7DFB15110EA600D0B008 /* MemoryCachePruneWithinResourceLoadDelegate.mm */,
 				3722C8681461E03E00C45D00 /* RenderedImageFromDOMRange.mm */,
-				261516D515B0E60500A2C201 /* SetAndUpdateCacheModel.mm */,
 				52B8CF9515868CF000281053 /* SetDocumentURI.mm */,
 				C540F775152E4DA000A40C8C /* SimplifyMarkup.mm */,
 				3799AD3914120A43005EB0C6 /* StringByEvaluatingJavaScriptFromString.mm */,
@@ -936,7 +933,6 @@
 				F660AA0D15A5F061003A1243 /* GetInjectedBundleInitializationUserDataCallback.cpp in Sources */,
 				F660AA1315A619C9003A1243 /* InjectedBundleInitializationUserDataCallbackWins.cpp in Sources */,
 				0F17BBD615AF6C4D007AB753 /* WebCoreStatisticsWithNoWebProcess.cpp in Sources */,
-				261516D615B0E60500A2C201 /* SetAndUpdateCacheModel.mm in Sources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};

Deleted: trunk/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm (122666 => 122667)


--- trunk/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm	2012-07-14 09:50:22 UTC (rev 122666)
+++ trunk/Tools/TestWebKitAPI/Tests/mac/SetAndUpdateCacheModel.mm	2012-07-14 10:53:53 UTC (rev 122667)
@@ -1,102 +0,0 @@
-/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include <wtf/RetainPtr.h>
-
-#import <WebKit/WebView.h>
-#import <WebKit/WebPreferences.h>
-
-@interface WebView (WebViewOtherInternal)
-+ (WebCacheModel)_cacheModel;
-@end
-
-namespace TestWebKitAPI {
-
-TEST(WebKit1, SetAndUpdateCacheModelInitialModel)
-{
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-
-    RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
-
-    EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
-}
-
-TEST(WebKit1, SetAndUpdateCacheModelStandardPreferenceChange)
-{
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-
-    WebPreferences *standardPreferences = [WebPreferences standardPreferences];
-    EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
-
-    [standardPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-
-    [standardPreferences setCacheModel:WebCacheModelDocumentViewer];
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-}
-
-TEST(WebKit1, SetAndUpdateCacheModelPreferencesChangeMix)
-{
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-
-    WebPreferences *standardPreferences = [WebPreferences standardPreferences];
-    RetainPtr<WebPreferences> customPreferences(AdoptNS, [[WebPreferences alloc] initWithIdentifier:@"SetAndUpdateCacheModelPreferencesChangeMix"]);
-
-    // 1) The customPreferences is not set on a view.
-    EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
-
-    [standardPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-
-    [standardPreferences setCacheModel:WebCacheModelDocumentViewer];
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-    [customPreferences.get() setCacheModel:WebCacheModelPrimaryWebBrowser];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-
-
-    // 2) The cache model should follow the highest value of cache model between the two preferences.
-    RetainPtr<WebView> webView(AdoptNS, [[WebView alloc] initWithFrame:NSMakeRect(0, 0, 120, 200) frameName:nil groupName:nil]);
-    [webView.get() setPreferences:customPreferences.get()];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-    
-    [customPreferences.get() setCacheModel:WebCacheModelDocumentBrowser];
-    EXPECT_EQ((int)WebCacheModelDocumentBrowser, (int)[WebView _cacheModel]);
-    
-    [standardPreferences setCacheModel:WebCacheModelPrimaryWebBrowser];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-    [customPreferences.get() setCacheModel:WebCacheModelDocumentViewer];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-
-    // 3) Resetting the view should fall back to standardPreferences.
-    [standardPreferences setCacheModel:WebCacheModelDocumentViewer];
-    [customPreferences.get() setCacheModel:WebCacheModelPrimaryWebBrowser];
-    EXPECT_EQ((int)WebCacheModelPrimaryWebBrowser, (int)[WebView _cacheModel]);
-
-    webView.clear();
-    EXPECT_EQ((int)WebCacheModelDocumentViewer, (int)[WebView _cacheModel]);
-}
-
-} // namespace TestWebKitAPI
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to