diff options
author | Ben Murdoch <benm@google.com> | 2011-05-24 11:24:40 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-06-02 09:53:15 +0100 |
commit | 81bc750723a18f21cd17d1b173cd2a4dda9cea6e (patch) | |
tree | 7a9e5ed86ff429fd347a25153107221543909b19 /Source/WebKit/mac/WebCoreSupport | |
parent | 94088a6d336c1dd80a1e734af51e96abcbb689a7 (diff) | |
download | external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.zip external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.gz external_webkit-81bc750723a18f21cd17d1b173cd2a4dda9cea6e.tar.bz2 |
Merge WebKit at r80534: Intial merge by Git
Change-Id: Ia7a83357124c9e1cdb1debf55d9661ec0bd09a61
Diffstat (limited to 'Source/WebKit/mac/WebCoreSupport')
12 files changed, 447 insertions, 266 deletions
diff --git a/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm b/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm index 45f0703..bf517c1 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebApplicationCache.mm @@ -1,5 +1,5 @@ /* - * Copyright (C) 2009 Apple Inc. All Rights Reserved. + * Copyright (C) 2009, 2011 Apple Inc. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -55,8 +55,7 @@ using namespace WebCore; + (void)deleteAllApplicationCaches { - cacheStorage().empty(); - cacheStorage().vacuumDatabaseFile(); + cacheStorage().deleteAllEntries(); } @end diff --git a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h index dda0bb1..3129fae 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.h @@ -88,8 +88,6 @@ public: virtual bool runJavaScriptPrompt(WebCore::Frame*, const WTF::String& message, const WTF::String& defaultValue, WTF::String& result); virtual bool shouldInterruptJavaScript(); - virtual bool tabsToLinks() const; - virtual WebCore::IntRect windowResizerRect() const; virtual void invalidateWindow(const WebCore::IntRect&, bool); diff --git a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm index 0e7e2f2..99b817b 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebChromeClient.mm @@ -80,6 +80,29 @@ #import "NetscapePluginHostManager.h" #endif +NSString *WebConsoleMessageHTMLMessageSource = @"HTMLMessageSource"; +NSString *WebConsoleMessageWMLMessageSource = @"WMLMessageSource"; +NSString *WebConsoleMessageXMLMessageSource = @"XMLMessageSource"; +NSString *WebConsoleMessageJSMessageSource = @"JSMessageSource"; +NSString *WebConsoleMessageCSSMessageSource = @"CSSMessageSource"; +NSString *WebConsoleMessageOtherMessageSource = @"OtherMessageSource"; + +NSString *WebConsoleMessageLogMessageType = @"LogMessageType"; +NSString *WebConsoleMessageObjectMessageType = @"ObjectMessageType"; +NSString *WebConsoleMessageTraceMessageType = @"TraceMessageType"; +NSString *WebConsoleMessageStartGroupMessageType = @"StartGroupMessageType"; +NSString *WebConsoleMessageStartGroupCollapsedMessageType = @"StartGroupCollapsedMessageType"; +NSString *WebConsoleMessageEndGroupMessageType = @"EndGroupMessageType"; +NSString *WebConsoleMessageAssertMessageType = @"AssertMessageType"; +NSString *WebConsoleMessageUncaughtExceptionMessageType = @"UncaughtExceptionMessageType"; +NSString *WebConsoleMessageNetworkErrorMessageType = @"NetworkErrorMessageType"; + +NSString *WebConsoleMessageTipMessageLevel = @"TipMessageLevel"; +NSString *WebConsoleMessageLogMessageLevel = @"LogMessageLevel"; +NSString *WebConsoleMessageWarningMessageLevel = @"WarningMessageLevel"; +NSString *WebConsoleMessageErrorMessageLevel = @"ErrorMessageLevel"; +NSString *WebConsoleMessageDebugMessageLevel = @"DebugMessageLevel"; + @interface NSApplication (WebNSApplicationDetails) - (NSCursor *)_cursorRectCursor; @end @@ -328,18 +351,101 @@ void WebChromeClient::setResizable(bool b) [[m_webView _UIDelegateForwarder] webView:m_webView setResizable:b]; } +inline static NSString *stringForMessageSource(MessageSource source) +{ + switch (source) { + case HTMLMessageSource: + return WebConsoleMessageHTMLMessageSource; + case WMLMessageSource: + return WebConsoleMessageWMLMessageSource; + case XMLMessageSource: + return WebConsoleMessageXMLMessageSource; + case JSMessageSource: + return WebConsoleMessageJSMessageSource; + case CSSMessageSource: + return WebConsoleMessageCSSMessageSource; + case OtherMessageSource: + return WebConsoleMessageOtherMessageSource; + } + ASSERT_NOT_REACHED(); + return @""; +} + +inline static NSString *stringForMessageType(MessageType type) +{ + switch (type) { + case LogMessageType: + return WebConsoleMessageLogMessageType; + case ObjectMessageType: + return WebConsoleMessageObjectMessageType; + case TraceMessageType: + return WebConsoleMessageTraceMessageType; + case StartGroupMessageType: + return WebConsoleMessageStartGroupMessageType; + case StartGroupCollapsedMessageType: + return WebConsoleMessageStartGroupCollapsedMessageType; + case EndGroupMessageType: + return WebConsoleMessageEndGroupMessageType; + case AssertMessageType: + return WebConsoleMessageAssertMessageType; + case UncaughtExceptionMessageType: + return WebConsoleMessageUncaughtExceptionMessageType; + case NetworkErrorMessageType: + return WebConsoleMessageNetworkErrorMessageType; + } + ASSERT_NOT_REACHED(); + return @""; +} + +inline static NSString *stringForMessageLevel(MessageLevel level) +{ + switch (level) { + case TipMessageLevel: + return WebConsoleMessageTipMessageLevel; + case LogMessageLevel: + return WebConsoleMessageLogMessageLevel; + case WarningMessageLevel: + return WebConsoleMessageWarningMessageLevel; + case ErrorMessageLevel: + return WebConsoleMessageErrorMessageLevel; + case DebugMessageLevel: + return WebConsoleMessageDebugMessageLevel; + } + ASSERT_NOT_REACHED(); + return @""; +} + void WebChromeClient::addMessageToConsole(MessageSource source, MessageType type, MessageLevel level, const String& message, unsigned int lineNumber, const String& sourceURL) { id delegate = [m_webView UIDelegate]; - SEL selector = @selector(webView:addMessageToConsole:); - if (![delegate respondsToSelector:selector]) - return; + BOOL respondsToNewSelector = NO; - NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: - (NSString *)message, @"message", [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber", - (NSString *)sourceURL, @"sourceURL", NULL]; + SEL selector = @selector(webView:addMessageToConsole:withSource:); + if ([delegate respondsToSelector:selector]) + respondsToNewSelector = YES; + else { + // The old selector only takes JSMessageSource messages. + if (source != JSMessageSource) + return; + selector = @selector(webView:addMessageToConsole:); + if (![delegate respondsToSelector:selector]) + return; + } - CallUIDelegate(m_webView, selector, dictionary); + NSString *messageSource = stringForMessageSource(source); + NSDictionary *dictionary = [[NSDictionary alloc] initWithObjectsAndKeys: + (NSString *)message, @"message", + [NSNumber numberWithUnsignedInt:lineNumber], @"lineNumber", + (NSString *)sourceURL, @"sourceURL", + messageSource, @"MessageSource", + stringForMessageType(type), @"MessageType", + stringForMessageLevel(level), @"MessageLevel", + NULL]; + + if (respondsToNewSelector) + CallUIDelegate(m_webView, selector, dictionary, messageSource); + else + CallUIDelegate(m_webView, selector, dictionary); [dictionary release]; } @@ -440,11 +546,6 @@ void WebChromeClient::setStatusbarText(const String& status) [localPool drain]; } -bool WebChromeClient::tabsToLinks() const -{ - return [[m_webView preferences] tabsToLinks]; -} - IntRect WebChromeClient::windowResizerRect() const { NSRect rect = [[m_webView window] _growBoxRect]; diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h index d5ac891..1fa132a 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.h @@ -29,6 +29,7 @@ #import <WebCore/Editor.h> #import <WebCore/EditorClient.h> +#import <WebCore/TextCheckerClient.h> #import <wtf/RetainPtr.h> #import <wtf/Forward.h> #import <wtf/Vector.h> @@ -36,7 +37,7 @@ @class WebView; @class WebEditorUndoTarget; -class WebEditorClient : public WebCore::EditorClient { +class WebEditorClient : public WebCore::EditorClient, public WebCore::TextCheckerClient { public: WebEditorClient(WebView *); virtual ~WebEditorClient(); @@ -50,7 +51,6 @@ public: virtual bool smartInsertDeleteEnabled(); virtual bool isSelectTrailingWhitespaceEnabled(); - virtual bool isEditable(); virtual bool shouldDeleteRange(WebCore::Range*); virtual bool shouldShowDeleteInterface(WebCore::HTMLElement*); @@ -98,13 +98,17 @@ public: virtual void toggleAutomaticSpellingCorrection(); #endif + TextCheckerClient* textChecker() { return this; } + virtual void respondToChangedContents(); virtual void respondToChangedSelection(); virtual void registerCommandForUndo(PassRefPtr<WebCore::EditCommand>); virtual void registerCommandForRedo(PassRefPtr<WebCore::EditCommand>); virtual void clearUndoRedoOperations(); - + + virtual bool canCopyCut(bool defaultValue) const; + virtual bool canPaste(bool defaultValue) const; virtual bool canUndo() const; virtual bool canRedo() const; @@ -139,6 +143,7 @@ public: virtual void showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType, const WebCore::FloatRect& boundingBoxOfReplacedString, const WTF::String& replacedString, const WTF::String& replacementString, const WTF::Vector<WTF::String>& alternativeReplacementStrings, WebCore::Editor*); virtual void dismissCorrectionPanel(WebCore::ReasonForDismissingCorrectionPanel); virtual bool isShowingCorrectionPanel(); + virtual void recordAutocorrectionResponse(AutocorrectionResponseType, const WTF::String& replacedString, const WTF::String& replacementString); #endif private: void registerCommandForUndoOrRedo(PassRefPtr<WebCore::EditCommand>, bool isRedo); diff --git a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm index 5cbb0fe..69dd574 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebEditorClient.mm @@ -47,7 +47,7 @@ #import "WebHTMLViewInternal.h" #import "WebKitLogging.h" #import "WebKitVersionChecks.h" -#import "WebLocalizableStrings.h" +#import "WebLocalizableStringsInternal.h" #import "WebNSURLExtras.h" #import "WebResourceInternal.h" #import "WebViewInternal.h" @@ -246,11 +246,6 @@ int WebEditorClient::spellCheckerDocumentTag() return [m_webView spellCheckerDocumentTag]; } -bool WebEditorClient::isEditable() -{ - return [m_webView isEditable]; -} - bool WebEditorClient::shouldDeleteRange(Range* range) { return [[m_webView _editingDelegateForwarder] webView:m_webView @@ -511,42 +506,42 @@ static NSString* undoNameForEditAction(EditAction editAction) { switch (editAction) { case EditActionUnspecified: return nil; - case EditActionSetColor: return UI_STRING_KEY("Set Color", "Set Color (Undo action name)", "Undo action name"); - case EditActionSetBackgroundColor: return UI_STRING_KEY("Set Background Color", "Set Background Color (Undo action name)", "Undo action name"); - case EditActionTurnOffKerning: return UI_STRING_KEY("Turn Off Kerning", "Turn Off Kerning (Undo action name)", "Undo action name"); - case EditActionTightenKerning: return UI_STRING_KEY("Tighten Kerning", "Tighten Kerning (Undo action name)", "Undo action name"); - case EditActionLoosenKerning: return UI_STRING_KEY("Loosen Kerning", "Loosen Kerning (Undo action name)", "Undo action name"); - case EditActionUseStandardKerning: return UI_STRING_KEY("Use Standard Kerning", "Use Standard Kerning (Undo action name)", "Undo action name"); - case EditActionTurnOffLigatures: return UI_STRING_KEY("Turn Off Ligatures", "Turn Off Ligatures (Undo action name)", "Undo action name"); - case EditActionUseStandardLigatures: return UI_STRING_KEY("Use Standard Ligatures", "Use Standard Ligatures (Undo action name)", "Undo action name"); - case EditActionUseAllLigatures: return UI_STRING_KEY("Use All Ligatures", "Use All Ligatures (Undo action name)", "Undo action name"); - case EditActionRaiseBaseline: return UI_STRING_KEY("Raise Baseline", "Raise Baseline (Undo action name)", "Undo action name"); - case EditActionLowerBaseline: return UI_STRING_KEY("Lower Baseline", "Lower Baseline (Undo action name)", "Undo action name"); - case EditActionSetTraditionalCharacterShape: return UI_STRING_KEY("Set Traditional Character Shape", "Set Traditional Character Shape (Undo action name)", "Undo action name"); - case EditActionSetFont: return UI_STRING_KEY("Set Font", "Set Font (Undo action name)", "Undo action name"); - case EditActionChangeAttributes: return UI_STRING_KEY("Change Attributes", "Change Attributes (Undo action name)", "Undo action name"); - case EditActionAlignLeft: return UI_STRING_KEY("Align Left", "Align Left (Undo action name)", "Undo action name"); - case EditActionAlignRight: return UI_STRING_KEY("Align Right", "Align Right (Undo action name)", "Undo action name"); - case EditActionCenter: return UI_STRING_KEY("Center", "Center (Undo action name)", "Undo action name"); - case EditActionJustify: return UI_STRING_KEY("Justify", "Justify (Undo action name)", "Undo action name"); - case EditActionSetWritingDirection: return UI_STRING_KEY("Set Writing Direction", "Set Writing Direction (Undo action name)", "Undo action name"); - case EditActionSubscript: return UI_STRING_KEY("Subscript", "Subscript (Undo action name)", "Undo action name"); - case EditActionSuperscript: return UI_STRING_KEY("Superscript", "Superscript (Undo action name)", "Undo action name"); - case EditActionUnderline: return UI_STRING_KEY("Underline", "Underline (Undo action name)", "Undo action name"); - case EditActionOutline: return UI_STRING_KEY("Outline", "Outline (Undo action name)", "Undo action name"); - case EditActionUnscript: return UI_STRING_KEY("Unscript", "Unscript (Undo action name)", "Undo action name"); - case EditActionDrag: return UI_STRING_KEY("Drag", "Drag (Undo action name)", "Undo action name"); - case EditActionCut: return UI_STRING_KEY("Cut", "Cut (Undo action name)", "Undo action name"); - case EditActionPaste: return UI_STRING_KEY("Paste", "Paste (Undo action name)", "Undo action name"); - case EditActionPasteFont: return UI_STRING_KEY("Paste Font", "Paste Font (Undo action name)", "Undo action name"); - case EditActionPasteRuler: return UI_STRING_KEY("Paste Ruler", "Paste Ruler (Undo action name)", "Undo action name"); - case EditActionTyping: return UI_STRING_KEY("Typing", "Typing (Undo action name)", "Undo action name"); - case EditActionCreateLink: return UI_STRING_KEY("Create Link", "Create Link (Undo action name)", "Undo action name"); - case EditActionUnlink: return UI_STRING_KEY("Unlink", "Unlink (Undo action name)", "Undo action name"); - case EditActionInsertList: return UI_STRING_KEY("Insert List", "Insert List (Undo action name)", "Undo action name"); - case EditActionFormatBlock: return UI_STRING_KEY("Formatting", "Format Block (Undo action name)", "Undo action name"); - case EditActionIndent: return UI_STRING_KEY("Indent", "Indent (Undo action name)", "Undo action name"); - case EditActionOutdent: return UI_STRING_KEY("Outdent", "Outdent (Undo action name)", "Undo action name"); + case EditActionSetColor: return UI_STRING_KEY_INTERNAL("Set Color", "Set Color (Undo action name)", "Undo action name"); + case EditActionSetBackgroundColor: return UI_STRING_KEY_INTERNAL("Set Background Color", "Set Background Color (Undo action name)", "Undo action name"); + case EditActionTurnOffKerning: return UI_STRING_KEY_INTERNAL("Turn Off Kerning", "Turn Off Kerning (Undo action name)", "Undo action name"); + case EditActionTightenKerning: return UI_STRING_KEY_INTERNAL("Tighten Kerning", "Tighten Kerning (Undo action name)", "Undo action name"); + case EditActionLoosenKerning: return UI_STRING_KEY_INTERNAL("Loosen Kerning", "Loosen Kerning (Undo action name)", "Undo action name"); + case EditActionUseStandardKerning: return UI_STRING_KEY_INTERNAL("Use Standard Kerning", "Use Standard Kerning (Undo action name)", "Undo action name"); + case EditActionTurnOffLigatures: return UI_STRING_KEY_INTERNAL("Turn Off Ligatures", "Turn Off Ligatures (Undo action name)", "Undo action name"); + case EditActionUseStandardLigatures: return UI_STRING_KEY_INTERNAL("Use Standard Ligatures", "Use Standard Ligatures (Undo action name)", "Undo action name"); + case EditActionUseAllLigatures: return UI_STRING_KEY_INTERNAL("Use All Ligatures", "Use All Ligatures (Undo action name)", "Undo action name"); + case EditActionRaiseBaseline: return UI_STRING_KEY_INTERNAL("Raise Baseline", "Raise Baseline (Undo action name)", "Undo action name"); + case EditActionLowerBaseline: return UI_STRING_KEY_INTERNAL("Lower Baseline", "Lower Baseline (Undo action name)", "Undo action name"); + case EditActionSetTraditionalCharacterShape: return UI_STRING_KEY_INTERNAL("Set Traditional Character Shape", "Set Traditional Character Shape (Undo action name)", "Undo action name"); + case EditActionSetFont: return UI_STRING_KEY_INTERNAL("Set Font", "Set Font (Undo action name)", "Undo action name"); + case EditActionChangeAttributes: return UI_STRING_KEY_INTERNAL("Change Attributes", "Change Attributes (Undo action name)", "Undo action name"); + case EditActionAlignLeft: return UI_STRING_KEY_INTERNAL("Align Left", "Align Left (Undo action name)", "Undo action name"); + case EditActionAlignRight: return UI_STRING_KEY_INTERNAL("Align Right", "Align Right (Undo action name)", "Undo action name"); + case EditActionCenter: return UI_STRING_KEY_INTERNAL("Center", "Center (Undo action name)", "Undo action name"); + case EditActionJustify: return UI_STRING_KEY_INTERNAL("Justify", "Justify (Undo action name)", "Undo action name"); + case EditActionSetWritingDirection: return UI_STRING_KEY_INTERNAL("Set Writing Direction", "Set Writing Direction (Undo action name)", "Undo action name"); + case EditActionSubscript: return UI_STRING_KEY_INTERNAL("Subscript", "Subscript (Undo action name)", "Undo action name"); + case EditActionSuperscript: return UI_STRING_KEY_INTERNAL("Superscript", "Superscript (Undo action name)", "Undo action name"); + case EditActionUnderline: return UI_STRING_KEY_INTERNAL("Underline", "Underline (Undo action name)", "Undo action name"); + case EditActionOutline: return UI_STRING_KEY_INTERNAL("Outline", "Outline (Undo action name)", "Undo action name"); + case EditActionUnscript: return UI_STRING_KEY_INTERNAL("Unscript", "Unscript (Undo action name)", "Undo action name"); + case EditActionDrag: return UI_STRING_KEY_INTERNAL("Drag", "Drag (Undo action name)", "Undo action name"); + case EditActionCut: return UI_STRING_KEY_INTERNAL("Cut", "Cut (Undo action name)", "Undo action name"); + case EditActionPaste: return UI_STRING_KEY_INTERNAL("Paste", "Paste (Undo action name)", "Undo action name"); + case EditActionPasteFont: return UI_STRING_KEY_INTERNAL("Paste Font", "Paste Font (Undo action name)", "Undo action name"); + case EditActionPasteRuler: return UI_STRING_KEY_INTERNAL("Paste Ruler", "Paste Ruler (Undo action name)", "Undo action name"); + case EditActionTyping: return UI_STRING_KEY_INTERNAL("Typing", "Typing (Undo action name)", "Undo action name"); + case EditActionCreateLink: return UI_STRING_KEY_INTERNAL("Create Link", "Create Link (Undo action name)", "Undo action name"); + case EditActionUnlink: return UI_STRING_KEY_INTERNAL("Unlink", "Unlink (Undo action name)", "Undo action name"); + case EditActionInsertList: return UI_STRING_KEY_INTERNAL("Insert List", "Insert List (Undo action name)", "Undo action name"); + case EditActionFormatBlock: return UI_STRING_KEY_INTERNAL("Formatting", "Format Block (Undo action name)", "Undo action name"); + case EditActionIndent: return UI_STRING_KEY_INTERNAL("Indent", "Indent (Undo action name)", "Undo action name"); + case EditActionOutdent: return UI_STRING_KEY_INTERNAL("Outdent", "Outdent (Undo action name)", "Undo action name"); } return nil; } @@ -594,6 +589,16 @@ void WebEditorClient::clearUndoRedoOperations() } } +bool WebEditorClient::canCopyCut(bool defaultValue) const +{ + return defaultValue; +} + +bool WebEditorClient::canPaste(bool defaultValue) const +{ + return defaultValue; +} + bool WebEditorClient::canUndo() const { return [[m_webView undoManager] canUndo]; @@ -767,7 +772,7 @@ void WebEditorClient::checkGrammarOfString(const UChar* text, int length, Vector [textString release]; if (badGrammarLocation) // WebCore expects -1 to represent "not found" - *badGrammarLocation = (range.location == NSNotFound) ? -1 : range.location; + *badGrammarLocation = (range.location == NSNotFound) ? -1 : static_cast<int>(range.location); if (badGrammarLength) *badGrammarLength = range.length; for (NSDictionary *detail in grammarDetails) { @@ -889,10 +894,6 @@ void WebEditorClient::updateSpellingUIWithGrammarString(const String& badGrammar void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelType panelType, const FloatRect& boundingBoxOfReplacedString, const String& replacedString, const String& replacementString, const Vector<String>& alternativeReplacementStrings, Editor* editor) { dismissCorrectionPanel(ReasonForDismissingCorrectionPanelIgnored); - NSRect boundingBoxAsNSRect = boundingBoxOfReplacedString; - NSRect webViewFrame = m_webView.frame; - boundingBoxAsNSRect.origin.y = webViewFrame.size.height-NSMaxY(boundingBoxAsNSRect); - // Need to explicitly use these local NSString objects, because the C++ references may be invalidated by the time the block below is executed. NSString *replacedStringAsNSString = replacedString; NSString *replacementStringAsNSString = replacementString; @@ -910,7 +911,7 @@ void WebEditorClient::showCorrectionPanel(WebCore::CorrectionPanelInfo::PanelTyp [alternativeStrings addObject:(NSString*)alternativeReplacementStrings[i]]; } NSSpellChecker *spellChecker = [NSSpellChecker sharedSpellChecker]; - [[NSSpellChecker sharedSpellChecker] showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:alternativeStrings forStringInRect:boundingBoxAsNSRect view:m_webView completionHandler:^(NSString *acceptedString) { + [[NSSpellChecker sharedSpellChecker] showCorrectionBubbleOfType:bubbleType primaryString:replacementStringAsNSString alternativeStrings:alternativeStrings forStringInRect:boundingBoxOfReplacedString view:m_webView completionHandler:^(NSString *acceptedString) { switch (bubbleType) { case NSCorrectionBubbleTypeCorrection: if (acceptedString) @@ -952,6 +953,12 @@ bool WebEditorClient::isShowingCorrectionPanel() { return m_correctionPanelIsShown; } + +void WebEditorClient::recordAutocorrectionResponse(EditorClient::AutocorrectionResponseType responseType, const String& replacedString, const String& replacementString) +{ + NSCorrectionResponse spellCheckerResponse = responseType == EditorClient::AutocorrectionReverted ? NSCorrectionResponseReverted : NSCorrectionResponseEdited; + [[NSSpellChecker sharedSpellChecker] recordResponse:spellCheckerResponse toCorrection:replacementString forWord:replacedString language:nil inSpellDocumentWithTag:[m_webView spellCheckerDocumentTag]]; +} #endif void WebEditorClient::updateSpellingUIWithMisspelledWord(const String& misspelledWord) diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h index f29ba72..c484729 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.h @@ -114,8 +114,8 @@ private: virtual WebCore::Frame* dispatchCreatePage(const WebCore::NavigationAction&); virtual void dispatchShow(); - virtual void dispatchDecidePolicyForMIMEType(WebCore::FramePolicyFunction, - const WTF::String& MIMEType, const WebCore::ResourceRequest&); + virtual void dispatchDecidePolicyForResponse(WebCore::FramePolicyFunction, + const WebCore::ResourceResponse&, const WebCore::ResourceRequest&); virtual void dispatchDecidePolicyForNewWindowAction(WebCore::FramePolicyFunction, const WebCore::NavigationAction&, const WebCore::ResourceRequest&, PassRefPtr<WebCore::FormState>, const WTF::String& frameName); virtual void dispatchDecidePolicyForNavigationAction(WebCore::FramePolicyFunction, @@ -151,9 +151,11 @@ private: virtual void updateGlobalHistoryRedirectLinks(); virtual bool shouldGoToHistoryItem(WebCore::HistoryItem*) const; + virtual bool shouldStopLoadingForHistoryItem(WebCore::HistoryItem*) const; virtual void dispatchDidAddBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidRemoveBackForwardItem(WebCore::HistoryItem*) const; virtual void dispatchDidChangeBackForwardIndex() const; + virtual void updateGlobalHistoryItemForPage(); virtual void didDisplayInsecureContent(); virtual void didRunInsecureContent(WebCore::SecurityOrigin*, const WebCore::KURL&); @@ -238,9 +240,11 @@ private: NSDictionary *actionDictionary(const WebCore::NavigationAction&, PassRefPtr<WebCore::FormState>) const; virtual bool canCachePage() const; - + virtual PassRefPtr<WebCore::FrameNetworkingContext> createNetworkingContext(); + virtual bool shouldPaintBrokenImage(const WebCore::KURL&) const; + RetainPtr<WebFrame> m_webFrame; RetainPtr<WebFramePolicyListener> m_policyListener; diff --git a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm index 6484584..a558d83 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm @@ -75,6 +75,7 @@ #import "WebUIDelegatePrivate.h" #import "WebViewInternal.h" #import <WebCore/AuthenticationMac.h> +#import <WebCore/BackForwardController.h> #import <WebCore/BlockExceptions.h> #import <WebCore/CachedFrame.h> #import <WebCore/Chrome.h> @@ -439,6 +440,18 @@ bool WebFrameLoaderClient::canAuthenticateAgainstProtectionSpace(DocumentLoader* } #endif +bool WebFrameLoaderClient::shouldPaintBrokenImage(const KURL& imageURL) const +{ + WebView *webView = getWebView(m_webFrame.get()); + WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView); + + if (implementations->shouldPaintBrokenImageForURLFunc) { + NSURL* url = imageURL; + return CallResourceLoadDelegateReturningBoolean(YES, implementations->shouldPaintBrokenImageForURLFunc, webView, @selector(webView:shouldPaintBrokenImageForURL:), url); + } + return true; +} + void WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge(DocumentLoader* loader, unsigned long identifier, const AuthenticationChallenge&challenge) { WebView *webView = getWebView(m_webFrame.get()); @@ -729,13 +742,13 @@ void WebFrameLoaderClient::dispatchShow() [[webView _UIDelegateForwarder] webViewShow:webView]; } -void WebFrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction function, - const String& MIMEType, const ResourceRequest& request) +void WebFrameLoaderClient::dispatchDecidePolicyForResponse(FramePolicyFunction function, + const ResourceResponse& response, const ResourceRequest& request) { WebView *webView = getWebView(m_webFrame.get()); [[webView _policyDelegateForwarder] webView:webView - decidePolicyForMIMEType:MIMEType + decidePolicyForMIMEType:response.mimeType() request:request.nsURLRequest() frame:m_webFrame.get() decisionListener:setUpPolicyListener(function).get()]; @@ -937,6 +950,11 @@ bool WebFrameLoaderClient::shouldGoToHistoryItem(HistoryItem* item) const return [[view _policyDelegateForwarder] webView:view shouldGoToHistoryItem:webItem]; } +bool WebFrameLoaderClient::shouldStopLoadingForHistoryItem(HistoryItem* item) const +{ + return true; +} + void WebFrameLoaderClient::dispatchDidAddBackForwardItem(HistoryItem*) const { } @@ -949,6 +967,19 @@ void WebFrameLoaderClient::dispatchDidChangeBackForwardIndex() const { } +void WebFrameLoaderClient::updateGlobalHistoryItemForPage() +{ + HistoryItem* historyItem = 0; + + if (Page* page = core(m_webFrame.get())->page()) { + if (!page->settings()->privateBrowsingEnabled()) + historyItem = page->backForward()->currentItem(); + } + + WebView *webView = getWebView(m_webFrame.get()); + [webView _setGlobalHistoryItem:historyItem]; +} + void WebFrameLoaderClient::didDisplayInsecureContent() { WebView *webView = getWebView(m_webFrame.get()); diff --git a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm index d47784f..d5a1d95 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebInspectorClient.mm @@ -35,7 +35,7 @@ #import "WebInspector.h" #import "WebInspectorPrivate.h" #import "WebInspectorFrontend.h" -#import "WebLocalizableStrings.h" +#import "WebLocalizableStringsInternal.h" #import "WebNodeHighlight.h" #import "WebUIDelegate.h" #import "WebViewInternal.h" @@ -203,7 +203,7 @@ void WebInspectorFrontendClient::inspectedURLChanged(const String& newURL) void WebInspectorFrontendClient::updateWindowTitle() const { - NSString *title = [NSString stringWithFormat:UI_STRING("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL]; + NSString *title = [NSString stringWithFormat:UI_STRING_INTERNAL("Web Inspector — %@", "Web Inspector window title"), (NSString *)m_inspectedURL]; [[m_windowController.get() window] setTitle:title]; } @@ -513,15 +513,15 @@ void WebInspectorFrontendClient::updateWindowTitle() const if ([item action] == @selector(toggleDebuggingJavaScript:) && isMenuItem) { NSMenuItem *menuItem = (NSMenuItem *)item; if ([[_inspectedWebView inspector] isDebuggingJavaScript]) - [menuItem setTitle:UI_STRING("Stop Debugging JavaScript", "title for Stop Debugging JavaScript menu item")]; + [menuItem setTitle:UI_STRING_INTERNAL("Stop Debugging JavaScript", "title for Stop Debugging JavaScript menu item")]; else - [menuItem setTitle:UI_STRING("Start Debugging JavaScript", "title for Start Debugging JavaScript menu item")]; + [menuItem setTitle:UI_STRING_INTERNAL("Start Debugging JavaScript", "title for Start Debugging JavaScript menu item")]; } else if ([item action] == @selector(toggleProfilingJavaScript:) && isMenuItem) { NSMenuItem *menuItem = (NSMenuItem *)item; if ([[_inspectedWebView inspector] isProfilingJavaScript]) - [menuItem setTitle:UI_STRING("Stop Profiling JavaScript", "title for Stop Profiling JavaScript menu item")]; + [menuItem setTitle:UI_STRING_INTERNAL("Stop Profiling JavaScript", "title for Stop Profiling JavaScript menu item")]; else - [menuItem setTitle:UI_STRING("Start Profiling JavaScript", "title for Start Profiling JavaScript menu item")]; + [menuItem setTitle:UI_STRING_INTERNAL("Start Profiling JavaScript", "title for Start Profiling JavaScript menu item")]; } return YES; diff --git a/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m b/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m index 454175e..ea1526f 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m +++ b/Source/WebKit/mac/WebCoreSupport/WebKeyGenerator.m @@ -28,7 +28,7 @@ #import <WebKit/WebKeyGenerator.h> -#import <WebKit/WebLocalizableStrings.h> +#import "WebLocalizableStringsInternal.h" #import <WebKitSystemInterface.h> #import <wtf/Assertions.h> @@ -52,9 +52,9 @@ { if (!strengthMenuItemTitles) { strengthMenuItemTitles = [[NSArray alloc] initWithObjects: - UI_STRING("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"), - UI_STRING("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"), - UI_STRING("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"), nil]; + UI_STRING_INTERNAL("2048 (High Grade)", "Menu item title for KEYGEN pop-up menu"), + UI_STRING_INTERNAL("1024 (Medium Grade)", "Menu item title for KEYGEN pop-up menu"), + UI_STRING_INTERNAL("512 (Low Grade)", "Menu item title for KEYGEN pop-up menu"), nil]; } return strengthMenuItemTitles; } @@ -77,13 +77,28 @@ return nil; } - NSString *keyDescription = [NSString stringWithFormat:UI_STRING("Key from %@", "name of keychain key generated by the KEYGEN tag"), [pageURL host]]; + NSString *keyDescription = [NSString stringWithFormat:UI_STRING_INTERNAL("Key from %@", "name of keychain key generated by the KEYGEN tag"), [pageURL host]]; return [(NSString *)WKSignedPublicKeyAndChallengeString(keySize, (CFStringRef)challenge, (CFStringRef)keyDescription) autorelease]; } +static inline WebCertificateParseResult toWebCertificateParseResult(WKCertificateParseResult result) +{ + switch (result) { + case WKCertificateParseResultSucceeded: + return WebCertificateParseResultSucceeded; + case WKCertificateParseResultFailed: + return WebCertificateParseResultFailed; + case WKCertificateParseResultPKCS7: + return WebCertificateParseResultPKCS7; + } + + ASSERT_NOT_REACHED(); + return WebCertificateParseResultFailed; +} + - (WebCertificateParseResult)addCertificatesToKeychainFromData:(NSData *)data { - return WKAddCertificatesToKeychainFromData([data bytes], [data length]); + return toWebCertificateParseResult(WKAddCertificatesToKeychainFromData([data bytes], [data length])); } @end diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h index fab7eee..30cadcf 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h +++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h @@ -26,12 +26,13 @@ #ifndef WebPlatformStrategies_h #define WebPlatformStrategies_h +#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::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { +class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { public: static void initialize(); @@ -39,10 +40,14 @@ private: WebPlatformStrategies(); // WebCore::PlatformStrategies + virtual WebCore::CookiesStrategy* createCookiesStrategy(); virtual WebCore::PluginStrategy* createPluginStrategy(); virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); + // WebCore::CookiesStrategy + virtual void notifyCookiesChanged(); + // WebCore::PluginStrategy virtual void refreshPlugins(); virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); @@ -55,6 +60,7 @@ private: 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(); diff --git a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm index f95594a..94fc572 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm @@ -25,7 +25,7 @@ #import "WebPlatformStrategies.h" -#import "WebLocalizableStrings.h" +#import "WebLocalizableStringsInternal.h" #import "WebPluginDatabase.h" #import "WebPluginPackage.h" #import <WebCore/BlockExceptions.h> @@ -34,10 +34,6 @@ #import <WebCore/PageGroup.h> #import <wtf/StdLibExtras.h> -#ifdef BUILDING_ON_TIGER -typedef unsigned NSUInteger; -#endif - using namespace WebCore; void WebPlatformStrategies::initialize() @@ -50,7 +46,10 @@ WebPlatformStrategies::WebPlatformStrategies() { } -// PluginStrategy +CookiesStrategy* WebPlatformStrategies::createCookiesStrategy() +{ + return this; +} PluginStrategy* WebPlatformStrategies::createPluginStrategy() { @@ -67,6 +66,10 @@ VisitedLinkStrategy* WebPlatformStrategies::createVisitedLinkStrategy() return this; } +void WebPlatformStrategies::notifyCookiesChanged() +{ +} + void WebPlatformStrategies::refreshPlugins() { [[WebPluginDatabase sharedDatabase] refresh]; @@ -90,203 +93,208 @@ void WebPlatformStrategies::getPluginInfo(const WebCore::Page*, Vector<WebCore:: String WebPlatformStrategies::inputElementAltText() { - return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value"); + 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("Reset", "default label for Reset buttons in forms on web pages"); + return UI_STRING_INTERNAL("Reset", "default label for Reset buttons in forms on web pages"); } String WebPlatformStrategies::searchableIndexIntroduction() { - return UI_STRING("This is a searchable index. Enter search keywords: ", + 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("Submit", "default label for Submit buttons in forms on web pages"); + 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("Choose File", "title for file button used in HTML forms"); + return UI_STRING_INTERNAL("Choose File", "title for file button used in HTML forms"); } String WebPlatformStrategies::fileButtonNoFileSelectedLabel() { - return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected"); + 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("unknown", "Unknown filename"); + return UI_STRING_INTERNAL("unknown", "Unknown filename"); } #if ENABLE(CONTEXT_MENUS) String WebPlatformStrategies::contextMenuItemTagOpenLinkInNewWindow() { - return UI_STRING("Open Link in New Window", "Open in New Window context menu item"); + return UI_STRING_INTERNAL("Open Link in New Window", "Open in New Window context menu item"); } String WebPlatformStrategies::contextMenuItemTagDownloadLinkToDisk() { - return UI_STRING("Download Linked File", "Download Linked File context menu item"); + return UI_STRING_INTERNAL("Download Linked File", "Download Linked File context menu item"); } String WebPlatformStrategies::contextMenuItemTagCopyLinkToClipboard() { - return UI_STRING("Copy Link", "Copy Link context menu item"); + return UI_STRING_INTERNAL("Copy Link", "Copy Link context menu item"); } String WebPlatformStrategies::contextMenuItemTagOpenImageInNewWindow() { - return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item"); + return UI_STRING_INTERNAL("Open Image in New Window", "Open Image in New Window context menu item"); } String WebPlatformStrategies::contextMenuItemTagDownloadImageToDisk() { - return UI_STRING("Download Image", "Download Image context menu item"); + return UI_STRING_INTERNAL("Download Image", "Download Image context menu item"); } String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() { - return UI_STRING("Copy Image", "Copy Image context menu item"); + return UI_STRING_INTERNAL("Copy Image", "Copy Image context menu item"); } String WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow() { - return UI_STRING("Open Video in New Window", "Open Video in New Window context menu item"); + return UI_STRING_INTERNAL("Open Video in New Window", "Open Video in New Window context menu item"); } String WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow() { - return UI_STRING("Open Audio in New Window", "Open Audio in New Window context menu item"); + return UI_STRING_INTERNAL("Open Audio in New Window", "Open Audio in New Window context menu item"); } String WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard() { - return UI_STRING("Copy Video Address", "Copy Video Address Location context menu item"); + return UI_STRING_INTERNAL("Copy Video Address", "Copy Video Address Location context menu item"); } String WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard() { - return UI_STRING("Copy Audio Address", "Copy Audio Address Location context menu item"); + return UI_STRING_INTERNAL("Copy Audio Address", "Copy Audio Address Location context menu item"); } String WebPlatformStrategies::contextMenuItemTagToggleMediaControls() { - return UI_STRING("Controls", "Media Controls context menu item"); + return UI_STRING_INTERNAL("Controls", "Media Controls context menu item"); } String WebPlatformStrategies::contextMenuItemTagToggleMediaLoop() { - return UI_STRING("Loop", "Media Loop context menu item"); + return UI_STRING_INTERNAL("Loop", "Media Loop context menu item"); } String WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen() { - return UI_STRING("Enter Fullscreen", "Video Enter Fullscreen context menu item"); + return UI_STRING_INTERNAL("Enter Fullscreen", "Video Enter Fullscreen context menu item"); } String WebPlatformStrategies::contextMenuItemTagMediaPlay() { - return UI_STRING("Play", "Media Play context menu item"); + return UI_STRING_INTERNAL("Play", "Media Play context menu item"); } String WebPlatformStrategies::contextMenuItemTagMediaPause() { - return UI_STRING("Pause", "Media Pause context menu item"); + return UI_STRING_INTERNAL("Pause", "Media Pause context menu item"); } String WebPlatformStrategies::contextMenuItemTagMediaMute() { - return UI_STRING("Mute", "Media Mute context menu item"); + return UI_STRING_INTERNAL("Mute", "Media Mute context menu item"); } String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() { - return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); + return UI_STRING_INTERNAL("Open Frame in New Window", "Open Frame in New Window context menu item"); } String WebPlatformStrategies::contextMenuItemTagCopy() { - return UI_STRING("Copy", "Copy context menu item"); + return UI_STRING_INTERNAL("Copy", "Copy context menu item"); } String WebPlatformStrategies::contextMenuItemTagGoBack() { - return UI_STRING("Back", "Back context menu item"); + return UI_STRING_INTERNAL("Back", "Back context menu item"); } String WebPlatformStrategies::contextMenuItemTagGoForward() { - return UI_STRING("Forward", "Forward context menu item"); + return UI_STRING_INTERNAL("Forward", "Forward context menu item"); } String WebPlatformStrategies::contextMenuItemTagStop() { - return UI_STRING("Stop", "Stop context menu item"); + return UI_STRING_INTERNAL("Stop", "Stop context menu item"); } String WebPlatformStrategies::contextMenuItemTagReload() { - return UI_STRING("Reload", "Reload context menu item"); + return UI_STRING_INTERNAL("Reload", "Reload context menu item"); } String WebPlatformStrategies::contextMenuItemTagCut() { - return UI_STRING("Cut", "Cut context menu item"); + return UI_STRING_INTERNAL("Cut", "Cut context menu item"); } String WebPlatformStrategies::contextMenuItemTagPaste() { - return UI_STRING("Paste", "Paste context menu item"); + return UI_STRING_INTERNAL("Paste", "Paste context menu item"); } String WebPlatformStrategies::contextMenuItemTagNoGuessesFound() { - return UI_STRING("No Guesses Found", "No Guesses Found context menu item"); + return UI_STRING_INTERNAL("No Guesses Found", "No Guesses Found context menu item"); } String WebPlatformStrategies::contextMenuItemTagIgnoreSpelling() { - return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item"); + return UI_STRING_INTERNAL("Ignore Spelling", "Ignore Spelling context menu item"); } String WebPlatformStrategies::contextMenuItemTagLearnSpelling() { - return UI_STRING("Learn Spelling", "Learn Spelling context menu item"); + return UI_STRING_INTERNAL("Learn Spelling", "Learn Spelling context menu item"); } String WebPlatformStrategies::contextMenuItemTagSearchWeb() { - return UI_STRING("Search in Google", "Search in Google context menu item"); + return UI_STRING_INTERNAL("Search in Google", "Search in Google context menu item"); } String WebPlatformStrategies::contextMenuItemTagLookUpInDictionary() { - return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item"); + return UI_STRING_INTERNAL("Look Up in Dictionary", "Look Up in Dictionary context menu item"); } String WebPlatformStrategies::contextMenuItemTagOpenLink() { - return UI_STRING("Open Link", "Open Link context menu item"); + return UI_STRING_INTERNAL("Open Link", "Open Link context menu item"); } String WebPlatformStrategies::contextMenuItemTagIgnoreGrammar() { - return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item"); + return UI_STRING_INTERNAL("Ignore Grammar", "Ignore Grammar context menu item"); } String WebPlatformStrategies::contextMenuItemTagSpellingMenu() { #ifndef BUILDING_ON_TIGER - return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); + return UI_STRING_INTERNAL("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); #else - return UI_STRING("Spelling", "Spelling context sub-menu item"); + return UI_STRING_INTERNAL("Spelling", "Spelling context sub-menu item"); #endif } @@ -294,187 +302,187 @@ String WebPlatformStrategies::contextMenuItemTagShowSpellingPanel(bool show) { #ifndef BUILDING_ON_TIGER if (show) - return UI_STRING("Show Spelling and Grammar", "menu item title"); - return UI_STRING("Hide Spelling and Grammar", "menu item title"); + 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("Spelling...", "menu item title"); + return UI_STRING_INTERNAL("Spelling...", "menu item title"); #endif } String WebPlatformStrategies::contextMenuItemTagCheckSpelling() { #ifndef BUILDING_ON_TIGER - return UI_STRING("Check Document Now", "Check spelling context menu item"); + return UI_STRING_INTERNAL("Check Document Now", "Check spelling context menu item"); #else - return UI_STRING("Check Spelling", "Check spelling context menu item"); + return UI_STRING_INTERNAL("Check Spelling", "Check spelling context menu item"); #endif } String WebPlatformStrategies::contextMenuItemTagCheckSpellingWhileTyping() { #ifndef BUILDING_ON_TIGER - return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item"); + return UI_STRING_INTERNAL("Check Spelling While Typing", "Check spelling while typing context menu item"); #else - return UI_STRING("Check Spelling as You Type", "Check spelling while typing context menu item"); + return UI_STRING_INTERNAL("Check Spelling as You Type", "Check spelling while typing context menu item"); #endif } String WebPlatformStrategies::contextMenuItemTagCheckGrammarWithSpelling() { - return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item"); + return UI_STRING_INTERNAL("Check Grammar With Spelling", "Check grammar with spelling context menu item"); } String WebPlatformStrategies::contextMenuItemTagFontMenu() { - return UI_STRING("Font", "Font context sub-menu item"); + return UI_STRING_INTERNAL("Font", "Font context sub-menu item"); } String WebPlatformStrategies::contextMenuItemTagBold() { - return UI_STRING("Bold", "Bold context menu item"); + return UI_STRING_INTERNAL("Bold", "Bold context menu item"); } String WebPlatformStrategies::contextMenuItemTagItalic() { - return UI_STRING("Italic", "Italic context menu item"); + return UI_STRING_INTERNAL("Italic", "Italic context menu item"); } String WebPlatformStrategies::contextMenuItemTagUnderline() { - return UI_STRING("Underline", "Underline context menu item"); + return UI_STRING_INTERNAL("Underline", "Underline context menu item"); } String WebPlatformStrategies::contextMenuItemTagOutline() { - return UI_STRING("Outline", "Outline context menu item"); + return UI_STRING_INTERNAL("Outline", "Outline context menu item"); } String WebPlatformStrategies::contextMenuItemTagWritingDirectionMenu() { #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) - return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item"); + return UI_STRING_INTERNAL("Paragraph Direction", "Paragraph direction context sub-menu item"); #else - return UI_STRING("Writing Direction", "Writing direction context sub-menu item"); + return UI_STRING_INTERNAL("Writing Direction", "Writing direction context sub-menu item"); #endif } String WebPlatformStrategies::contextMenuItemTagTextDirectionMenu() { - return UI_STRING("Selection Direction", "Selection direction context sub-menu item"); + return UI_STRING_INTERNAL("Selection Direction", "Selection direction context sub-menu item"); } String WebPlatformStrategies::contextMenuItemTagDefaultDirection() { - return UI_STRING("Default", "Default writing direction context menu item"); + return UI_STRING_INTERNAL("Default", "Default writing direction context menu item"); } String WebPlatformStrategies::contextMenuItemTagLeftToRight() { - return UI_STRING("Left to Right", "Left to Right context menu item"); + return UI_STRING_INTERNAL("Left to Right", "Left to Right context menu item"); } String WebPlatformStrategies::contextMenuItemTagRightToLeft() { - return UI_STRING("Right to Left", "Right to Left context menu item"); + return UI_STRING_INTERNAL("Right to Left", "Right to Left context menu item"); } #if PLATFORM(MAC) String WebPlatformStrategies::contextMenuItemTagSearchInSpotlight() { - return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item"); + return UI_STRING_INTERNAL("Search in Spotlight", "Search in Spotlight context menu item"); } String WebPlatformStrategies::contextMenuItemTagShowFonts() { - return UI_STRING("Show Fonts", "Show fonts context menu item"); + return UI_STRING_INTERNAL("Show Fonts", "Show fonts context menu item"); } String WebPlatformStrategies::contextMenuItemTagStyles() { - return UI_STRING("Styles...", "Styles context menu item"); + return UI_STRING_INTERNAL("Styles...", "Styles context menu item"); } String WebPlatformStrategies::contextMenuItemTagShowColors() { - return UI_STRING("Show Colors", "Show colors context menu item"); + return UI_STRING_INTERNAL("Show Colors", "Show colors context menu item"); } String WebPlatformStrategies::contextMenuItemTagSpeechMenu() { - return UI_STRING("Speech", "Speech context sub-menu item"); + return UI_STRING_INTERNAL("Speech", "Speech context sub-menu item"); } String WebPlatformStrategies::contextMenuItemTagStartSpeaking() { - return UI_STRING("Start Speaking", "Start speaking context menu item"); + return UI_STRING_INTERNAL("Start Speaking", "Start speaking context menu item"); } String WebPlatformStrategies::contextMenuItemTagStopSpeaking() { - return UI_STRING("Stop Speaking", "Stop speaking context menu item"); + return UI_STRING_INTERNAL("Stop Speaking", "Stop speaking context menu item"); } String WebPlatformStrategies::contextMenuItemTagCorrectSpellingAutomatically() { - return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item"); + return UI_STRING_INTERNAL("Correct Spelling Automatically", "Correct Spelling Automatically context menu item"); } String WebPlatformStrategies::contextMenuItemTagSubstitutionsMenu() { - return UI_STRING("Substitutions", "Substitutions context sub-menu item"); + return UI_STRING_INTERNAL("Substitutions", "Substitutions context sub-menu item"); } String WebPlatformStrategies::contextMenuItemTagShowSubstitutions(bool show) { if (show) - return UI_STRING("Show Substitutions", "menu item title"); - return UI_STRING("Hide Substitutions", "menu item title"); + return UI_STRING_INTERNAL("Show Substitutions", "menu item title"); + return UI_STRING_INTERNAL("Hide Substitutions", "menu item title"); } String WebPlatformStrategies::contextMenuItemTagSmartCopyPaste() { - return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item"); + return UI_STRING_INTERNAL("Smart Copy/Paste", "Smart Copy/Paste context menu item"); } String WebPlatformStrategies::contextMenuItemTagSmartQuotes() { - return UI_STRING("Smart Quotes", "Smart Quotes context menu item"); + return UI_STRING_INTERNAL("Smart Quotes", "Smart Quotes context menu item"); } String WebPlatformStrategies::contextMenuItemTagSmartDashes() { - return UI_STRING("Smart Dashes", "Smart Dashes context menu item"); + return UI_STRING_INTERNAL("Smart Dashes", "Smart Dashes context menu item"); } String WebPlatformStrategies::contextMenuItemTagSmartLinks() { - return UI_STRING("Smart Links", "Smart Links context menu item"); + return UI_STRING_INTERNAL("Smart Links", "Smart Links context menu item"); } String WebPlatformStrategies::contextMenuItemTagTextReplacement() { - return UI_STRING("Text Replacement", "Text Replacement context menu item"); + return UI_STRING_INTERNAL("Text Replacement", "Text Replacement context menu item"); } String WebPlatformStrategies::contextMenuItemTagTransformationsMenu() { - return UI_STRING("Transformations", "Transformations context sub-menu item"); + return UI_STRING_INTERNAL("Transformations", "Transformations context sub-menu item"); } String WebPlatformStrategies::contextMenuItemTagMakeUpperCase() { - return UI_STRING("Make Upper Case", "Make Upper Case context menu item"); + return UI_STRING_INTERNAL("Make Upper Case", "Make Upper Case context menu item"); } String WebPlatformStrategies::contextMenuItemTagMakeLowerCase() { - return UI_STRING("Make Lower Case", "Make Lower Case context menu item"); + return UI_STRING_INTERNAL("Make Lower Case", "Make Lower Case context menu item"); } String WebPlatformStrategies::contextMenuItemTagCapitalize() { - return UI_STRING("Capitalize", "Capitalize context menu item"); + return UI_STRING_INTERNAL("Capitalize", "Capitalize context menu item"); } String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replacedString) @@ -496,131 +504,131 @@ String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replace String WebPlatformStrategies::contextMenuItemTagInspectElement() { - return UI_STRING("Inspect Element", "Inspect Element context menu item"); + return UI_STRING_INTERNAL("Inspect Element", "Inspect Element context menu item"); } #endif // ENABLE(CONTEXT_MENUS) String WebPlatformStrategies::searchMenuNoRecentSearchesText() { - return UI_STRING("No recent searches", "Label for only item in menu that appears when clicking on the search field image, when no searches have been performed"); + 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("Recent Searches", "label for first item in the menu that appears when clicking on the search field image, used as embedded menu title"); + 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("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); + return UI_STRING_INTERNAL("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); } String WebPlatformStrategies::AXWebAreaText() { - return UI_STRING("HTML content", "accessibility role description for web area"); + return UI_STRING_INTERNAL("HTML content", "accessibility role description for web area"); } String WebPlatformStrategies::AXLinkText() { - return UI_STRING("link", "accessibility role description for link"); + return UI_STRING_INTERNAL("link", "accessibility role description for link"); } String WebPlatformStrategies::AXListMarkerText() { - return UI_STRING("list marker", "accessibility role description for list marker"); + return UI_STRING_INTERNAL("list marker", "accessibility role description for list marker"); } String WebPlatformStrategies::AXImageMapText() { - return UI_STRING("image map", "accessibility role description for image map"); + return UI_STRING_INTERNAL("image map", "accessibility role description for image map"); } String WebPlatformStrategies::AXHeadingText() { - return UI_STRING("heading", "accessibility role description for headings"); + return UI_STRING_INTERNAL("heading", "accessibility role description for headings"); } String WebPlatformStrategies::AXDefinitionListTermText() { - return UI_STRING("term", "term word of a definition"); + return UI_STRING_INTERNAL("term", "term word of a definition"); } String WebPlatformStrategies::AXDefinitionListDefinitionText() { - return UI_STRING("definition", "definition phrase"); + return UI_STRING_INTERNAL("definition", "definition phrase"); } String WebPlatformStrategies::AXARIAContentGroupText(const String& ariaType) { if (ariaType == "ARIAApplicationAlert") - return UI_STRING("alert", "An ARIA accessibility group that acts as an alert."); + return UI_STRING_INTERNAL("alert", "An ARIA accessibility group that acts as an alert."); if (ariaType == "ARIAApplicationAlertDialog") - return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); + return UI_STRING_INTERNAL("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); if (ariaType == "ARIAApplicationDialog") - return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog."); + return UI_STRING_INTERNAL("dialog", "An ARIA accessibility group that acts as an dialog."); if (ariaType == "ARIAApplicationLog") - return UI_STRING("log", "An ARIA accessibility group that acts as a console log."); + return UI_STRING_INTERNAL("log", "An ARIA accessibility group that acts as a console log."); if (ariaType == "ARIAApplicationMarquee") - return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee."); + return UI_STRING_INTERNAL("marquee", "An ARIA accessibility group that acts as a marquee."); if (ariaType == "ARIAApplicationStatus") - return UI_STRING("application status", "An ARIA accessibility group that acts as a status update."); + return UI_STRING_INTERNAL("application status", "An ARIA accessibility group that acts as a status update."); if (ariaType == "ARIAApplicationTimer") - return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer."); + return UI_STRING_INTERNAL("timer", "An ARIA accessibility group that acts as an updating timer."); if (ariaType == "ARIADocument") - return UI_STRING("document", "An ARIA accessibility group that acts as a document."); + return UI_STRING_INTERNAL("document", "An ARIA accessibility group that acts as a document."); if (ariaType == "ARIADocumentArticle") - return UI_STRING("article", "An ARIA accessibility group that acts as an article."); + return UI_STRING_INTERNAL("article", "An ARIA accessibility group that acts as an article."); if (ariaType == "ARIADocumentNote") - return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document."); + return UI_STRING_INTERNAL("note", "An ARIA accessibility group that acts as a note in a document."); if (ariaType == "ARIADocumentRegion") - return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document."); + return UI_STRING_INTERNAL("region", "An ARIA accessibility group that acts as a distinct region in a document."); if (ariaType == "ARIALandmarkApplication") - return UI_STRING("application", "An ARIA accessibility group that acts as an application."); + return UI_STRING_INTERNAL("application", "An ARIA accessibility group that acts as an application."); if (ariaType == "ARIALandmarkBanner") - return UI_STRING("banner", "An ARIA accessibility group that acts as a banner."); + return UI_STRING_INTERNAL("banner", "An ARIA accessibility group that acts as a banner."); if (ariaType == "ARIALandmarkComplementary") - return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information."); + return UI_STRING_INTERNAL("complementary", "An ARIA accessibility group that acts as a region of complementary information."); if (ariaType == "ARIALandmarkContentInfo") - return UI_STRING("content", "An ARIA accessibility group that contains content."); + return UI_STRING_INTERNAL("content", "An ARIA accessibility group that contains content."); if (ariaType == "ARIALandmarkMain") - return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website."); + return UI_STRING_INTERNAL("main", "An ARIA accessibility group that is the main portion of the website."); if (ariaType == "ARIALandmarkNavigation") - return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website."); + return UI_STRING_INTERNAL("navigation", "An ARIA accessibility group that contains the main navigation elements of a website."); if (ariaType == "ARIALandmarkSearch") - return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website."); + return UI_STRING_INTERNAL("search", "An ARIA accessibility group that contains a search feature of a website."); if (ariaType == "ARIAUserInterfaceTooltip") - return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip."); + return UI_STRING_INTERNAL("tooltip", "An ARIA accessibility group that acts as a tooltip."); if (ariaType == "ARIATabPanel") - return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab."); + return UI_STRING_INTERNAL("tab panel", "An ARIA accessibility group that contains the content of a tab."); if (ariaType == "ARIADocumentMath") - return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols."); + return UI_STRING_INTERNAL("math", "An ARIA accessibility group that contains mathematical symbols."); return String(); } String WebPlatformStrategies::AXButtonActionVerb() { - return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility"); + 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("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility"); + 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("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility"); + 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("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility"); + 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("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility"); + 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() @@ -635,27 +643,27 @@ String WebPlatformStrategies::AXMenuListPopupActionVerb() String WebPlatformStrategies::AXLinkActionVerb() { - return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); + 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("Missing Plug-in", "Label text to be used when a plugin is missing"); + return UI_STRING_INTERNAL("Missing Plug-in", "Label text to be used when a plugin is missing"); } String WebPlatformStrategies::crashedPluginText() { - return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed"); + 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("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), 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("Unknown", "Unknown filesize FTP directory listing item"); + return UI_STRING_INTERNAL("Unknown", "Unknown filesize FTP directory listing item"); } String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size) @@ -663,60 +671,60 @@ String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& #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("%@ %@×%@ pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, widthString, heightString]; + 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("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), (NSString *)filename, size.width(), size.height()]; + 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("Loading...", "Media controller status message when the media is loading"); + return UI_STRING_INTERNAL("Loading...", "Media controller status message when the media is loading"); } String WebPlatformStrategies::mediaElementLiveBroadcastStateText() { - return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast"); + 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("audio element controller", "accessibility role description for audio element controller"); + return UI_STRING_INTERNAL("audio element controller", "accessibility role description for audio element controller"); if (name == "VideoElement") - return UI_STRING("video element controller", "accessibility role description for video element controller"); + return UI_STRING_INTERNAL("video element controller", "accessibility role description for video element controller"); if (name == "MuteButton") - return UI_STRING("mute", "accessibility role description for mute button"); + return UI_STRING_INTERNAL("mute", "accessibility role description for mute button"); if (name == "UnMuteButton") - return UI_STRING("unmute", "accessibility role description for turn mute off button"); + return UI_STRING_INTERNAL("unmute", "accessibility role description for turn mute off button"); if (name == "PlayButton") - return UI_STRING("play", "accessibility role description for play button"); + return UI_STRING_INTERNAL("play", "accessibility role description for play button"); if (name == "PauseButton") - return UI_STRING("pause", "accessibility role description for pause button"); + return UI_STRING_INTERNAL("pause", "accessibility role description for pause button"); if (name == "Slider") - return UI_STRING("movie time", "accessibility role description for timeline slider"); + return UI_STRING_INTERNAL("movie time", "accessibility role description for timeline slider"); if (name == "SliderThumb") - return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb"); + return UI_STRING_INTERNAL("timeline slider thumb", "accessibility role description for timeline thumb"); if (name == "RewindButton") - return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button"); + return UI_STRING_INTERNAL("back 30 seconds", "accessibility role description for seek back 30 seconds button"); if (name == "ReturnToRealtimeButton") - return UI_STRING("return to realtime", "accessibility role description for return to real time button"); + return UI_STRING_INTERNAL("return to realtime", "accessibility role description for return to real time button"); if (name == "CurrentTimeDisplay") - return UI_STRING("elapsed time", "accessibility role description for elapsed time display"); + return UI_STRING_INTERNAL("elapsed time", "accessibility role description for elapsed time display"); if (name == "TimeRemainingDisplay") - return UI_STRING("remaining time", "accessibility role description for time remaining display"); + return UI_STRING_INTERNAL("remaining time", "accessibility role description for time remaining display"); if (name == "StatusDisplay") - return UI_STRING("status", "accessibility role description for movie status"); + return UI_STRING_INTERNAL("status", "accessibility role description for movie status"); if (name == "FullscreenButton") - return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button"); + return UI_STRING_INTERNAL("fullscreen", "accessibility role description for enter fullscreen button"); if (name == "SeekForwardButton") - return UI_STRING("fast forward", "accessibility role description for fast forward button"); + return UI_STRING_INTERNAL("fast forward", "accessibility role description for fast forward button"); if (name == "SeekBackButton") - return UI_STRING("fast reverse", "accessibility role description for fast reverse button"); + return UI_STRING_INTERNAL("fast reverse", "accessibility role description for fast reverse button"); if (name == "ShowClosedCaptionsButton") - return UI_STRING("show closed captions", "accessibility role description for show closed captions button"); + return UI_STRING_INTERNAL("show closed captions", "accessibility role description for show closed captions button"); if (name == "HideClosedCaptionsButton") - return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button"); + 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") @@ -729,41 +737,41 @@ String WebPlatformStrategies::localizedMediaControlElementString(const String& n String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& name) { if (name == "AudioElement") - return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller"); + return UI_STRING_INTERNAL("audio element playback controls and status display", "accessibility role description for audio element controller"); if (name == "VideoElement") - return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller"); + return UI_STRING_INTERNAL("video element playback controls and status display", "accessibility role description for video element controller"); if (name == "MuteButton") - return UI_STRING("mute audio tracks", "accessibility help text for mute button"); + return UI_STRING_INTERNAL("mute audio tracks", "accessibility help text for mute button"); if (name == "UnMuteButton") - return UI_STRING("unmute audio tracks", "accessibility help text for un mute button"); + return UI_STRING_INTERNAL("unmute audio tracks", "accessibility help text for un mute button"); if (name == "PlayButton") - return UI_STRING("begin playback", "accessibility help text for play button"); + return UI_STRING_INTERNAL("begin playback", "accessibility help text for play button"); if (name == "PauseButton") - return UI_STRING("pause playback", "accessibility help text for pause button"); + return UI_STRING_INTERNAL("pause playback", "accessibility help text for pause button"); if (name == "Slider") - return UI_STRING("movie time scrubber", "accessibility help text for timeline slider"); + return UI_STRING_INTERNAL("movie time scrubber", "accessibility help text for timeline slider"); if (name == "SliderThumb") - return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); + return UI_STRING_INTERNAL("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); if (name == "RewindButton") - return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); + return UI_STRING_INTERNAL("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); if (name == "ReturnToRealtimeButton") - return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button"); + 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("current movie time in seconds", "accessibility help text for elapsed time display"); + return UI_STRING_INTERNAL("current movie time in seconds", "accessibility help text for elapsed time display"); if (name == "TimeRemainingDisplay") - return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display"); + return UI_STRING_INTERNAL("number of seconds of movie remaining", "accessibility help text for remaining time display"); if (name == "StatusDisplay") - return UI_STRING("current movie status", "accessibility help text for movie status display"); + return UI_STRING_INTERNAL("current movie status", "accessibility help text for movie status display"); if (name == "SeekBackButton") - return UI_STRING("seek quickly back", "accessibility help text for fast rewind button"); + return UI_STRING_INTERNAL("seek quickly back", "accessibility help text for fast rewind button"); if (name == "SeekForwardButton") - return UI_STRING("seek quickly forward", "accessibility help text for fast forward button"); + return UI_STRING_INTERNAL("seek quickly forward", "accessibility help text for fast forward button"); if (name == "FullscreenButton") - return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); + return UI_STRING_INTERNAL("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); if (name == "ShowClosedCaptionsButton") - return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button"); + return UI_STRING_INTERNAL("start displaying closed captions", "accessibility help text for show closed captions button"); if (name == "HideClosedCaptionsButton") - return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button"); + return UI_STRING_INTERNAL("stop displaying closed captions", "accessibility help text for hide closed captions button"); ASSERT_NOT_REACHED(); return String(); @@ -772,7 +780,7 @@ String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& String WebPlatformStrategies::localizedMediaTimeDescription(float time) { if (!isfinite(time)) - return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value"); + 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); @@ -781,48 +789,48 @@ String WebPlatformStrategies::localizedMediaTimeDescription(float time) seconds %= 60; if (days) - 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]; + 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("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds]; + 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("%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 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]; + 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("value missing", "Validation message for required form control elements that have no value"); + return UI_STRING_INTERNAL("value missing", "Validation message for required form control elements that have no value"); } String WebPlatformStrategies::validationMessageTypeMismatchText() { - return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type"); + return UI_STRING_INTERNAL("type mismatch", "Validation message for input form controls with a value not matching type"); } String WebPlatformStrategies::validationMessagePatternMismatchText() { - return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); + 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("too long", "Validation message for form control elements with a value longer than maximum allowed length"); + 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("range underflow", "Validation message for input form controls with value lower than allowed minimum"); + return UI_STRING_INTERNAL("range underflow", "Validation message for input form controls with value lower than allowed minimum"); } String WebPlatformStrategies::validationMessageRangeOverflowText() { - return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum"); + return UI_STRING_INTERNAL("range overflow", "Validation message for input form controls with value higher than allowed maximum"); } String WebPlatformStrategies::validationMessageStepMismatchText() { - return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); + return UI_STRING_INTERNAL("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); } // VisitedLinkStrategy diff --git a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm index c39576b..6504f17 100644 --- a/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm +++ b/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.mm @@ -166,6 +166,13 @@ void InitWebCoreSystemInterface(void) INIT(AccessibilityHandleFocusChanged); INIT(CreateAXUIElementRef); INIT(UnregisterUniqueIdForElement); + INIT(CreatePrivateStorageSession); + INIT(CopyRequestWithStorageSession); + INIT(CreatePrivateInMemoryHTTPCookieStorage); + INIT(GetHTTPCookieAcceptPolicy); + INIT(HTTPCookiesForURL); + INIT(SetHTTPCookiesForURL); + INIT(DeleteHTTPCookie); didInit = true; } |