diff options
author | Ben Murdoch <benm@google.com> | 2011-06-02 12:07:03 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-10 10:47:21 +0100 |
commit | 2daae5fd11344eaa88a0d92b0f6d65f8d2255c00 (patch) | |
tree | e4964fbd1cb70599f7718ff03e50ea1dab33890b /Source/WebKit/mac/WebCoreSupport | |
parent | 87bdf0060a247bfbe668342b87e0874182e0ffa9 (diff) | |
download | external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.zip external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.gz external_webkit-2daae5fd11344eaa88a0d92b0f6d65f8d2255c00.tar.bz2 |
Merge WebKit at r84325: Initial merge by git.
Change-Id: Ic1a909300ecc0a13ddc6b4e784371d2ac6e3d59b
Diffstat (limited to 'Source/WebKit/mac/WebCoreSupport')
10 files changed, 74 insertions, 1072 deletions
diff --git a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h index 8adb79f..15b2c67 100644 --- a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h +++ b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.h @@ -27,8 +27,8 @@ #define CorrectionPanel_h #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) -#import <AppKit/NSTextChecker.h> -#import <WebCore/CorrectionPanelInfo.h> +#import <AppKit/NSSpellChecker.h> +#import <WebCore/SpellingCorrectionController.h> #import <wtf/RetainPtr.h> @class WebView; @@ -46,7 +46,7 @@ public: private: bool isShowing() const { return m_view; } void dismissInternal(WebCore::ReasonForDismissingCorrectionPanel, bool dismissingExternally); - void handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionBubbleType); + void handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionIndicatorType); bool m_wasDismissedExternally; WebCore::ReasonForDismissingCorrectionPanel m_reasonForDismissing; diff --git a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm index 05f3f69..ce52b74 100644 --- a/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm +++ b/Source/WebKit/mac/WebCoreSupport/CorrectionPanel.mm @@ -29,18 +29,18 @@ #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) using namespace WebCore; -static inline NSCorrectionBubbleType correctionBubbleType(CorrectionPanelInfo::PanelType panelType) +static inline NSCorrectionIndicatorType correctionIndicatorType(CorrectionPanelInfo::PanelType panelType) { switch (panelType) { case CorrectionPanelInfo::PanelTypeCorrection: - return NSCorrectionBubbleTypeCorrection; + return NSCorrectionIndicatorTypeDefault; case CorrectionPanelInfo::PanelTypeReversion: - return NSCorrectionBubbleTypeReversion; + return NSCorrectionIndicatorTypeReversion; case CorrectionPanelInfo::PanelTypeSpellingSuggestions: - return NSCorrectionBubbleTypeGuesses; + return NSCorrectionIndicatorTypeGuesses; } ASSERT_NOT_REACHED(); - return NSCorrectionBubbleTypeCorrection; + return NSCorrectionIndicatorTypeDefault; } CorrectionPanel::CorrectionPanel() @@ -65,7 +65,7 @@ void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, c NSString* replacedStringAsNSString = replacedString; NSString* replacementStringAsNSString = replacementString; m_view = view; - NSCorrectionBubbleType bubbleType = correctionBubbleType(type); + NSCorrectionIndicatorType indicatorType = correctionIndicatorType(type); NSMutableArray* alternativeStrings = 0; if (!alternativeReplacementStrings.isEmpty()) { @@ -75,8 +75,8 @@ void CorrectionPanel::show(WebView* view, CorrectionPanelInfo::PanelType type, c [alternativeStrings addObject:(NSString*)alternativeReplacementStrings[i]]; } - [[NSSpellChecker sharedSpellChecker] showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:alternativeStrings forStringInRect:boundingBoxOfReplacedString view:m_view.get() completionHandler:^(NSString* acceptedString) { - handleAcceptedReplacement(acceptedString, replacedStringAsNSString, replacementStringAsNSString, bubbleType); + [[NSSpellChecker sharedSpellChecker] showCorrectionIndicatorOfType:indicatorType primaryString:replacementStringAsNSString alternativeStrings:alternativeStrings forStringInRect:[view convertRect:boundingBoxOfReplacedString fromView:nil] view:m_view.get() completionHandler:^(NSString* acceptedString) { + handleAcceptedReplacement(acceptedString, replacedStringAsNSString, replacementStringAsNSString, indicatorType); }]; } @@ -106,7 +106,7 @@ void CorrectionPanel::dismissInternal(ReasonForDismissingCorrectionPanel reason, m_reasonForDismissing = reason; m_resultForSynchronousDismissal.clear(); - [[NSSpellChecker sharedSpellChecker] dismissCorrectionBubbleForView:m_view.get()]; + [[NSSpellChecker sharedSpellChecker] dismissCorrectionIndicatorForView:m_view.get()]; m_view.clear(); } @@ -115,13 +115,13 @@ void CorrectionPanel::recordAutocorrectionResponse(WebView* view, NSCorrectionRe [[NSSpellChecker sharedSpellChecker] recordResponse:response toCorrection:replacementString forWord:replacedString language:nil inSpellDocumentWithTag:[view spellCheckerDocumentTag]]; } -void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionBubbleType correctionBubbleType) +void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, NSString* replaced, NSString* proposedReplacement, NSCorrectionIndicatorType correctionIndicatorType) { NSSpellChecker* spellChecker = [NSSpellChecker sharedSpellChecker]; NSInteger documentTag = [m_view.get() spellCheckerDocumentTag]; - switch (correctionBubbleType) { - case NSCorrectionBubbleTypeCorrection: + switch (correctionIndicatorType) { + case NSCorrectionIndicatorTypeDefault: if (acceptedReplacement) [spellChecker recordResponse:NSCorrectionResponseAccepted toCorrection:acceptedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag]; else { @@ -131,11 +131,11 @@ void CorrectionPanel::handleAcceptedReplacement(NSString* acceptedReplacement, N [spellChecker recordResponse:NSCorrectionResponseIgnored toCorrection:proposedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag]; } break; - case NSCorrectionBubbleTypeReversion: + case NSCorrectionIndicatorTypeReversion: if (acceptedReplacement) [spellChecker recordResponse:NSCorrectionResponseReverted toCorrection:replaced forWord:acceptedReplacement language:nil inSpellDocumentWithTag:documentTag]; break; - case NSCorrectionBubbleTypeGuesses: + case NSCorrectionIndicatorTypeGuesses: if (acceptedReplacement) [spellChecker recordResponse:NSCorrectionResponseAccepted toCorrection:acceptedReplacement forWord:replaced language:nil inSpellDocumentWithTag:documentTag]; break; diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h index 412cb45..0e52102 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h @@ -130,7 +130,7 @@ public: virtual void checkSpellingOfString(const UChar*, int length, int* misspellingLocation, int* misspellingLength); virtual WTF::String getAutoCorrectSuggestionForMisspelledWord(const WTF::String&); virtual void checkGrammarOfString(const UChar*, int length, WTF::Vector<WebCore::GrammarDetail>&, int* badGrammarLocation, int* badGrammarLength); - virtual void checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, WTF::Vector<WebCore::TextCheckingResult>& results); + virtual void checkTextOfParagraph(const UChar* text, int length, WebCore::TextCheckingTypeMask checkingTypes, WTF::Vector<WebCore::TextCheckingResult>& results); virtual void updateSpellingUIWithGrammarString(const WTF::String&, const WebCore::GrammarDetail&); virtual void updateSpellingUIWithMisspelledWord(const WTF::String&); virtual void showSpellingUI(bool show); @@ -138,7 +138,7 @@ public: virtual void getGuessesForWord(const WTF::String& word, const WTF::String& context, WTF::Vector<WTF::String>& guesses); virtual void willSetInputMethodState(); virtual void setInputMethodState(bool enabled); - virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&); + virtual void requestCheckingOfString(WebCore::SpellChecker*, int, WebCore::TextCheckingTypeMask, const WTF::String&); #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings); virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel); diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm index c205ef6..2300be1 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm @@ -69,28 +69,15 @@ #import <runtime/InitializeThreading.h> #import <wtf/PassRefPtr.h> #import <wtf/Threading.h> -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) -#import <AppKit/NSTextChecker.h> -#endif using namespace WebCore; using namespace HTMLNames; #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) -static inline NSCorrectionBubbleType correctionBubbleType(CorrectionPanelInfo::PanelType panelType) -{ - switch (panelType) { - case CorrectionPanelInfo::PanelTypeCorrection: - return NSCorrectionBubbleTypeCorrection; - case CorrectionPanelInfo::PanelTypeReversion: - return NSCorrectionBubbleTypeReversion; - case CorrectionPanelInfo::PanelTypeSpellingSuggestions: - return NSCorrectionBubbleTypeGuesses; - } - ASSERT_NOT_REACHED(); - return NSCorrectionBubbleTypeCorrection; -} +@interface NSSpellChecker (WebNSSpellCheckerDetails) +- (NSString *)languageForWordRange:(NSRange)range inString:(NSString *)string orthography:(NSOrthography *)orthography; +@end #endif @interface NSAttributedString (WebNSAttributedStringDetails) @@ -790,12 +777,11 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector #endif } -void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64_t checkingTypes, Vector<TextCheckingResult>& results) -{ #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) - NSString *textString = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(text) length:length freeWhenDone:NO]; - NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString range:NSMakeRange(0, [textString length]) types:(checkingTypes|NSTextCheckingTypeOrthography) options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() orthography:NULL wordCount:NULL]; - [textString release]; +static Vector<TextCheckingResult> core(NSArray *incomingResults, TextCheckingTypeMask checkingTypes) +{ + Vector<TextCheckingResult> results; + for (NSTextCheckingResult *incomingResult in incomingResults) { NSRange resultRange = [incomingResult range]; NSTextCheckingType resultType = [incomingResult resultType]; @@ -867,6 +853,18 @@ void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, uint64 results.append(result); } } + + return results; +} +#endif + +void WebEditorClient::checkTextOfParagraph(const UChar* text, int length, TextCheckingTypeMask checkingTypes, Vector<TextCheckingResult>& results) +{ +#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) + NSString *textString = [[NSString alloc] initWithCharactersNoCopy:const_cast<UChar*>(text) length:length freeWhenDone:NO]; + NSArray *incomingResults = [[NSSpellChecker sharedSpellChecker] checkString:textString range:NSMakeRange(0, [textString length]) types:(checkingTypes|NSTextCheckingTypeOrthography) options:nil inSpellDocumentWithTag:spellCheckerDocumentTag() orthography:NULL wordCount:NULL]; + [textString release]; + results = core(incomingResults, checkingTypes); #endif } @@ -965,58 +963,35 @@ void WebEditorClient::setInputMethodState(bool) { WebCore::SpellChecker* _sender; int _sequence; + TextCheckingTypeMask _types; RetainPtr<NSArray> _results; } -- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence results:(NSArray*)results; +- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence types:(WebCore::TextCheckingTypeMask)types results:(NSArray*)results; - (void)perform; -- (WTF::Vector<WebCore::SpellCheckingResult>) _coreResults; @end @implementation WebEditorSpellCheckResponder -- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence results:(NSArray*)results +- (id)initWithSender:(WebCore::SpellChecker*)sender sequence:(int)sequence types:(WebCore::TextCheckingTypeMask)types results:(NSArray*)results { self = [super init]; if (!self) return nil; _sender = sender; _sequence = sequence; + _types = types; _results = results; return self; } - (void)perform { - _sender->didCheck(_sequence, [self _coreResults]); -} - -static SpellCheckingResult toCoreSpellingResult(NSTextCheckingResult* result) -{ - NSTextCheckingType type = [result resultType]; - NSRange range = [result range]; - DocumentMarker::MarkerType coreType; - if (type & NSTextCheckingTypeSpelling) - coreType = DocumentMarker::Spelling; - else if (type & NSTextCheckingTypeGrammar) - coreType = DocumentMarker::Grammar; - else - coreType = DocumentMarker::AllMarkers; - - return SpellCheckingResult(coreType, range.location, range.length); -} - -- (WTF::Vector<WebCore::SpellCheckingResult>)_coreResults -{ - WTF::Vector<WebCore::SpellCheckingResult> coreResults; - coreResults.reserveCapacity([_results.get() count]); - for (NSTextCheckingResult* result in _results.get()) - coreResults.append(toCoreSpellingResult(result)); - return coreResults; + _sender->didCheck(_sequence, core(_results.get(), _types)); } @end #endif -void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker* sender, int sequence, const String& text) +void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker* sender, int sequence, WebCore::TextCheckingTypeMask checkingTypes, const String& text) { #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) NSRange range = NSMakeRange(0, text.length()); @@ -1024,7 +999,7 @@ void WebEditorClient::requestCheckingOfString(WebCore::SpellChecker* sender, int [[NSSpellChecker sharedSpellChecker] requestCheckingOfString:text range:range types:NSTextCheckingAllSystemTypes options:0 inSpellDocumentWithTag:0 completionHandler:^(NSInteger, NSArray* results, NSOrthography*, NSInteger) { [currentLoop performSelector:@selector(perform) - target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence results:results] autorelease] + target:[[[WebEditorSpellCheckResponder alloc] initWithSender:sender sequence:sequence types:checkingTypes results:results] autorelease] argument:nil order:0 modes:[NSArray arrayWithObject:NSDefaultRunLoopMode]]; }]; #endif diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index 4fe5664..c415c10 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -83,7 +83,7 @@ private: virtual bool canAuthenticateAgainstProtectionSpace(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ProtectionSpace&); #endif virtual void dispatchDidReceiveResponse(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceResponse&); - virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int lengthReceived); + virtual void dispatchDidReceiveContentLength(WebCore::DocumentLoader*, unsigned long identifier, int dataLength); virtual void dispatchDidFinishLoading(WebCore::DocumentLoader*, unsigned long identifier); virtual void dispatchDidFailLoading(WebCore::DocumentLoader*, unsigned long identifier, const WebCore::ResourceError&); @@ -101,7 +101,7 @@ private: virtual void dispatchWillClose(); virtual void dispatchDidReceiveIcon(); virtual void dispatchDidStartProvisionalLoad(); - virtual void dispatchDidReceiveTitle(const WTF::String& title); + virtual void dispatchDidReceiveTitle(const WebCore::StringWithDirection&); virtual void dispatchDidChangeIcons(); virtual void dispatchDidCommitLoad(); virtual void dispatchDidFailProvisionalLoad(const WebCore::ResourceError&); @@ -196,7 +196,7 @@ private: virtual void prepareForDataSourceReplacement(); virtual PassRefPtr<WebCore::DocumentLoader> createDocumentLoader(const WebCore::ResourceRequest&, const WebCore::SubstituteData&); - virtual void setTitle(const WTF::String& title, const WebCore::KURL&); + virtual void setTitle(const WebCore::StringWithDirection&, const WebCore::KURL&); virtual PassRefPtr<WebCore::Frame> createFrame(const WebCore::KURL& url, const WTF::String& name, WebCore::HTMLFrameOwnerElement*, const WTF::String& referrer, bool allowsScrolling, int marginWidth, int marginHeight); diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 92c2b03..1b5766a 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -491,13 +491,13 @@ NSCachedURLResponse* WebFrameLoaderClient::willCacheResponse(DocumentLoader* loa return response; } -void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int lengthReceived) +void WebFrameLoaderClient::dispatchDidReceiveContentLength(DocumentLoader* loader, unsigned long identifier, int dataLength) { WebView *webView = getWebView(m_webFrame.get()); WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView); if (implementations->didReceiveContentLengthFunc) { if (id resource = [webView _objectForIdentifier:identifier]) - CallResourceLoadDelegate(implementations->didReceiveContentLengthFunc, webView, @selector(webView:resource:didReceiveContentLength:fromDataSource:), resource, (NSInteger)lengthReceived, dataSource(loader)); + CallResourceLoadDelegate(implementations->didReceiveContentLengthFunc, webView, @selector(webView:resource:didReceiveContentLength:fromDataSource:), resource, (NSInteger)dataLength, dataSource(loader)); } } @@ -624,12 +624,13 @@ void WebFrameLoaderClient::dispatchDidStartProvisionalLoad() CallFrameLoadDelegate(implementations->didStartProvisionalLoadForFrameFunc, webView, @selector(webView:didStartProvisionalLoadForFrame:), m_webFrame.get()); } -void WebFrameLoaderClient::dispatchDidReceiveTitle(const String& title) +void WebFrameLoaderClient::dispatchDidReceiveTitle(const StringWithDirection& title) { WebView *webView = getWebView(m_webFrame.get()); WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView); if (implementations->didReceiveTitleForFrameFunc) - CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title, m_webFrame.get()); + // FIXME: use direction of title. + CallFrameLoadDelegate(implementations->didReceiveTitleForFrameFunc, webView, @selector(webView:didReceiveTitle:forFrame:), (NSString *)title.string(), m_webFrame.get()); } void WebFrameLoaderClient::dispatchDidChangeIcons() @@ -893,7 +894,7 @@ void WebFrameLoaderClient::updateGlobalHistory() WebHistoryDelegateImplementationCache* implementations = WebViewGetHistoryDelegateImplementations(view); if (implementations->navigatedFunc) { WebNavigationData *data = [[WebNavigationData alloc] initWithURLString:loader->urlForHistory() - title:loader->title() + title:loader->title().string() originalRequest:loader->originalRequestCopy().nsURLRequest() response:loader->response().nsURLResponse() hasSubstituteData:loader->substituteData().isValid() @@ -907,7 +908,7 @@ void WebFrameLoaderClient::updateGlobalHistory() } [[WebHistory optionalSharedHistory] _visitedURL:loader->urlForHistory() - withTitle:loader->title() + withTitle:loader->title().string() method:loader->originalRequestCopy().httpMethod() wasFailure:loader->urlForHistoryReflectsFailure() increaseVisitCount:!loader->clientRedirectSourceForHistory()]; // Do not increase visit count due to navigations that were not initiated by the user directly, avoiding growth from programmatic reloads. @@ -1179,7 +1180,7 @@ PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(const Reso return loader.release(); } -void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) +void WebFrameLoaderClient::setTitle(const StringWithDirection& title, const KURL& url) { WebView* view = getWebView(m_webFrame.get()); @@ -1188,7 +1189,8 @@ void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) if (!implementations->setTitleFunc) return; - CallHistoryDelegate(implementations->setTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:), (NSString *)title, (NSString *)url); + // FIXME: use direction of title. + CallHistoryDelegate(implementations->setTitleFunc, view, @selector(webView:updateHistoryTitle:forURL:), (NSString *)title.string(), (NSString *)url); return; } @@ -1196,7 +1198,7 @@ void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) nsURL = [nsURL _webkit_canonicalize]; if(!nsURL) return; - NSString *titleNSString = title; + NSString *titleNSString = title.string(); [[[WebHistory optionalSharedHistory] itemForURL:nsURL] setTitle:titleNSString]; } @@ -1285,7 +1287,7 @@ void WebFrameLoaderClient::transitionToCommittedForNewPage() // like the ones that Safari uses for bookmarks it is the only way the DocumentLoader // will get the proper title. if (DocumentLoader* documentLoader = [dataSource _documentLoader]) - documentLoader->setTitle([dataSource pageTitle]); + documentLoader->setTitle(StringWithDirection([dataSource pageTitle], LTR)); } if (HTMLFrameOwnerElement* owner = coreFrame->ownerElement()) diff --git a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm index 9b0c893..e701495 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm @@ -36,7 +36,7 @@ #import "WebInspectorPrivate.h" #import "WebInspectorFrontend.h" #import "WebLocalizableStringsInternal.h" -#import "WebNodeHighlight.h" +#import "WebNodeHighlighter.h" #import "WebUIDelegate.h" #import "WebViewInternal.h" #import <WebCore/InspectorController.h> @@ -70,25 +70,13 @@ using namespace WebCore; - (void)destroyInspectorView:(bool)notifyInspectorController; @end -// MARK: - - -@interface WebNodeHighlighter : NSObject { -@private - WebView *_inspectedWebView; - WebNodeHighlight *_currentHighlight; -} -- (id)initWithInspectedWebView:(WebView *)webView; -- (void)highlightNode:(DOMNode *)node; -- (void)hideHighlight; -@end // MARK: - - WebInspectorClient::WebInspectorClient(WebView *webView) -: m_webView(webView) -, m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView]) -, m_frontendPage(0) + : m_webView(webView) + , m_highlighter(AdoptNS, [[WebNodeHighlighter alloc] initWithInspectedWebView:webView]) + , m_frontendPage(0) { } @@ -228,7 +216,7 @@ void WebInspectorFrontendClient::updateWindowTitle() const @implementation WebInspectorWindowController - (id)init { - if (![super initWithWindow:nil]) + if (!(self = [super initWithWindow:nil])) return nil; // Keep preferences separate from the rest of the client, making sure we are using expected preference values. @@ -272,10 +260,10 @@ void WebInspectorFrontendClient::updateWindowTitle() const - (id)initWithInspectedWebView:(WebView *)webView { - if (![self init]) + if (!(self = [self init])) return nil; - // Don't retain to avoid a circular reference + // Don't retain to avoid a circular reference. _inspectedWebView = webView; return self; } @@ -482,19 +470,6 @@ void WebInspectorFrontendClient::updateWindowTitle() const } // MARK: - -// MARK: WebNodeHighlight delegate - -- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight -{ - [_inspectedWebView setCurrentNodeHighlight:highlight]; -} - -- (void)willDetachWebNodeHighlight:(WebNodeHighlight *)highlight -{ - [_inspectedWebView setCurrentNodeHighlight:nil]; -} - -// MARK: - // MARK: UI delegate - (NSUInteger)webView:(WebView *)sender dragDestinationActionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo @@ -548,60 +523,3 @@ void WebInspectorFrontendClient::updateWindowTitle() const } @end - - -// MARK: - - -@implementation WebNodeHighlighter -- (id)initWithInspectedWebView:(WebView *)webView -{ - // Don't retain to avoid a circular reference - _inspectedWebView = webView; - return self; -} - -- (void)dealloc -{ - ASSERT(!_currentHighlight); - [super dealloc]; -} - -// MARK: - - -- (void)highlightNode:(DOMNode *)node -{ - // The scrollview's content view stays around between page navigations, so target it - NSView *view = [[[[[_inspectedWebView mainFrame] frameView] documentView] enclosingScrollView] contentView]; - if (![view window]) - return; // skip the highlight if we have no window (e.g. hidden tab) - - if (!_currentHighlight) { - _currentHighlight = [[WebNodeHighlight alloc] initWithTargetView:view inspectorController:[_inspectedWebView page]->inspectorController()]; - [_currentHighlight setDelegate:self]; - [_currentHighlight attach]; - } else - [[_currentHighlight highlightView] setNeedsDisplay:YES]; -} - -- (void)hideHighlight -{ - [_currentHighlight detach]; - [_currentHighlight setDelegate:nil]; - [_currentHighlight release]; - _currentHighlight = nil; -} - -// MARK: - -// MARK: WebNodeHighlight delegate - -- (void)didAttachWebNodeHighlight:(WebNodeHighlight *)highlight -{ - [_inspectedWebView setCurrentNodeHighlight:highlight]; -} - -- (void)willDetachWebNodeHighlight:(WebNodeHighlight *)highlight -{ - [_inspectedWebView setCurrentNodeHighlight:nil]; -} - -@end diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h index 29bdb8a..87471f6 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h +++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h @@ -29,10 +29,9 @@ #include <WebCore/CookiesStrategy.h> #include <WebCore/PlatformStrategies.h> #include <WebCore/PluginStrategy.h> -#include <WebCore/LocalizationStrategy.h> #include <WebCore/VisitedLinkStrategy.h> -class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { +class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::VisitedLinkStrategy { public: static void initialize(); @@ -42,7 +41,6 @@ private: // WebCore::PlatformStrategies virtual WebCore::CookiesStrategy* createCookiesStrategy(); virtual WebCore::PluginStrategy* createPluginStrategy(); - virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); // WebCore::CookiesStrategy @@ -52,125 +50,6 @@ private: virtual void refreshPlugins(); virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); - // WebCore::LocalizationStrategy - virtual WTF::String inputElementAltText(); - virtual WTF::String resetButtonDefaultLabel(); - virtual WTF::String searchableIndexIntroduction(); - virtual WTF::String submitButtonDefaultLabel(); - virtual WTF::String fileButtonChooseFileLabel(); - virtual WTF::String fileButtonNoFileSelectedLabel(); - virtual WTF::String copyImageUnknownFileLabel(); - virtual WTF::String defaultDetailsSummaryText(); -#if ENABLE(CONTEXT_MENUS) - virtual WTF::String contextMenuItemTagOpenLinkInNewWindow(); - virtual WTF::String contextMenuItemTagDownloadLinkToDisk(); - virtual WTF::String contextMenuItemTagCopyLinkToClipboard(); - virtual WTF::String contextMenuItemTagOpenImageInNewWindow(); - virtual WTF::String contextMenuItemTagDownloadImageToDisk(); - virtual WTF::String contextMenuItemTagCopyImageToClipboard(); - virtual WTF::String contextMenuItemTagOpenFrameInNewWindow(); - virtual WTF::String contextMenuItemTagCopy(); - virtual WTF::String contextMenuItemTagGoBack(); - virtual WTF::String contextMenuItemTagGoForward(); - virtual WTF::String contextMenuItemTagStop(); - virtual WTF::String contextMenuItemTagReload(); - virtual WTF::String contextMenuItemTagCut(); - virtual WTF::String contextMenuItemTagPaste(); - virtual WTF::String contextMenuItemTagNoGuessesFound(); - virtual WTF::String contextMenuItemTagIgnoreSpelling(); - virtual WTF::String contextMenuItemTagLearnSpelling(); - virtual WTF::String contextMenuItemTagSearchWeb(); - virtual WTF::String contextMenuItemTagLookUpInDictionary(const WTF::String& selectedString); - virtual WTF::String contextMenuItemTagOpenLink(); - virtual WTF::String contextMenuItemTagIgnoreGrammar(); - virtual WTF::String contextMenuItemTagSpellingMenu(); - virtual WTF::String contextMenuItemTagShowSpellingPanel(bool show); - virtual WTF::String contextMenuItemTagCheckSpelling(); - virtual WTF::String contextMenuItemTagCheckSpellingWhileTyping(); - virtual WTF::String contextMenuItemTagCheckGrammarWithSpelling(); - virtual WTF::String contextMenuItemTagFontMenu(); - virtual WTF::String contextMenuItemTagBold(); - virtual WTF::String contextMenuItemTagItalic(); - virtual WTF::String contextMenuItemTagUnderline(); - virtual WTF::String contextMenuItemTagOutline(); - virtual WTF::String contextMenuItemTagWritingDirectionMenu(); - virtual WTF::String contextMenuItemTagTextDirectionMenu(); - virtual WTF::String contextMenuItemTagDefaultDirection(); - virtual WTF::String contextMenuItemTagLeftToRight(); - virtual WTF::String contextMenuItemTagRightToLeft(); - virtual WTF::String contextMenuItemTagSearchInSpotlight(); - virtual WTF::String contextMenuItemTagShowFonts(); - virtual WTF::String contextMenuItemTagStyles(); - virtual WTF::String contextMenuItemTagShowColors(); - virtual WTF::String contextMenuItemTagSpeechMenu(); - virtual WTF::String contextMenuItemTagStartSpeaking(); - virtual WTF::String contextMenuItemTagStopSpeaking(); - virtual WTF::String contextMenuItemTagCorrectSpellingAutomatically(); - virtual WTF::String contextMenuItemTagSubstitutionsMenu(); - virtual WTF::String contextMenuItemTagShowSubstitutions(bool show); - virtual WTF::String contextMenuItemTagSmartCopyPaste(); - virtual WTF::String contextMenuItemTagSmartQuotes(); - virtual WTF::String contextMenuItemTagSmartDashes(); - virtual WTF::String contextMenuItemTagSmartLinks(); - virtual WTF::String contextMenuItemTagTextReplacement(); - virtual WTF::String contextMenuItemTagTransformationsMenu(); - virtual WTF::String contextMenuItemTagMakeUpperCase(); - virtual WTF::String contextMenuItemTagMakeLowerCase(); - virtual WTF::String contextMenuItemTagCapitalize(); - virtual WTF::String contextMenuItemTagChangeBack(const WTF::String& replacedString); - virtual WTF::String contextMenuItemTagInspectElement(); - virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); - virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); - virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); - virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); - virtual WTF::String contextMenuItemTagToggleMediaControls(); - virtual WTF::String contextMenuItemTagToggleMediaLoop(); - virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); - virtual WTF::String contextMenuItemTagMediaPlay(); - virtual WTF::String contextMenuItemTagMediaPause(); - virtual WTF::String contextMenuItemTagMediaMute(); -#endif // ENABLE(CONTEXT_MENUS) - virtual WTF::String searchMenuNoRecentSearchesText(); - virtual WTF::String searchMenuRecentSearchesText(); - virtual WTF::String searchMenuClearRecentSearchesText(); - virtual WTF::String AXWebAreaText(); - virtual WTF::String AXLinkText(); - virtual WTF::String AXListMarkerText(); - virtual WTF::String AXImageMapText(); - virtual WTF::String AXHeadingText(); - virtual WTF::String AXDefinitionListTermText(); - virtual WTF::String AXDefinitionListDefinitionText(); - virtual WTF::String AXARIAContentGroupText(const WTF::String& ariaType); - virtual WTF::String AXButtonActionVerb(); - virtual WTF::String AXRadioButtonActionVerb(); - virtual WTF::String AXTextFieldActionVerb(); - virtual WTF::String AXCheckedCheckBoxActionVerb(); - virtual WTF::String AXUncheckedCheckBoxActionVerb(); - virtual WTF::String AXMenuListActionVerb(); - virtual WTF::String AXMenuListPopupActionVerb(); - virtual WTF::String AXLinkActionVerb(); - virtual WTF::String missingPluginText(); - virtual WTF::String crashedPluginText(); - virtual WTF::String multipleFileUploadText(unsigned numberOfFiles); - virtual WTF::String unknownFileSizeText(); - virtual WTF::String keygenMenuItem512(); - virtual WTF::String keygenMenuItem1024(); - virtual WTF::String keygenMenuItem2048(); - virtual WTF::String keygenKeychainItemName(const WTF::String& host); - virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize& size); - virtual WTF::String mediaElementLoadingStateText(); - virtual WTF::String mediaElementLiveBroadcastStateText(); - virtual WTF::String localizedMediaControlElementString(const WTF::String&); - virtual WTF::String localizedMediaControlElementHelpText(const WTF::String&); - virtual WTF::String localizedMediaTimeDescription(float); - virtual WTF::String validationMessageValueMissingText(); - virtual WTF::String validationMessageTypeMismatchText(); - virtual WTF::String validationMessagePatternMismatchText(); - virtual WTF::String validationMessageTooLongText(); - virtual WTF::String validationMessageRangeUnderflowText(); - virtual WTF::String validationMessageRangeOverflowText(); - virtual WTF::String validationMessageStepMismatchText(); - // WebCore::VisitedLinkStrategy virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm index 59ba436..f8e1a7a 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm @@ -25,14 +25,11 @@ #import "WebPlatformStrategies.h" -#import "WebLocalizableStringsInternal.h" #import "WebPluginDatabase.h" #import "WebPluginPackage.h" #import <WebCore/BlockExceptions.h> -#import <WebCore/IntSize.h> #import <WebCore/Page.h> #import <WebCore/PageGroup.h> -#import <wtf/StdLibExtras.h> using namespace WebCore; @@ -56,11 +53,6 @@ PluginStrategy* WebPlatformStrategies::createPluginStrategy() return this; } -LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() -{ - return this; -} - VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() { return this; @@ -89,775 +81,6 @@ void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore:: END_BLOCK_OBJC_EXCEPTIONS; } -// LocalizationStrategy - -String WebPlatformStrategies::inputElementAltText() -{ - return UI_STRING_KEY_INTERNAL("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value"); -} - -String WebPlatformStrategies::resetButtonDefaultLabel() -{ - return UI_STRING_INTERNAL("Reset", "default label for Reset buttons in forms on web pages"); -} - -String WebPlatformStrategies::searchableIndexIntroduction() -{ - return UI_STRING_INTERNAL("This is a searchable index. Enter search keywords: ", - "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); -} - -String WebPlatformStrategies::submitButtonDefaultLabel() -{ - return UI_STRING_INTERNAL("Submit", "default label for Submit buttons in forms on web pages"); -} - -String WebPlatformStrategies::defaultDetailsSummaryText() -{ - return UI_STRING_INTERNAL("Details", "text to display in <details> tag when it has no <summary> child"); -} - -String WebPlatformStrategies::fileButtonChooseFileLabel() -{ - return UI_STRING_INTERNAL("Choose File", "title for file button used in HTML forms"); -} - -String WebPlatformStrategies::fileButtonNoFileSelectedLabel() -{ - return UI_STRING_INTERNAL("no file selected", "text to display in file button used in HTML forms when no file is selected"); -} - -String WebPlatformStrategies::copyImageUnknownFileLabel() -{ - return UI_STRING_INTERNAL("unknown", "Unknown filename"); -} - -#if ENABLE(CONTEXT_MENUS) - -String WebPlatformStrategies::contextMenuItemTagOpenLinkInNewWindow() -{ - return UI_STRING_INTERNAL("Open Link in New Window", "Open in New Window context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagDownloadLinkToDisk() -{ - return UI_STRING_INTERNAL("Download Linked File", "Download Linked File context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCopyLinkToClipboard() -{ - return UI_STRING_INTERNAL("Copy Link", "Copy Link context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagOpenImageInNewWindow() -{ - return UI_STRING_INTERNAL("Open Image in New Window", "Open Image in New Window context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagDownloadImageToDisk() -{ - return UI_STRING_INTERNAL("Download Image", "Download Image context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() -{ - return UI_STRING_INTERNAL("Copy Image", "Copy Image context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow() -{ - return UI_STRING_INTERNAL("Open Video in New Window", "Open Video in New Window context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow() -{ - return UI_STRING_INTERNAL("Open Audio in New Window", "Open Audio in New Window context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard() -{ - return UI_STRING_INTERNAL("Copy Video Address", "Copy Video Address Location context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard() -{ - return UI_STRING_INTERNAL("Copy Audio Address", "Copy Audio Address Location context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagToggleMediaControls() -{ - return UI_STRING_INTERNAL("Controls", "Media Controls context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop() -{ - return UI_STRING_INTERNAL("Loop", "Media Loop context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen() -{ - return UI_STRING_INTERNAL("Enter Fullscreen", "Video Enter Fullscreen context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagMediaPlay() -{ - return UI_STRING_INTERNAL("Play", "Media Play context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagMediaPause() -{ - return UI_STRING_INTERNAL("Pause", "Media Pause context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagMediaMute() -{ - return UI_STRING_INTERNAL("Mute", "Media Mute context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() -{ - return UI_STRING_INTERNAL("Open Frame in New Window", "Open Frame in New Window context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCopy() -{ - return UI_STRING_INTERNAL("Copy", "Copy context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagGoBack() -{ - return UI_STRING_INTERNAL("Back", "Back context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagGoForward() -{ - return UI_STRING_INTERNAL("Forward", "Forward context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagStop() -{ - return UI_STRING_INTERNAL("Stop", "Stop context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagReload() -{ - return UI_STRING_INTERNAL("Reload", "Reload context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCut() -{ - return UI_STRING_INTERNAL("Cut", "Cut context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagPaste() -{ - return UI_STRING_INTERNAL("Paste", "Paste context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagNoGuessesFound() -{ - return UI_STRING_INTERNAL("No Guesses Found", "No Guesses Found context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagIgnoreSpelling() -{ - return UI_STRING_INTERNAL("Ignore Spelling", "Ignore Spelling context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagLearnSpelling() -{ - return UI_STRING_INTERNAL("Learn Spelling", "Learn Spelling context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSearchWeb() -{ - return UI_STRING_INTERNAL("Search in Google", "Search in Google context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagLookUpInDictionary(const String& selectedString) -{ -#if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) - return UI_STRING_INTERNAL("Look Up in Dictionary", "Look Up in Dictionary context menu item"); -#else - return [NSString stringWithFormat:UI_STRING_INTERNAL("Look Up “%@”", "Look Up context menu item with selected word"), (NSString *)selectedString]; -#endif -} - -String WebPlatformStrategies::contextMenuItemTagOpenLink() -{ - return UI_STRING_INTERNAL("Open Link", "Open Link context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagIgnoreGrammar() -{ - return UI_STRING_INTERNAL("Ignore Grammar", "Ignore Grammar context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSpellingMenu() -{ -#ifndef BUILDING_ON_TIGER - return UI_STRING_INTERNAL("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); -#else - return UI_STRING_INTERNAL("Spelling", "Spelling context sub-menu item"); -#endif -} - -String WebPlatformStrategies::contextMenuItemTagShowSpellingPanel(bool show) -{ -#ifndef BUILDING_ON_TIGER - if (show) - return UI_STRING_INTERNAL("Show Spelling and Grammar", "menu item title"); - return UI_STRING_INTERNAL("Hide Spelling and Grammar", "menu item title"); -#else - return UI_STRING_INTERNAL("Spelling...", "menu item title"); -#endif -} - -String WebPlatformStrategies::contextMenuItemTagCheckSpelling() -{ -#ifndef BUILDING_ON_TIGER - return UI_STRING_INTERNAL("Check Document Now", "Check spelling context menu item"); -#else - return UI_STRING_INTERNAL("Check Spelling", "Check spelling context menu item"); -#endif -} - -String WebPlatformStrategies::contextMenuItemTagCheckSpellingWhileTyping() -{ -#ifndef BUILDING_ON_TIGER - return UI_STRING_INTERNAL("Check Spelling While Typing", "Check spelling while typing context menu item"); -#else - return UI_STRING_INTERNAL("Check Spelling as You Type", "Check spelling while typing context menu item"); -#endif -} - -String WebPlatformStrategies::contextMenuItemTagCheckGrammarWithSpelling() -{ - return UI_STRING_INTERNAL("Check Grammar With Spelling", "Check grammar with spelling context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagFontMenu() -{ - return UI_STRING_INTERNAL("Font", "Font context sub-menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagBold() -{ - return UI_STRING_INTERNAL("Bold", "Bold context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagItalic() -{ - return UI_STRING_INTERNAL("Italic", "Italic context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagUnderline() -{ - return UI_STRING_INTERNAL("Underline", "Underline context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagOutline() -{ - return UI_STRING_INTERNAL("Outline", "Outline context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagWritingDirectionMenu() -{ -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) - return UI_STRING_INTERNAL("Paragraph Direction", "Paragraph direction context sub-menu item"); -#else - return UI_STRING_INTERNAL("Writing Direction", "Writing direction context sub-menu item"); -#endif -} - -String WebPlatformStrategies::contextMenuItemTagTextDirectionMenu() -{ - return UI_STRING_INTERNAL("Selection Direction", "Selection direction context sub-menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagDefaultDirection() -{ - return UI_STRING_INTERNAL("Default", "Default writing direction context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagLeftToRight() -{ - return UI_STRING_INTERNAL("Left to Right", "Left to Right context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagRightToLeft() -{ - return UI_STRING_INTERNAL("Right to Left", "Right to Left context menu item"); -} - -#if PLATFORM(MAC) - -String WebPlatformStrategies::contextMenuItemTagSearchInSpotlight() -{ - return UI_STRING_INTERNAL("Search in Spotlight", "Search in Spotlight context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagShowFonts() -{ - return UI_STRING_INTERNAL("Show Fonts", "Show fonts context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagStyles() -{ - return UI_STRING_INTERNAL("Styles...", "Styles context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagShowColors() -{ - return UI_STRING_INTERNAL("Show Colors", "Show colors context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSpeechMenu() -{ - return UI_STRING_INTERNAL("Speech", "Speech context sub-menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagStartSpeaking() -{ - return UI_STRING_INTERNAL("Start Speaking", "Start speaking context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagStopSpeaking() -{ - return UI_STRING_INTERNAL("Stop Speaking", "Stop speaking context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCorrectSpellingAutomatically() -{ - return UI_STRING_INTERNAL("Correct Spelling Automatically", "Correct Spelling Automatically context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSubstitutionsMenu() -{ - return UI_STRING_INTERNAL("Substitutions", "Substitutions context sub-menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagShowSubstitutions(bool show) -{ - if (show) - return UI_STRING_INTERNAL("Show Substitutions", "menu item title"); - return UI_STRING_INTERNAL("Hide Substitutions", "menu item title"); -} - -String WebPlatformStrategies::contextMenuItemTagSmartCopyPaste() -{ - return UI_STRING_INTERNAL("Smart Copy/Paste", "Smart Copy/Paste context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSmartQuotes() -{ - return UI_STRING_INTERNAL("Smart Quotes", "Smart Quotes context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSmartDashes() -{ - return UI_STRING_INTERNAL("Smart Dashes", "Smart Dashes context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagSmartLinks() -{ - return UI_STRING_INTERNAL("Smart Links", "Smart Links context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagTextReplacement() -{ - return UI_STRING_INTERNAL("Text Replacement", "Text Replacement context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagTransformationsMenu() -{ - return UI_STRING_INTERNAL("Transformations", "Transformations context sub-menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagMakeUpperCase() -{ - return UI_STRING_INTERNAL("Make Upper Case", "Make Upper Case context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagMakeLowerCase() -{ - return UI_STRING_INTERNAL("Make Lower Case", "Make Lower Case context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagCapitalize() -{ - return UI_STRING_INTERNAL("Capitalize", "Capitalize context menu item"); -} - -String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replacedString) -{ - static NSString *formatString = nil; -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) - static bool lookedUpString = false; - if (!lookedUpString) { - formatString = [[[NSBundle bundleForClass:[NSSpellChecker class]] localizedStringForKey:@"Change Back to \\U201C%@\\U201D" value:nil table:@"MenuCommands"] retain]; - lookedUpString = true; - } -#endif - if (!formatString) - return replacedString; - return [NSString stringWithFormat:formatString, (NSString *)replacedString]; -} - -#endif - -String WebPlatformStrategies::contextMenuItemTagInspectElement() -{ - return UI_STRING_INTERNAL("Inspect Element", "Inspect Element context menu item"); -} - -#endif // ENABLE(CONTEXT_MENUS) - -String WebPlatformStrategies::searchMenuNoRecentSearchesText() -{ - return UI_STRING_INTERNAL("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed"); -} - -String WebPlatformStrategies::searchMenuRecentSearchesText() -{ - return UI_STRING_INTERNAL("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title"); -} - -String WebPlatformStrategies::searchMenuClearRecentSearchesText() -{ - return UI_STRING_INTERNAL("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); -} - -String WebPlatformStrategies::AXWebAreaText() -{ - return UI_STRING_INTERNAL("HTML content", "accessibility role description for web area"); -} - -String WebPlatformStrategies::AXLinkText() -{ - return UI_STRING_INTERNAL("link", "accessibility role description for link"); -} - -String WebPlatformStrategies::AXListMarkerText() -{ - return UI_STRING_INTERNAL("list marker", "accessibility role description for list marker"); -} - -String WebPlatformStrategies::AXImageMapText() -{ - return UI_STRING_INTERNAL("image map", "accessibility role description for image map"); -} - -String WebPlatformStrategies::AXHeadingText() -{ - return UI_STRING_INTERNAL("heading", "accessibility role description for headings"); -} - -String WebPlatformStrategies::AXDefinitionListTermText() -{ - return UI_STRING_INTERNAL("term", "term word of a definition"); -} - -String WebPlatformStrategies::AXDefinitionListDefinitionText() -{ - return UI_STRING_INTERNAL("definition", "definition phrase"); -} - -String WebPlatformStrategies::AXARIAContentGroupText(const String& ariaType) -{ - if (ariaType == "ARIAApplicationAlert") - return UI_STRING_INTERNAL("alert", "An ARIA accessibility group that acts as an alert."); - if (ariaType == "ARIAApplicationAlertDialog") - return UI_STRING_INTERNAL("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); - if (ariaType == "ARIAApplicationDialog") - return UI_STRING_INTERNAL("dialog", "An ARIA accessibility group that acts as an dialog."); - if (ariaType == "ARIAApplicationLog") - return UI_STRING_INTERNAL("log", "An ARIA accessibility group that acts as a console log."); - if (ariaType == "ARIAApplicationMarquee") - return UI_STRING_INTERNAL("marquee", "An ARIA accessibility group that acts as a marquee."); - if (ariaType == "ARIAApplicationStatus") - return UI_STRING_INTERNAL("application status", "An ARIA accessibility group that acts as a status update."); - if (ariaType == "ARIAApplicationTimer") - return UI_STRING_INTERNAL("timer", "An ARIA accessibility group that acts as an updating timer."); - if (ariaType == "ARIADocument") - return UI_STRING_INTERNAL("document", "An ARIA accessibility group that acts as a document."); - if (ariaType == "ARIADocumentArticle") - return UI_STRING_INTERNAL("article", "An ARIA accessibility group that acts as an article."); - if (ariaType == "ARIADocumentNote") - return UI_STRING_INTERNAL("note", "An ARIA accessibility group that acts as a note in a document."); - if (ariaType == "ARIADocumentRegion") - return UI_STRING_INTERNAL("region", "An ARIA accessibility group that acts as a distinct region in a document."); - if (ariaType == "ARIALandmarkApplication") - return UI_STRING_INTERNAL("application", "An ARIA accessibility group that acts as an application."); - if (ariaType == "ARIALandmarkBanner") - return UI_STRING_INTERNAL("banner", "An ARIA accessibility group that acts as a banner."); - if (ariaType == "ARIALandmarkComplementary") - return UI_STRING_INTERNAL("complementary", "An ARIA accessibility group that acts as a region of complementary information."); - if (ariaType == "ARIALandmarkContentInfo") - return UI_STRING_INTERNAL("content", "An ARIA accessibility group that contains content."); - if (ariaType == "ARIALandmarkMain") - return UI_STRING_INTERNAL("main", "An ARIA accessibility group that is the main portion of the website."); - if (ariaType == "ARIALandmarkNavigation") - return UI_STRING_INTERNAL("navigation", "An ARIA accessibility group that contains the main navigation elements of a website."); - if (ariaType == "ARIALandmarkSearch") - return UI_STRING_INTERNAL("search", "An ARIA accessibility group that contains a search feature of a website."); - if (ariaType == "ARIAUserInterfaceTooltip") - return UI_STRING_INTERNAL("tooltip", "An ARIA accessibility group that acts as a tooltip."); - if (ariaType == "ARIATabPanel") - return UI_STRING_INTERNAL("tab panel", "An ARIA accessibility group that contains the content of a tab."); - if (ariaType == "ARIADocumentMath") - return UI_STRING_INTERNAL("math", "An ARIA accessibility group that contains mathematical symbols."); - return String(); -} - -String WebPlatformStrategies::AXButtonActionVerb() -{ - return UI_STRING_INTERNAL("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility"); -} - -String WebPlatformStrategies::AXRadioButtonActionVerb() -{ - return UI_STRING_INTERNAL("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility"); -} - -String WebPlatformStrategies::AXTextFieldActionVerb() -{ - return UI_STRING_INTERNAL("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility"); -} - -String WebPlatformStrategies::AXCheckedCheckBoxActionVerb() -{ - return UI_STRING_INTERNAL("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility"); -} - -String WebPlatformStrategies::AXUncheckedCheckBoxActionVerb() -{ - return UI_STRING_INTERNAL("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility"); -} - -String WebPlatformStrategies::AXMenuListActionVerb() -{ - return String(); -} - -String WebPlatformStrategies::AXMenuListPopupActionVerb() -{ - return String(); -} - -String WebPlatformStrategies::AXLinkActionVerb() -{ - return UI_STRING_INTERNAL("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); -} - -String WebPlatformStrategies::missingPluginText() -{ - return UI_STRING_INTERNAL("Missing Plug-in", "Label text to be used when a plugin is missing"); -} - -String WebPlatformStrategies::crashedPluginText() -{ - return UI_STRING_INTERNAL("Plug-in Failure", "Label text to be used if plugin host process has crashed"); -} - -String WebPlatformStrategies::multipleFileUploadText(unsigned numberOfFiles) -{ - return [NSString stringWithFormat:UI_STRING_INTERNAL("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles]; -} - -String WebPlatformStrategies::unknownFileSizeText() -{ - return UI_STRING_INTERNAL("Unknown", "Unknown filesize FTP directory listing item"); -} - -String WebPlatformStrategies::keygenMenuItem512() -{ - return UI_STRING_INTERNAL("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"); -} - -String WebPlatformStrategies::keygenMenuItem1024() -{ - return UI_STRING_INTERNAL("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"); -} - -String WebPlatformStrategies::keygenMenuItem2048() -{ - return UI_STRING_INTERNAL("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"); -} - -String WebPlatformStrategies::keygenKeychainItemName(const WTF::String& host) -{ - return [NSString stringWithFormat:UI_STRING_INTERNAL("Key from %@", "Name of keychain key generated by the KEYGEN tag"), (NSString *)host]; -} - -String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size) -{ -#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) - NSString *widthString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.width()] numberStyle:NSNumberFormatterDecimalStyle]; - NSString *heightString = [NSNumberFormatter localizedStringFromNumber:[NSNumber numberWithInt:size.height()] numberStyle:NSNumberFormatterDecimalStyle]; - return [NSString localizedStringWithFormat:UI_STRING_INTERNAL("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, widthString, heightString]; -#else - return [NSString stringWithFormat:UI_STRING_INTERNAL("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, size.width(), size.height()]; -#endif -} - -String WebPlatformStrategies::mediaElementLoadingStateText() -{ - return UI_STRING_INTERNAL("Loading...", "Media controller status message when the media is loading"); -} - -String WebPlatformStrategies::mediaElementLiveBroadcastStateText() -{ - return UI_STRING_INTERNAL("Live Broadcast", "Media controller status message when watching a live broadcast"); -} - -String WebPlatformStrategies::localizedMediaControlElementString(const String& name) -{ - if (name == "AudioElement") - return UI_STRING_INTERNAL("audio element controller", "accessibility role description for audio element controller"); - if (name == "VideoElement") - return UI_STRING_INTERNAL("video element controller", "accessibility role description for video element controller"); - if (name == "MuteButton") - return UI_STRING_INTERNAL("mute", "accessibility role description for mute button"); - if (name == "UnMuteButton") - return UI_STRING_INTERNAL("unmute", "accessibility role description for turn mute off button"); - if (name == "PlayButton") - return UI_STRING_INTERNAL("play", "accessibility role description for play button"); - if (name == "PauseButton") - return UI_STRING_INTERNAL("pause", "accessibility role description for pause button"); - if (name == "Slider") - return UI_STRING_INTERNAL("movie time", "accessibility role description for timeline slider"); - if (name == "SliderThumb") - return UI_STRING_INTERNAL("timeline slider thumb", "accessibility role description for timeline thumb"); - if (name == "RewindButton") - return UI_STRING_INTERNAL("back 30 seconds", "accessibility role description for seek back 30 seconds button"); - if (name == "ReturnToRealtimeButton") - return UI_STRING_INTERNAL("return to realtime", "accessibility role description for return to real time button"); - if (name == "CurrentTimeDisplay") - return UI_STRING_INTERNAL("elapsed time", "accessibility role description for elapsed time display"); - if (name == "TimeRemainingDisplay") - return UI_STRING_INTERNAL("remaining time", "accessibility role description for time remaining display"); - if (name == "StatusDisplay") - return UI_STRING_INTERNAL("status", "accessibility role description for movie status"); - if (name == "FullscreenButton") - return UI_STRING_INTERNAL("fullscreen", "accessibility role description for enter fullscreen button"); - if (name == "SeekForwardButton") - return UI_STRING_INTERNAL("fast forward", "accessibility role description for fast forward button"); - if (name == "SeekBackButton") - return UI_STRING_INTERNAL("fast reverse", "accessibility role description for fast reverse button"); - if (name == "ShowClosedCaptionsButton") - return UI_STRING_INTERNAL("show closed captions", "accessibility role description for show closed captions button"); - if (name == "HideClosedCaptionsButton") - return UI_STRING_INTERNAL("hide closed captions", "accessibility role description for hide closed captions button"); - - // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy. - if (name == "ControlsPanel") - return String(); - - ASSERT_NOT_REACHED(); - return String(); -} - -String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& name) -{ - if (name == "AudioElement") - return UI_STRING_INTERNAL("audio element playback controls and status display", "accessibility role description for audio element controller"); - if (name == "VideoElement") - return UI_STRING_INTERNAL("video element playback controls and status display", "accessibility role description for video element controller"); - if (name == "MuteButton") - return UI_STRING_INTERNAL("mute audio tracks", "accessibility help text for mute button"); - if (name == "UnMuteButton") - return UI_STRING_INTERNAL("unmute audio tracks", "accessibility help text for un mute button"); - if (name == "PlayButton") - return UI_STRING_INTERNAL("begin playback", "accessibility help text for play button"); - if (name == "PauseButton") - return UI_STRING_INTERNAL("pause playback", "accessibility help text for pause button"); - if (name == "Slider") - return UI_STRING_INTERNAL("movie time scrubber", "accessibility help text for timeline slider"); - if (name == "SliderThumb") - return UI_STRING_INTERNAL("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); - if (name == "RewindButton") - return UI_STRING_INTERNAL("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); - if (name == "ReturnToRealtimeButton") - return UI_STRING_INTERNAL("return streaming movie to real time", "accessibility help text for return streaming movie to real time button"); - if (name == "CurrentTimeDisplay") - return UI_STRING_INTERNAL("current movie time in seconds", "accessibility help text for elapsed time display"); - if (name == "TimeRemainingDisplay") - return UI_STRING_INTERNAL("number of seconds of movie remaining", "accessibility help text for remaining time display"); - if (name == "StatusDisplay") - return UI_STRING_INTERNAL("current movie status", "accessibility help text for movie status display"); - if (name == "SeekBackButton") - return UI_STRING_INTERNAL("seek quickly back", "accessibility help text for fast rewind button"); - if (name == "SeekForwardButton") - return UI_STRING_INTERNAL("seek quickly forward", "accessibility help text for fast forward button"); - if (name == "FullscreenButton") - return UI_STRING_INTERNAL("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); - if (name == "ShowClosedCaptionsButton") - return UI_STRING_INTERNAL("start displaying closed captions", "accessibility help text for show closed captions button"); - if (name == "HideClosedCaptionsButton") - return UI_STRING_INTERNAL("stop displaying closed captions", "accessibility help text for hide closed captions button"); - - ASSERT_NOT_REACHED(); - return String(); -} - -String WebPlatformStrategies::localizedMediaTimeDescription(float time) -{ - if (!isfinite(time)) - return UI_STRING_INTERNAL("indefinite time", "accessibility help text for an indefinite media controller time value"); - - int seconds = (int)fabsf(time); - int days = seconds / (60 * 60 * 24); - int hours = seconds / (60 * 60); - int minutes = (seconds / 60) % 60; - seconds %= 60; - - if (days) - return [NSString stringWithFormat:UI_STRING_INTERNAL("%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_INTERNAL("%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_INTERNAL("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds]; - - return [NSString stringWithFormat:UI_STRING_INTERNAL("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds]; -} - -String WebPlatformStrategies::validationMessageValueMissingText() -{ - return UI_STRING_INTERNAL("value missing", "Validation message for required form control elements that have no value"); -} - -String WebPlatformStrategies::validationMessageTypeMismatchText() -{ - return UI_STRING_INTERNAL("type mismatch", "Validation message for input form controls with a value not matching type"); -} - -String WebPlatformStrategies::validationMessagePatternMismatchText() -{ - return UI_STRING_INTERNAL("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); -} - -String WebPlatformStrategies::validationMessageTooLongText() -{ - return UI_STRING_INTERNAL("too long", "Validation message for form control elements with a value longer than maximum allowed length"); -} - -String WebPlatformStrategies::validationMessageRangeUnderflowText() -{ - return UI_STRING_INTERNAL("range underflow", "Validation message for input form controls with value lower than allowed minimum"); -} - -String WebPlatformStrategies::validationMessageRangeOverflowText() -{ - return UI_STRING_INTERNAL("range overflow", "Validation message for input form controls with value higher than allowed maximum"); -} - -String WebPlatformStrategies::validationMessageStepMismatchText() -{ - return UI_STRING_INTERNAL("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); -} - -// VisitedLinkStrategy bool WebPlatformStrategies::isLinkVisited(Page* page, LinkHash hash) { return page->group().isLinkVisited(hash); diff --git a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm index 1b212a7..de2a1f4 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm @@ -68,7 +68,6 @@ void InitWebCoreSystemInterface(void) INIT(GetWheelEventDeltas); INIT(HitTestMediaUIPart); INIT(InitializeMaximumHTTPConnectionCountPerHost); - INIT(IsLatchingWheelEvent); INIT(MeasureMediaUIPart); INIT(MediaControllerThemeAvailable); INIT(PopupMenu); @@ -77,7 +76,9 @@ void InitWebCoreSystemInterface(void) INIT(SetCONNECTProxyForStream); INIT(SetCookieStoragePrivateBrowsingEnabled); INIT(SetDragImage); + INIT(SetHTTPPipeliningMaximumPriority); INIT(SetHTTPPipeliningPriority); + INIT(SetHTTPPipeliningMinimumFastLanePriority); INIT(SetNSURLConnectionDefersCallbacks); INIT(SetNSURLRequestShouldContentSniff); INIT(SetPatternBaseCTM); @@ -119,9 +120,11 @@ void InitWebCoreSystemInterface(void) #if defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) || defined(BUILDING_ON_SNOW_LEOPARD) INIT(GetHyphenationLocationBeforeIndex); + INIT(GetNSEventMomentumPhase); #endif INIT(CreateCTLineWithUniCharProvider); + #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD) INIT(IOSurfaceContextCreate); INIT(IOSurfaceContextCreateImage); @@ -155,6 +158,8 @@ void InitWebCoreSystemInterface(void) INIT(WillEndLiveResize); INIT(ContentAreaDidShow); INIT(ContentAreaDidHide); + INIT(DidBeginScrollGesture); + INIT(DidEndScrollGesture); INIT(ScrollbarPainterUsesOverlayScrollers); #endif |