diff options
Diffstat (limited to 'WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm')
-rw-r--r-- | WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm index 44aea81..898235b 100644 --- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm +++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm @@ -66,10 +66,6 @@ #import <wtf/HashMap.h> #import <wtf/RetainPtr.h> -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) -#include <Foundation/NSPrivateDecls.h> -#endif - @interface CommandValidationTarget : NSObject <NSValidatedUserInterfaceItem> { SEL _action; @@ -762,7 +758,7 @@ void LayoutTestController::setWebViewEditable(bool editable) #ifndef BUILDING_ON_TIGER static NSString *SynchronousLoaderRunLoopMode = @"DumpRenderTreeSynchronousLoaderRunLoopMode"; -#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) || !defined(__COCOA_FORMAL_PROTOCOLS_2__) +#if defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) @protocol NSURLConnectionDelegate <NSObject> @end #endif @@ -849,3 +845,13 @@ void LayoutTestController::authenticateSession(JSStringRef url, JSStringRef user [SynchronousLoader makeRequest:request withUsername:(NSString *)usernameCF.get() password:(NSString *)passwordCF.get()]; #endif } + +void LayoutTestController::setEditingBehavior(const char* editingBehavior) +{ + NSString* editingBehaviorNS = [[NSString alloc] initWithUTF8String:editingBehavior]; + if ([editingBehaviorNS isEqualToString:@"mac"]) + [[WebPreferences standardPreferences] setEditingBehavior:WebKitEditingMacBehavior]; + if ([editingBehaviorNS isEqualToString:@"win"]) + [[WebPreferences standardPreferences] setEditingBehavior:WebKitEditingWinBehavior]; + [editingBehaviorNS release]; +} |