[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
weinig at apple.com
weinig at apple.com
Wed Apr 7 23:47:50 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit 64a6d422ffbed96d8d1ee50b7fc6d1c4783c9ce8
Author: weinig at apple.com <weinig at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Nov 18 23:44:45 2009 +0000
Make the Mac Geolocation API async.
Reviewed by Anders Carlsson.
WebKit:
* WebKit.xcodeproj/project.pbxproj: Remove WebGeolocation.
WebKit/mac:
* WebCoreSupport/WebChromeClient.mm:
(WebChromeClient::requestGeolocationPermissionForFrame):
(-[WebGeolocationPolicyListener initWithGeolocation:]):
(-[WebGeolocationPolicyListener allow]):
(-[WebGeolocationPolicyListener deny]):
Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener
protocol and use if to implement requestGeolocationPermissionForFrame using the new async
API.
* WebCoreSupport/WebGeolocation.mm: Removed.
* WebCoreSupport/WebGeolocationInternal.h: Removed.
* WebCoreSupport/WebGeolocationMock.mm: Remove bogus include.
* WebCoreSupport/WebGeolocationPrivate.h: Removed.
* WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add
WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate
method.
WebKitTools:
Update DRT to use the new async Mac Geolocation API.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:]):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51147 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0ff88ba..b62b7d0 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-18 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make the Mac Geolocation API async.
+
+ * WebKit.xcodeproj/project.pbxproj: Remove WebGeolocation.
+
2009-11-13 Adam Roben <aroben at apple.com>
Add WebFrameLoadDelegatePrivat.h to WebKit.xcodeproj
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index 2af9d27..39bdccd 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -348,9 +348,6 @@
EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */; };
F834AAD70E64B1C700E2737C /* WebTextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = F834AAD50E64B1C700E2737C /* WebTextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F834AAD60E64B1C700E2737C /* WebTextIterator.mm */; };
- FEF52DFA0F6748F200FF70EE /* WebGeolocation.mm in Sources */ = {isa = PBXBuildFile; fileRef = FEF52DF70F6748F200FF70EE /* WebGeolocation.mm */; };
- FEF52DFB0F6748F200FF70EE /* WebGeolocationInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF52DF80F6748F200FF70EE /* WebGeolocationInternal.h */; };
- FEF52DFC0F6748F200FF70EE /* WebGeolocationPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = FEF52DF90F6748F200FF70EE /* WebGeolocationPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
@@ -702,9 +699,6 @@
F834AAD60E64B1C700E2737C /* WebTextIterator.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebTextIterator.mm; sourceTree = "<group>"; };
F8CA15B5029A39D901000122 /* WebAuthenticationPanel.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebAuthenticationPanel.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F8CA15B6029A39D901000122 /* WebAuthenticationPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebAuthenticationPanel.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- FEF52DF70F6748F200FF70EE /* WebGeolocation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGeolocation.mm; sourceTree = "<group>"; };
- FEF52DF80F6748F200FF70EE /* WebGeolocationInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationInternal.h; sourceTree = "<group>"; };
- FEF52DF90F6748F200FF70EE /* WebGeolocationPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGeolocationPrivate.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -1215,9 +1209,6 @@
4BF99F8F0AE050BC00815C2B /* WebEditorClient.mm */,
931633EA0AEDFF930062B92D /* WebFrameLoaderClient.h */,
931633EE0AEDFFAE0062B92D /* WebFrameLoaderClient.mm */,
- FEF52DF70F6748F200FF70EE /* WebGeolocation.mm */,
- FEF52DF80F6748F200FF70EE /* WebGeolocationInternal.h */,
- FEF52DF90F6748F200FF70EE /* WebGeolocationPrivate.h */,
51494CD40C7EBDE0004178C5 /* WebIconDatabaseClient.h */,
51494CD50C7EBDE0004178C5 /* WebIconDatabaseClient.mm */,
9CE1F8A302A5C6F30ECA2ACD /* WebImageRendererFactory.m */,
@@ -1396,8 +1387,6 @@
9398106E0824BF01008DF038 /* WebFrameView.h in Headers */,
9398106F0824BF01008DF038 /* WebFrameViewInternal.h in Headers */,
939810AF0824BF01008DF038 /* WebFrameViewPrivate.h in Headers */,
- FEF52DFB0F6748F200FF70EE /* WebGeolocationInternal.h in Headers */,
- FEF52DFC0F6748F200FF70EE /* WebGeolocationPrivate.h in Headers */,
939810120824BF01008DF038 /* WebHistory.h in Headers */,
93FDE9330D79CAF30074F029 /* WebHistoryInternal.h in Headers */,
939810130824BF01008DF038 /* WebHistoryItem.h in Headers */,
@@ -1779,7 +1768,6 @@
939810F20824BF01008DF038 /* WebFrame.mm in Sources */,
931633EF0AEDFFAE0062B92D /* WebFrameLoaderClient.mm in Sources */,
939811060824BF01008DF038 /* WebFrameView.mm in Sources */,
- FEF52DFA0F6748F200FF70EE /* WebGeolocation.mm in Sources */,
939811130824BF01008DF038 /* WebHistory.mm in Sources */,
939810BD0824BF01008DF038 /* WebHistoryItem.mm in Sources */,
1AAF5FC00EDE3A92008D883D /* WebHostedNetscapePluginView.mm in Sources */,
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 4d13e33..f9c3185 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,26 @@
+2009-11-18 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make the Mac Geolocation API async.
+
+ * WebCoreSupport/WebChromeClient.mm:
+ (WebChromeClient::requestGeolocationPermissionForFrame):
+ (-[WebGeolocationPolicyListener initWithGeolocation:]):
+ (-[WebGeolocationPolicyListener allow]):
+ (-[WebGeolocationPolicyListener deny]):
+ Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener
+ protocol and use if to implement requestGeolocationPermissionForFrame using the new async
+ API.
+
+ * WebCoreSupport/WebGeolocation.mm: Removed.
+ * WebCoreSupport/WebGeolocationInternal.h: Removed.
+ * WebCoreSupport/WebGeolocationMock.mm: Remove bogus include.
+ * WebCoreSupport/WebGeolocationPrivate.h: Removed.
+ * WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add
+ WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate
+ method.
+
2009-11-18 Chris Marrin <cmarrin at apple.com>
Reviewed by Simon Fraser.
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index c0e8a04..58323bb 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -35,7 +35,6 @@
#import "WebElementDictionary.h"
#import "WebFrameInternal.h"
#import "WebFrameView.h"
-#import "WebGeolocationInternal.h"
#import "WebHTMLViewInternal.h"
#import "WebHistoryInternal.h"
#import "WebKitPrefix.h"
@@ -91,12 +90,20 @@
using namespace WebCore;
- at interface WebOpenPanelResultListener : NSObject <WebOpenPanelResultListener> {
+ at interface WebOpenPanelResultListener : NSObject <WebOpenPanelResultListener>
+{
FileChooser* _chooser;
}
- (id)initWithChooser:(PassRefPtr<FileChooser>)chooser;
@end
+ at interface WebGeolocationPolicyListener : NSObject <WebGeolocationPolicyListener>
+{
+ RefPtr<Geolocation> _geolocation;
+}
+- (id)initWithGeolocation:(Geolocation*)geolocation;
+ at end
+
WebChromeClient::WebChromeClient(WebView *webView)
: m_webView(webView)
{
@@ -757,11 +764,19 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
{
BEGIN_BLOCK_OBJC_EXCEPTIONS;
+ SEL selector = @selector(webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:);
+ if (![[m_webView UIDelegate] respondsToSelector:selector]) {
+ geolocation->setIsAllowed(false);
+ return;
+ }
+
WebSecurityOrigin *webOrigin = [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:frame->document()->securityOrigin()];
- WebGeolocation *webGeolocation = [[WebGeolocation alloc] _initWithWebCoreGeolocation:geolocation];
- CallUIDelegate(m_webView, @selector(webView:frame:requestGeolocationPermission:securityOrigin:), kit(frame), webGeolocation, webOrigin);
+ WebGeolocationPolicyListener* listener = [[WebGeolocationPolicyListener alloc] initWithGeolocation:geolocation];
+
+ CallUIDelegate(m_webView, selector, webOrigin, kit(frame), listener);
+
[webOrigin release];
- [webGeolocation release];
+ [listener release];
END_BLOCK_OBJC_EXCEPTIONS;
}
@@ -827,3 +842,25 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca
}
@end
+
+ at implementation WebGeolocationPolicyListener
+
+- (id)initWithGeolocation:(Geolocation*)geolocation
+{
+ if (!(self = [super init]))
+ return nil;
+ _geolocation = geolocation;
+ return self;
+}
+
+- (void)allow
+{
+ _geolocation->setIsAllowed(true);
+}
+
+- (void)deny
+{
+ _geolocation->setIsAllowed(false);
+}
+
+ at end
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocation.mm b/WebKit/mac/WebCoreSupport/WebGeolocation.mm
deleted file mode 100644
index 89d6ad9..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocation.mm
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Copyright (C) 2009 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. ``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
- * 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.
- */
-
-#import "WebGeolocationInternal.h"
-#import <WebCore/Geolocation.h>
-
-using namespace WebCore;
-
- at implementation WebGeolocation (WebInternal)
-
-- (id)_initWithWebCoreGeolocation:(WebCoreGeolocation *)geolocation
-{
- ASSERT(geolocation);
-
- self = [super init];
- if (self) {
- geolocation->ref();
- _private = reinterpret_cast<WebGeolocationPrivate*>(geolocation);
- }
- return self;
-}
-
- at end
-
- at implementation WebGeolocation
-
-- (BOOL)shouldClearCache
-{
- return reinterpret_cast<Geolocation*>(_private)->shouldClearCache();
-}
-
-- (void)setIsAllowed:(BOOL)allowed
-{
- reinterpret_cast<Geolocation*>(_private)->setIsAllowed(allowed);
-}
-
-- (void)dealloc
-{
- if (_private)
- reinterpret_cast<Geolocation*>(_private)->deref();
- [super dealloc];
-}
-
- at end
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationInternal.h b/WebKit/mac/WebCoreSupport/WebGeolocationInternal.h
deleted file mode 100644
index 8145d4d..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocationInternal.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2009 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. ``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
- * 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.
- */
-
-#import "WebGeolocationPrivate.h"
-
-namespace WebCore {
- class Geolocation;
-}
-
-typedef WebCore::Geolocation WebCoreGeolocation;
-
- at interface WebGeolocation (WebInternal)
-
-- (id)_initWithWebCoreGeolocation:(WebCoreGeolocation *)geolocation;
-
- at end
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
index 95b4301..32e8d0d 100644
--- a/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
+++ b/WebKit/mac/WebCoreSupport/WebGeolocationMock.mm
@@ -25,7 +25,6 @@
#import "WebGeolocationMockPrivate.h"
-#import "WebGeolocationInternal.h"
#import <WebCore/GeolocationServiceMock.h>
#import <WebCore/Geoposition.h>
#import <WebCore/PositionError.h>
diff --git a/WebKit/mac/WebCoreSupport/WebGeolocationPrivate.h b/WebKit/mac/WebCoreSupport/WebGeolocationPrivate.h
deleted file mode 100644
index 5807f7c..0000000
--- a/WebKit/mac/WebCoreSupport/WebGeolocationPrivate.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2009 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. ``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
- * 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.
- */
-
-#import <Foundation/Foundation.h>
-
- at class WebGeolocationPrivate;
-
- at interface WebGeolocation : NSObject {
- at private
- WebGeolocationPrivate *_private;
-}
-
-- (BOOL)shouldClearCache;
-- (void)setIsAllowed:(BOOL)allowed;
- at end
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 0715475..5739497 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -87,9 +87,14 @@ enum {
WebMenuItemTagChangeBack,
WebMenuItemTagBaseApplication = 10000
};
- at class WebGeolocation;
+
@class WebSecurityOrigin;
+ at protocol WebGeolocationPolicyListener <NSObject>
+- (void)allow;
+- (void)deny;
+ at end
+
@interface NSObject (WebUIDelegatePrivate)
- (void)webView:(WebView *)webView addMessageToConsole:(NSDictionary *)message;
@@ -124,7 +129,17 @@ enum {
- (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename;
- (NSString *)webView:(WebView *)sender generateReplacementFile:(NSString *)path;
-- (BOOL)webView:(WebView *)sender frame:(WebFrame *)frame requestGeolocationPermission:(WebGeolocation *)geolocation securityOrigin:(WebSecurityOrigin *)origin;
+/*!
+ @method webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:
+ @abstract
+ @param webView The WebView sending the delegate method.
+ @param origin The security origin that would like to use Geolocation.
+ @param frame The WebFrame whose JavaScript initiated this call.
+ @param listener The object to call when the decision is made
+*/
+- (void)webView:(WebView *)webView decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin *)origin
+ frame:(WebFrame *)frame
+ listener:(id<WebGeolocationPolicyListener>)listener;
- (void)webView:(WebView *)sender formStateDidChangeForNode:(DOMNode *)node;
- (void)webView:(WebView *)sender formDidFocusNode:(DOMNode *)node;
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index e18c488..b036ba8 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,14 @@
+2009-11-18 Sam Weinig <sam at webkit.org>
+
+ Reviewed by Anders Carlsson.
+
+ Make the Mac Geolocation API async.
+
+ Update DRT to use the new async Mac Geolocation API.
+
+ * DumpRenderTree/mac/UIDelegate.mm:
+ (-[UIDelegate webView:decidePolicyForGeolocationRequestFromOrigin:frame:listener:]):
+
2009-11-18 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Reviewed by Kenneth Rohde Christiansen.
diff --git a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
index 393899e..81c03d2 100644
--- a/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
+++ b/WebKitTools/DumpRenderTree/mac/UIDelegate.mm
@@ -34,9 +34,9 @@
#import "EventSendingController.h"
#import "LayoutTestController.h"
#import <WebKit/WebFramePrivate.h>
-#import <WebKit/WebGeolocationPrivate.h>
#import <WebKit/WebHTMLViewPrivate.h>
#import <WebKit/WebSecurityOriginPrivate.h>
+#import <WebKit/WebUIDelegatePrivate.h>
#import <WebKit/WebView.h>
#import <wtf/Assertions.h>
@@ -151,10 +151,14 @@ DumpRenderTreeDraggingInfo *draggingInfo = nil;
printf("UI DELEGATE STATUS CALLBACK: setStatusText:%s\n", [text UTF8String]);
}
-- (void)webView:(WebView *)sender frame:(WebFrame *)frame requestGeolocationPermission:(WebGeolocation *)geolocation securityOrigin:(WebSecurityOrigin *)origin
+- (void)webView:(WebView *)webView decidePolicyForGeolocationRequestFromOrigin:(WebSecurityOrigin *)origin frame:(WebFrame *)frame listener:(id<WebGeolocationPolicyListener>)listener
{
- if (gLayoutTestController->isGeolocationPermissionSet())
- [geolocation setIsAllowed:gLayoutTestController->geolocationPermission()];
+ if (gLayoutTestController->isGeolocationPermissionSet()) {
+ if (gLayoutTestController->geolocationPermission())
+ [listener allow];
+ else
+ [listener deny];
+ }
}
- (BOOL)webView:(WebView *)sender shouldHaltPlugin:(DOMNode *)pluginNode
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list