diff options
Diffstat (limited to 'WebKit/mac/WebCoreSupport')
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebChromeClient.h | 2 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebChromeClient.mm | 51 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h | 6 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm | 51 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebGeolocation.mm | 66 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebGeolocationInternal.h | 38 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebGeolocationMock.mm | 1 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebGeolocationPrivate.h | 37 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebInspectorClient.h | 5 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebInspectorClient.mm | 8 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebPluginHalterClient.h | 3 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm | 7 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebSystemInterface.m | 8 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebViewFactory.mm | 64 |
14 files changed, 175 insertions, 172 deletions
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.h b/WebKit/mac/WebCoreSupport/WebChromeClient.h index a8f22f6..ca2863e 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -53,6 +53,8 @@ public: virtual bool canTakeFocus(WebCore::FocusDirection); virtual void takeFocus(WebCore::FocusDirection); + virtual void focusedNodeChanged(WebCore::Node*); + virtual WebCore::Page* createWindow(WebCore::Frame*, const WebCore::FrameLoadRequest&, const WebCore::WindowFeatures&); virtual void show(); diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index c107299..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; -@interface WebOpenPanelResultListener : NSObject <WebOpenPanelResultListener> { +@interface WebOpenPanelResultListener : NSObject <WebOpenPanelResultListener> +{ FileChooser* _chooser; } - (id)initWithChooser:(PassRefPtr<FileChooser>)chooser; @end +@interface WebGeolocationPolicyListener : NSObject <WebGeolocationPolicyListener> +{ + RefPtr<Geolocation> _geolocation; +} +- (id)initWithGeolocation:(Geolocation*)geolocation; +@end + WebChromeClient::WebChromeClient(WebView *webView) : m_webView(webView) { @@ -172,6 +179,10 @@ void WebChromeClient::takeFocus(FocusDirection direction) } } +void WebChromeClient::focusedNodeChanged(Node*) +{ +} + Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& request, const WindowFeatures& features) { NSURLRequest *URLRequest = nil; @@ -753,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; } @@ -823,3 +842,25 @@ void WebChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geoloca } @end + +@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); +} + +@end diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index cf6eb0b..2774783 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -91,6 +91,10 @@ private: virtual void dispatchDidCancelClientRedirect(); virtual void dispatchWillPerformClientRedirect(const WebCore::KURL&, double interval, double fireDate); virtual void dispatchDidChangeLocationWithinPage(); + virtual void dispatchDidPushStateWithinPage(); + virtual void dispatchDidReplaceStateWithinPage(); + virtual void dispatchDidPopStateWithinPage(); + virtual void dispatchWillClose(); virtual void dispatchDidReceiveIcon(); virtual void dispatchDidStartProvisionalLoad(); @@ -194,7 +198,7 @@ private: virtual WebCore::ObjectContentType objectContentType(const WebCore::KURL& url, const WebCore::String& mimeType); virtual WebCore::String overrideMediaType() const; - virtual void windowObjectCleared(); + virtual void dispatchDidClearWindowObjectInWorld(WebCore::DOMWrapperWorld*); virtual void documentElementAvailable(); virtual void didPerformFirstNavigation() const; diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index efd1f68..9816e01 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -69,6 +69,7 @@ #import "WebPolicyDelegatePrivate.h" #import "WebPreferences.h" #import "WebResourceLoadDelegate.h" +#import "WebScriptWorldInternal.h" #import "WebSecurityOriginInternal.h" #import "WebUIDelegate.h" #import "WebUIDelegatePrivate.h" @@ -128,6 +129,7 @@ using namespace WebCore; using namespace HTMLNames; +using namespace std; #if ENABLE(MAC_JAVA_BRIDGE) @interface NSView (WebJavaPluginDetails) @@ -536,6 +538,30 @@ void WebFrameLoaderClient::dispatchDidChangeLocationWithinPage() CallFrameLoadDelegate(implementations->didChangeLocationWithinPageForFrameFunc, webView, @selector(webView:didChangeLocationWithinPageForFrame:), m_webFrame.get()); } +void WebFrameLoaderClient::dispatchDidPushStateWithinPage() +{ + WebView *webView = getWebView(m_webFrame.get()); + WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); + if (implementations->didPushStateWithinPageForFrameFunc) + CallFrameLoadDelegate(implementations->didPushStateWithinPageForFrameFunc, webView, @selector(webView:didPushStateWithinPageForFrame:), m_webFrame.get()); +} + +void WebFrameLoaderClient::dispatchDidReplaceStateWithinPage() +{ + WebView *webView = getWebView(m_webFrame.get()); + WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); + if (implementations->didReplaceStateWithinPageForFrameFunc) + CallFrameLoadDelegate(implementations->didReplaceStateWithinPageForFrameFunc, webView, @selector(webView:didReplaceStateWithinPageForFrame:), m_webFrame.get()); +} + +void WebFrameLoaderClient::dispatchDidPopStateWithinPage() +{ + WebView *webView = getWebView(m_webFrame.get()); + WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); + if (implementations->didPopStateWithinPageForFrameFunc) + CallFrameLoadDelegate(implementations->didPopStateWithinPageForFrameFunc, webView, @selector(webView:didPopStateWithinPageForFrame:), m_webFrame.get()); +} + void WebFrameLoaderClient::dispatchWillClose() { WebView *webView = getWebView(m_webFrame.get()); @@ -963,7 +989,7 @@ bool WebFrameLoaderClient::canHandleRequest(const ResourceRequest& request) cons bool WebFrameLoaderClient::canShowMIMEType(const String& MIMEType) const { - return [WebView canShowMIMEType:MIMEType]; + return [getWebView(m_webFrame.get()) _canShowMIMEType:MIMEType]; } bool WebFrameLoaderClient::representationExistsForURLScheme(const String& URLScheme) const @@ -1127,7 +1153,7 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage() if (usesDocumentViews) { // FIXME (Viewless): I assume we want the equivalent of this optimization for viewless mode too. - bool willProduceHTMLView = [[WebFrameView class] _viewClassForMIMEType:[dataSource _responseMIMEType]] == [WebHTMLView class]; + bool willProduceHTMLView = [m_webFrame->_private->webFrameView _viewClassForMIMEType:[dataSource _responseMIMEType]] == [WebHTMLView class]; bool canSkipCreation = core(m_webFrame.get())->loader()->committingFirstRealLoad() && willProduceHTMLView; if (canSkipCreation) { [[m_webFrame->_private->webFrameView documentView] setDataSource:dataSource]; @@ -1234,7 +1260,7 @@ String WebFrameLoaderClient::userAgent(const KURL& url) if (!webView) return String(""); - return [webView _userAgentForURL:url]; + return [webView userAgentForURL:url]; } static const MouseEvent* findMouseEvent(const Event* event) @@ -1375,7 +1401,7 @@ ObjectContentType WebFrameLoaderClient::objectContentType(const KURL& url, const return ObjectContentOtherPlugin; } - if ([WebFrameView _viewClassForMIMEType:type]) + if ([m_webFrame->_private->webFrameView _viewClassForMIMEType:type]) return ObjectContentFrame; return ObjectContentNone; @@ -1701,12 +1727,23 @@ String WebFrameLoaderClient::overrideMediaType() const void WebFrameLoaderClient::documentElementAvailable() { } -void WebFrameLoaderClient::windowObjectCleared() +void WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world) { - Frame *frame = core(m_webFrame.get()); - ScriptController *script = frame->script(); WebView *webView = getWebView(m_webFrame.get()); WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); + + if (implementations->didClearWindowObjectForFrameInScriptWorldFunc) { + CallFrameLoadDelegate(implementations->didClearWindowObjectForFrameInScriptWorldFunc, + webView, @selector(webView:didClearWindowObjectForFrame:inScriptWorld:), m_webFrame.get(), [WebScriptWorld findOrCreateWorld:world]); + return; + } + + if (world != mainThreadNormalWorld()) + return; + + Frame *frame = core(m_webFrame.get()); + ScriptController *script = frame->script(); + if (implementations->didClearWindowObjectForFrameFunc) { CallFrameLoadDelegate(implementations->didClearWindowObjectForFrameFunc, webView, @selector(webView:didClearWindowObject:forFrame:), script->windowScriptObject(), m_webFrame.get()); 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; - -@implementation WebGeolocation (WebInternal) - -- (id)_initWithWebCoreGeolocation:(WebCoreGeolocation *)geolocation -{ - ASSERT(geolocation); - - self = [super init]; - if (self) { - geolocation->ref(); - _private = reinterpret_cast<WebGeolocationPrivate*>(geolocation); - } - return self; -} - -@end - -@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]; -} - -@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; - -@interface WebGeolocation (WebInternal) - -- (id)_initWithWebCoreGeolocation:(WebCoreGeolocation *)geolocation; - -@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> - -@class WebGeolocationPrivate; - -@interface WebGeolocation : NSObject { -@private - WebGeolocationPrivate *_private; -} - -- (BOOL)shouldClearCache; -- (void)setIsAllowed:(BOOL)allowed; -@end diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.h b/WebKit/mac/WebCoreSupport/WebInspectorClient.h index 7487728..64621f8 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.h +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.h @@ -62,9 +62,8 @@ public: virtual void hideHighlight(); virtual void inspectedURLChanged(const WebCore::String& newURL); - virtual void populateSetting(const WebCore::String& key, WebCore::InspectorController::Setting&); - virtual void storeSetting(const WebCore::String& key, const WebCore::InspectorController::Setting&); - virtual void removeSetting(const WebCore::String& key); + virtual void populateSetting(const WebCore::String& key, WebCore::String* value); + virtual void storeSetting(const WebCore::String& key, const WebCore::String& value); virtual void inspectorWindowObjectCleared(); diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm index 6a4f67d..01515b1 100644 --- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm +++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm @@ -327,8 +327,8 @@ void WebInspectorClient::inspectorWindowObjectCleared() _visible = YES; // If no preference is set - default to an attached window. This is important for inspector LayoutTests. - InspectorController::Setting shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName); - _shouldAttach = (shouldAttach.type() == InspectorController::Setting::BooleanType) ? shouldAttach.booleanValue() : true; + String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(inspectorStartsAttachedName); + _shouldAttach = shouldAttach != "false"; if (_shouldAttach) { WebFrameView *frameView = [[_inspectedWebView mainFrame] frameView]; @@ -362,7 +362,7 @@ void WebInspectorClient::inspectorWindowObjectCleared() if (_attachedToInspectedWebView) return; - [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, InspectorController::Setting(true)); + [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "true"); _movingWindows = YES; [self close]; @@ -376,7 +376,7 @@ void WebInspectorClient::inspectorWindowObjectCleared() if (!_attachedToInspectedWebView) return; - [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, InspectorController::Setting(false)); + [_inspectedWebView page]->inspectorController()->setSetting(inspectorStartsAttachedName, "false"); _movingWindows = YES; [self close]; diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h index 0bab4e3..a0d398d 100644 --- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h +++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h @@ -27,6 +27,7 @@ namespace WebCore { class Node; + class String; } @class WebView; @@ -35,7 +36,7 @@ class WebPluginHalterClient : public WebCore::PluginHalterClient { public: WebPluginHalterClient(WebView *); - virtual bool shouldHaltPlugin(WebCore::Node*) const; + virtual bool shouldHaltPlugin(WebCore::Node*, bool, const WebCore::String&) const; virtual bool enabled() const; private: diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm index b83e4c8..0c87d19 100644 --- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm +++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm @@ -28,6 +28,7 @@ #import "DOMNodeInternal.h" #import "WebDelegateImplementationCaching.h" #import "WebView.h" +#import <WebCore/PlatformString.h> using namespace WebCore; @@ -37,10 +38,10 @@ WebPluginHalterClient::WebPluginHalterClient(WebView *webView) ASSERT_ARG(webView, webView); } -bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode) const +bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode, bool isWindowed, const String& pluginName) const { - ASSERT_ARG(pluginNode, pluginNode); - return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:), kit(pluginNode)); + ASSERT_ARG(pluginNode, pluginNode); + return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:isWindowed:pluginName:), kit(pluginNode), isWindowed, (NSString *)pluginName); } bool WebPluginHalterClient::enabled() const diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.m b/WebKit/mac/WebCoreSupport/WebSystemInterface.m index f957814..f2a215d 100644 --- a/WebKit/mac/WebCoreSupport/WebSystemInterface.m +++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.m @@ -1,5 +1,5 @@ /* - * Copyright 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright 2006, 2007, 2008, 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 @@ -41,6 +41,7 @@ void InitWebCoreSystemInterface(void) INIT(AdvanceDefaultButtonPulseAnimation); INIT(CGContextGetShouldSmoothFonts); + INIT(CopyCONNECTProxyResponse); INIT(CreateCustomCFReadStream); INIT(CreateNSURLConnectionDelegateProxy); INIT(DrawCapsLockIndicator); @@ -62,8 +63,11 @@ void InitWebCoreSystemInterface(void) INIT(InitializeMaximumHTTPConnectionCountPerHost); INIT(IsLatchingWheelEvent); INIT(MeasureMediaUIPart); + INIT(MediaControllerThemeAvailable); INIT(PopupMenu); INIT(SetCGFontRenderingMode); + INIT(SetCONNECTProxyAuthorizationForStream); + INIT(SetCONNECTProxyForStream); INIT(SetDragImage); INIT(SetNSURLConnectionDefersCallbacks); INIT(SetNSURLRequestShouldContentSniff); @@ -79,6 +83,8 @@ void InitWebCoreSystemInterface(void) INIT(QTMovieMaxTimeLoadedChangeNotification); INIT(QTMovieMaxTimeSeekable); INIT(QTMovieGetType); + INIT(QTMovieHasClosedCaptions); + INIT(QTMovieSetShowClosedCaptions); INIT(QTMovieViewSetDrawSynchronously); #ifndef BUILDING_ON_TIGER diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm index 79b2959..99729dc 100644 --- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm +++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm @@ -555,6 +555,12 @@ - (NSString *)AXARIAContentGroupText:(NSString *)ariaType { + if ([ariaType isEqualToString:@"ARIAApplicationAlert"]) + return UI_STRING("alert", "An ARIA accessibility group that acts as an alert."); + if ([ariaType isEqualToString:@"ARIAApplicationAlertDialog"]) + return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); + if ([ariaType isEqualToString:@"ARIAApplicationDialog"]) + return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog."); if ([ariaType isEqualToString:@"ARIAApplicationLog"]) return UI_STRING("log", "An ARIA accessibility group that acts as a console log."); if ([ariaType isEqualToString:@"ARIAApplicationMarquee"]) @@ -587,6 +593,10 @@ return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website."); if ([ariaType isEqualToString:@"ARIAUserInterfaceTooltip"]) return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip."); + if ([ariaType isEqualToString:@"ARIATabPanel"]) + return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab."); + if ([ariaType isEqualToString:@"ARIADocumentMath"]) + return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols."); return nil; } @@ -684,6 +694,11 @@ return UI_STRING("fast forward", "accessibility role description for fast forward button"); if ([name isEqualToString:@"SeekBackButton"]) return UI_STRING("fast reverse", "accessibility role description for fast reverse button"); + if ([name isEqualToString:@"ShowClosedCaptionsButton"]) + return UI_STRING("show closed captions", "accessibility role description for show closed captions button"); + if ([name isEqualToString:@"HideClosedCaptionsButton"]) + return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button"); + ASSERT_NOT_REACHED(); return @""; } @@ -723,6 +738,10 @@ return UI_STRING("seek quickly forward", "accessibility help text for fast forward button"); if ([name isEqualToString:@"FullscreenButton"]) return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); + if ([name isEqualToString:@"ShowClosedCaptionsButton"]) + return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button"); + if ([name isEqualToString:@"HideClosedCaptionsButton"]) + return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button"); ASSERT_NOT_REACHED(); return @""; } @@ -730,7 +749,7 @@ - (NSString*)localizedMediaTimeDescription:(float)time { if (!isfinite(time)) - return UI_STRING("indefinite time", "string for an indefinite movie time"); + return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value"); int seconds = (int)fabsf(time); int days = seconds / (60 * 60 * 24); @@ -739,13 +758,48 @@ seconds %= 60; if (days) - return [NSString stringWithFormat:UI_STRING("date.format.for.days", "string for days, hours, minutes & seconds"), days, hours, minutes, seconds]; + return [NSString stringWithFormat:UI_STRING("%1$d days %2$d hours %3$d minutes %4$d seconds", "accessibility help text for media controller time value >= 1 day"), days, hours, minutes, seconds]; else if (hours) - return [NSString stringWithFormat:UI_STRING("date.format.for.hours", "string for hours, minutes & seconds"), hours, minutes, seconds]; + return [NSString stringWithFormat:UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds]; else if (minutes) - return [NSString stringWithFormat:UI_STRING("date.format.for.minutes", "string for minutes & seconds"), minutes, seconds]; + return [NSString stringWithFormat:UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds]; + + return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds]; +} + +- (NSString *)validationMessageValueMissingText +{ + return UI_STRING("value missing", "Validation message for required form control elements that have no value"); +} + +- (NSString *)validationMessageTypeMismatchText +{ + return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type"); +} + +- (NSString *)validationMessagePatternMismatchText +{ + return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); +} + +- (NSString *)validationMessageTooLongText +{ + return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length"); +} - return [NSString stringWithFormat:UI_STRING("date.format.for.seconds", "string for seconds"), seconds]; +- (NSString *)validationMessageRangeUnderflowText +{ + return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum"); +} + +- (NSString *)validationMessageRangeOverflowText +{ + return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum"); +} + +- (NSString *)validationMessageStepMismatchText +{ + return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); } @end |