diff options
Diffstat (limited to 'WebKit/mac/WebCoreSupport')
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebChromeClient.mm | 9 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebEditorClient.mm | 9 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h | 1 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm | 13 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebPluginHalterClient.h | 1 | ||||
-rw-r--r-- | WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm | 5 |
6 files changed, 22 insertions, 16 deletions
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm index a3f004e..c107299 100644 --- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -548,6 +548,15 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t spaceNeeded) void WebChromeClient::populateVisitedLinks() { + if ([m_webView historyDelegate]) { + WebHistoryDelegateImplementationCache* implementations = WebViewGetHistoryDelegateImplementations(m_webView); + + if (implementations->populateVisitedLinksFunc) + CallHistoryDelegate(implementations->populateVisitedLinksFunc, m_webView, @selector(populateVisitedLinksForWebView:)); + + return; + } + BEGIN_BLOCK_OBJC_EXCEPTIONS; [[WebHistory optionalSharedHistory] _addVisitedLinksToPageGroup:[m_webView page]->group()]; END_BLOCK_OBJC_EXCEPTIONS; diff --git a/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/WebKit/mac/WebCoreSupport/WebEditorClient.mm index e8c37d5..1e03d88 100644 --- a/WebKit/mac/WebCoreSupport/WebEditorClient.mm +++ b/WebKit/mac/WebCoreSupport/WebEditorClient.mm @@ -675,7 +675,8 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector NSValue *detailRangeAsNSValue = [detail objectForKey:NSGrammarRange]; ASSERT(detailRangeAsNSValue); NSRange detailNSRange = [detailRangeAsNSValue rangeValue]; - ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0); + ASSERT(detailNSRange.location != NSNotFound); + ASSERT(detailNSRange.length > 0); grammarDetail.location = detailNSRange.location; grammarDetail.length = detailNSRange.length; grammarDetail.userDescription = [detail objectForKey:NSGrammarUserDescription]; @@ -696,7 +697,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64 for (NSTextCheckingResult *incomingResult in incomingResults) { NSRange resultRange = [incomingResult range]; NSTextCheckingType resultType = [incomingResult resultType]; - ASSERT(resultRange.location != NSNotFound && resultRange.length > 0); + ASSERT(resultRange.location != NSNotFound); + ASSERT(resultRange.length > 0); if (NSTextCheckingTypeSpelling == resultType && 0 != (checkingTypes & NSTextCheckingTypeSpelling)) { TextCheckingResult result; result.type = TextCheckingTypeSpelling; @@ -715,7 +717,8 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64 NSValue *detailRangeAsNSValue = [incomingDetail objectForKey:NSGrammarRange]; ASSERT(detailRangeAsNSValue); NSRange detailNSRange = [detailRangeAsNSValue rangeValue]; - ASSERT(detailNSRange.location != NSNotFound && detailNSRange.length > 0); + ASSERT(detailNSRange.location != NSNotFound); + ASSERT(detailNSRange.length > 0); detail.location = detailNSRange.location; detail.length = detailNSRange.length; detail.userDescription = [incomingDetail objectForKey:NSGrammarUserDescription]; diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index 6259c80..6d365dd 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -208,7 +208,6 @@ private: NSDictionary *actionDictionary(const WebCore::NavigationAction&, PassRefPtr<WebCore::FormState>) const; virtual bool canCachePage() const; - virtual bool shouldLoadMediaElementURL(const WebCore::KURL&) const; RetainPtr<WebFrame> m_webFrame; diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index ec05572..bc6c8f4 100644 --- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -988,7 +988,7 @@ void WebFrameLoaderClient::saveViewStateToItem(HistoryItem* item) void WebFrameLoaderClient::restoreViewState() { - HistoryItem* currentItem = core(m_webFrame.get())->loader()->currentHistoryItem(); + HistoryItem* currentItem = core(m_webFrame.get())->loader()->history()->currentItem(); ASSERT(currentItem); // FIXME: As the ASSERT attests, it seems we should always have a currentItem here. @@ -1738,18 +1738,7 @@ jobject WebFrameLoaderClient::javaApplet(NSView* view) } #endif -bool WebFrameLoaderClient::shouldLoadMediaElementURL(const KURL& url) const { - WebView *webView = getWebView(m_webFrame.get()); - - if (id policyDelegate = [webView policyDelegate]) { - if ([policyDelegate respondsToSelector:@selector(webView:shouldLoadMediaURL:inFrame:)]) - return [policyDelegate webView:webView shouldLoadMediaURL:url inFrame:m_webFrame.get()]; - } - return true; -} - @implementation WebFramePolicyListener - + (void)initialize { JSC::initializeThreading(); diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h index 48c655d..0bab4e3 100644 --- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h +++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.h @@ -36,6 +36,7 @@ public: WebPluginHalterClient(WebView *); virtual bool shouldHaltPlugin(WebCore::Node*) const; + virtual bool enabled() const; private: WebView *m_webView; diff --git a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm index 2384d0b..b83e4c8 100644 --- a/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm +++ b/WebKit/mac/WebCoreSupport/WebPluginHalterClient.mm @@ -42,3 +42,8 @@ bool WebPluginHalterClient::shouldHaltPlugin(Node* pluginNode) const ASSERT_ARG(pluginNode, pluginNode); return CallUIDelegateReturningBoolean(NO, m_webView, @selector(webView:shouldHaltPlugin:), kit(pluginNode)); } + +bool WebPluginHalterClient::enabled() const +{ + return [[m_webView UIDelegate] respondsToSelector:@selector(webView:shouldHaltPlugin:)]; +} |