diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm')
-rw-r--r-- | WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm | 55 |
1 files changed, 29 insertions, 26 deletions
diff --git a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm index 3aa1f2c..591bb81 100644 --- a/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm +++ b/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm @@ -26,6 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#import "config.h" #import "DumpRenderTree.h" #import "LayoutTestController.h" @@ -174,16 +175,6 @@ JSStringRef LayoutTestController::pathToLocalResource(JSContextRef context, JSSt return JSStringRetain(url); // Do nothing on mac. } -void LayoutTestController::queueBackNavigation(int howFarBack) -{ - WorkQueue::shared()->queue(new BackItem(howFarBack)); -} - -void LayoutTestController::queueForwardNavigation(int howFarForward) -{ - WorkQueue::shared()->queue(new ForwardItem(howFarForward)); -} - void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target) { RetainPtr<CFStringRef> urlCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, url)); @@ -196,16 +187,6 @@ void LayoutTestController::queueLoad(JSStringRef url, JSStringRef target) WorkQueue::shared()->queue(new LoadItem(absoluteURL.get(), target)); } -void LayoutTestController::queueReload() -{ - WorkQueue::shared()->queue(new ReloadItem); -} - -void LayoutTestController::queueScript(JSStringRef script) -{ - WorkQueue::shared()->queue(new ScriptItem(script)); -} - void LayoutTestController::setAcceptsEditing(bool newAcceptsEditing) { [(EditingDelegate *)[[mainFrame webView] editingDelegate] setAcceptsEditing:newAcceptsEditing]; @@ -263,9 +244,6 @@ void LayoutTestController::setMainFrameIsFirstResponder(bool flag) NSResponder *firstResponder = flag ? documentView : nil; [[[mainFrame webView] window] makeFirstResponder:firstResponder]; - - if ([documentView isKindOfClass:[WebHTMLView class]]) - [(WebHTMLView *)documentView _updateFocusedAndActiveState]; } void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled) @@ -273,6 +251,11 @@ void LayoutTestController::setPrivateBrowsingEnabled(bool privateBrowsingEnabled [[[mainFrame webView] preferences] setPrivateBrowsingEnabled:privateBrowsingEnabled]; } +void LayoutTestController::setXSSAuditorEnabled(bool enabled) +{ + [[[mainFrame webView] preferences] setXSSAuditorEnabled:enabled]; +} + void LayoutTestController::setPopupBlockingEnabled(bool popupBlockingEnabled) { [[[mainFrame webView] preferences] setJavaScriptCanOpenWindowsAutomatically:!popupBlockingEnabled]; @@ -300,6 +283,16 @@ void LayoutTestController::setUserStyleSheetLocation(JSStringRef path) [[WebPreferences standardPreferences] setUserStyleSheetLocation:url]; } +void LayoutTestController::disableImageLoading() +{ + [[WebPreferences standardPreferences] setLoadsImagesAutomatically:NO]; +} + +void LayoutTestController::dispatchPendingLoadRequests() +{ + [[mainFrame webView] _dispatchPendingLoadRequests]; +} + void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL) { RetainPtr<CFStringRef> urlString(AdoptCF, JSStringCopyCFString(0, jsURL)); @@ -314,9 +307,7 @@ void LayoutTestController::clearPersistentUserStyleSheet() void LayoutTestController::setWindowIsKey(bool windowIsKey) { m_windowIsKey = windowIsKey; - NSView *documentView = [[mainFrame frameView] documentView]; - if ([documentView isKindOfClass:[WebHTMLView class]]) - [(WebHTMLView *)documentView _updateFocusedAndActiveState]; + [[mainFrame webView] _updateActiveState]; } void LayoutTestController::setSmartInsertDeleteEnabled(bool flag) @@ -378,6 +369,11 @@ void LayoutTestController::execCommand(JSStringRef name, JSStringRef value) [[mainFrame webView] _executeCoreCommandByName:nameNS value:valueNS]; } +void LayoutTestController::setCacheModel(int cacheModel) +{ + [[WebPreferences standardPreferences] setCacheModel:cacheModel]; +} + bool LayoutTestController::isCommandEnabled(JSStringRef name) { RetainPtr<CFStringRef> nameCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, name)); @@ -426,3 +422,10 @@ unsigned LayoutTestController::numberOfActiveAnimations() const { return [mainFrame _numberOfActiveAnimations]; } + +void LayoutTestController::waitForPolicyDelegate() +{ + setWaitToDump(true); + [policyDelegate setControllerToNotifyDone:this]; + [[mainFrame webView] setPolicyDelegate:policyDelegate]; +} |