Changeset 63904 in webkit
- Timestamp:
- Jul 22, 2010 11:18:26 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r63902 r63904 1 2010-07-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Patch for https://bugs.webkit.org/show_bug.cgi?id=42836 6 Add localized strings stubs for WebKit2. 7 8 - Convert WebKit (mac) to use a LocalizationStrategy rather than the WebCoreViewFactory 9 for localized strings. 10 11 Gets us below 200 tests failing in WebKitTestRunner. 12 13 * WebCore.exp.in: 14 * WebCore.xcodeproj/project.pbxproj: 15 * page/mac/WebCoreViewFactory.h: 16 * platform/LocalizationStrategy.h: Added. 17 (WebCore::LocalizationStrategy::~LocalizationStrategy): 18 * platform/PlatformStrategies.h: 19 (WebCore::PlatformStrategies::pluginStrategy): 20 (WebCore::PlatformStrategies::localizationStrategy): 21 (WebCore::PlatformStrategies::PlatformStrategies): 22 (WebCore::PlatformStrategies::~PlatformStrategies): 23 * platform/mac/LocalizedStringsMac.mm: 24 1 25 2010-07-22 Andras Becsi <abecsi@webkit.org> 2 26 -
trunk/WebCore/WebCore.exp.in
r63888 r63904 451 451 __ZN7WebCore22ScriptExecutionContext26canSuspendActiveDOMObjectsEv 452 452 __ZN7WebCore22applicationIsAppleMailEv 453 __ZN7WebCore22contextMenuItemTagBoldEv 453 454 __ZN7WebCore22counterValueForElementEPNS_7ElementE 454 455 __ZN7WebCore22createFragmentFromTextEPNS_5RangeERKNS_6StringE … … 462 463 __ZN7WebCore23createFragmentFromNodesEPNS_8DocumentERKN3WTF6VectorIPNS_4NodeELm0EEE 463 464 __ZN7WebCore24BinaryPropertyListWriter17writePropertyListEv 465 __ZN7WebCore24contextMenuItemTagItalicEv 466 __ZN7WebCore24contextMenuItemTagStylesEv 464 467 __ZN7WebCore24createFragmentFromMarkupEPNS_8DocumentERKNS_6StringES4_NS_27FragmentScriptingPermissionE 465 468 __ZN7WebCore24decodeURLEscapeSequencesERKNS_6StringE … … 475 478 __ZN7WebCore25PluginMainThreadScheduler16unregisterPluginEP4_NPP 476 479 __ZN7WebCore25PluginMainThreadScheduler9schedulerEv 480 __ZN7WebCore25contextMenuItemTagOutlineEv 477 481 __ZN7WebCore26CSSMutableStyleDeclarationC1Ev 478 482 __ZN7WebCore26NetscapePlugInStreamLoader6createEPNS_5FrameEPNS_32NetscapePlugInStreamLoaderClientE 483 __ZN7WebCore26contextMenuItemTagFontMenuEv 484 __ZN7WebCore26contextMenuItemTagOpenLinkEv 479 485 __ZN7WebCore26usesTestModeFocusRingColorEv 480 486 __ZN7WebCore27CSSComputedStyleDeclarationC1EN3WTF10PassRefPtrINS_4NodeEEEbRKNS_6StringE 481 487 __ZN7WebCore27applicationIsAdobeInstallerEv 488 __ZN7WebCore27contextMenuItemTagShowFontsEv 489 __ZN7WebCore27contextMenuItemTagUnderlineEv 490 __ZN7WebCore28contextMenuItemTagCapitalizeEv 491 __ZN7WebCore28contextMenuItemTagShowColorsEv 492 __ZN7WebCore28contextMenuItemTagSmartLinksEv 493 __ZN7WebCore28contextMenuItemTagSpeechMenuEv 494 __ZN7WebCore29contextMenuItemTagLeftToRightEv 495 __ZN7WebCore29contextMenuItemTagRightToLeftEv 496 __ZN7WebCore29contextMenuItemTagSmartDashesEv 497 __ZN7WebCore29contextMenuItemTagSmartQuotesEv 482 498 __ZN7WebCore29isCharacterSmartReplaceExemptEib 483 499 __ZN7WebCore29setUsesTestModeFocusRingColorEb 500 __ZN7WebCore30contextMenuItemTagSpellingMenuEv 501 __ZN7WebCore30contextMenuItemTagStopSpeakingEv 484 502 __ZN7WebCore31CrossOriginPreflightResultCache5emptyEv 485 503 __ZN7WebCore31CrossOriginPreflightResultCache6sharedEv 486 504 __ZN7WebCore31applicationIsMicrosoftMessengerEv 505 __ZN7WebCore31contextMenuItemTagCheckSpellingEv 506 __ZN7WebCore31contextMenuItemTagIgnoreGrammarEv 507 __ZN7WebCore31contextMenuItemTagMakeLowerCaseEv 508 __ZN7WebCore31contextMenuItemTagMakeUpperCaseEv 509 __ZN7WebCore31contextMenuItemTagStartSpeakingEv 510 __ZN7WebCore32contextMenuItemTagInspectElementEv 511 __ZN7WebCore32contextMenuItemTagSmartCopyPasteEv 487 512 __ZN7WebCore32plainTextToMallocAllocatedBufferEPKNS_5RangeERjb 513 __ZN7WebCore33contextMenuItemTagTextReplacementEv 488 514 __ZN7WebCore33setDefaultThreadViolationBehaviorENS_23ThreadViolationBehaviorENS_20ThreadViolationRoundE 515 __ZN7WebCore34contextMenuItemTagDefaultDirectionEv 516 __ZN7WebCore35contextMenuItemTagShowSpellingPanelEb 517 __ZN7WebCore35contextMenuItemTagShowSubstitutionsEb 518 __ZN7WebCore35contextMenuItemTagSubstitutionsMenuEv 489 519 __ZN7WebCore36InitializeLoggingChannelsIfNecessaryEv 520 __ZN7WebCore37contextMenuItemTagTransformationsMenuEv 521 __ZN7WebCore38contextMenuItemTagWritingDirectionMenuEv 490 522 __ZN7WebCore3macERKNS_10CredentialE 491 523 __ZN7WebCore3macERKNS_23AuthenticationChallengeE 524 __ZN7WebCore42contextMenuItemTagCheckGrammarWithSpellingEv 525 __ZN7WebCore42contextMenuItemTagCheckSpellingWhileTypingEv 526 __ZN7WebCore46contextMenuItemTagCorrectSpellingAutomaticallyEv 492 527 __ZN7WebCore4Font11setCodePathENS0_8CodePathE 493 528 __ZN7WebCore4Font18shouldUseSmoothingEv -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r63863 r63904 2451 2451 934F71440D5A6F5300018D69 /* AuthenticationChallenge.h in Headers */ = {isa = PBXBuildFile; fileRef = 934F71430D5A6F5300018D69 /* AuthenticationChallenge.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2452 2452 934FE9E50B5CA539003E4A73 /* FileChooser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 934FE9E40B5CA539003E4A73 /* FileChooser.cpp */; }; 2453 935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 935207BD09BD410A00F2038D /* LocalizedStrings.h */; };2453 935207BE09BD410A00F2038D /* LocalizedStrings.h in Headers */ = {isa = PBXBuildFile; fileRef = 935207BD09BD410A00F2038D /* LocalizedStrings.h */; settings = {ATTRIBUTES = (Private, ); }; }; 2454 2454 935207C009BD412100F2038D /* LocalizedStringsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 935207BF09BD412000F2038D /* LocalizedStringsMac.mm */; }; 2455 2455 9352084509BD43B900F2038D /* Language.mm in Sources */ = {isa = PBXBuildFile; fileRef = 9352084409BD43B900F2038D /* Language.mm */; }; … … 4504 4504 BC5A86B50C3367E800EEA649 /* JSDOMSelection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC5A86B30C3367E800EEA649 /* JSDOMSelection.cpp */; }; 4505 4505 BC5A86B60C3367E800EEA649 /* JSDOMSelection.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */; }; 4506 BC5CFCA911F793320099ED09 /* LocalizationStrategy.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5CFCA811F793320099ED09 /* LocalizationStrategy.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4506 4507 BC5EB5DB0E81B7EA00B25965 /* BorderValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB5DA0E81B7EA00B25965 /* BorderValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4507 4508 BC5EB5DD0E81B8DD00B25965 /* OutlineValue.h in Headers */ = {isa = PBXBuildFile; fileRef = BC5EB5DC0E81B8DD00B25965 /* OutlineValue.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 10126 10127 BC5A86B30C3367E800EEA649 /* JSDOMSelection.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = JSDOMSelection.cpp; sourceTree = "<group>"; }; 10127 10128 BC5A86B40C3367E800EEA649 /* JSDOMSelection.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = JSDOMSelection.h; sourceTree = "<group>"; }; 10129 BC5CFCA811F793320099ED09 /* LocalizationStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocalizationStrategy.h; sourceTree = "<group>"; }; 10128 10130 BC5EB5DA0E81B7EA00B25965 /* BorderValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BorderValue.h; path = style/BorderValue.h; sourceTree = "<group>"; }; 10129 10131 BC5EB5DC0E81B8DD00B25965 /* OutlineValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OutlineValue.h; path = style/OutlineValue.h; sourceTree = "<group>"; }; … … 16223 16225 A7AD2F860EC89D07008AB002 /* LinkHash.h */, 16224 16226 935207BD09BD410A00F2038D /* LocalizedStrings.h */, 16227 BC5CFCA811F793320099ED09 /* LocalizationStrategy.h */, 16225 16228 A8239DFE09B3CF8A00B60641 /* Logging.cpp */, 16226 16229 A8239DFF09B3CF8A00B60641 /* Logging.h */, … … 19839 19842 CE172E011136E8CE0062A533 /* ZoomMode.h in Headers */, 19840 19843 8C6EA61A11EF7E0400FD8EE3 /* RuntimeEnabledFeatures.h in Headers */, 19844 BC5CFCA911F793320099ED09 /* LocalizationStrategy.h in Headers */, 19841 19845 5162C7F511F77EFB00612EFE /* SchemeRegistry.h in Headers */, 19842 19846 ); -
trunk/WebCore/page/mac/WebCoreViewFactory.h
r61444 r63904 1 1 /* 2 * Copyright (C) 2003, 2005, 2009 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2003, 2005, 2009, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 29 29 @protocol WebCoreViewFactory 30 30 31 - (NSString *)inputElementAltText;32 - (NSString *)resetButtonDefaultLabel;33 - (NSString *)searchableIndexIntroduction;34 - (NSString *)submitButtonDefaultLabel;35 - (NSString *)fileButtonChooseFileLabel;36 - (NSString *)fileButtonNoFileSelectedLabel;37 - (NSString *)copyImageUnknownFileLabel;38 39 #if ENABLE(CONTEXT_MENUS)40 // Context menu item titles41 - (NSString *)contextMenuItemTagOpenLinkInNewWindow;42 - (NSString *)contextMenuItemTagDownloadLinkToDisk;43 - (NSString *)contextMenuItemTagCopyLinkToClipboard;44 - (NSString *)contextMenuItemTagOpenImageInNewWindow;45 - (NSString *)contextMenuItemTagDownloadImageToDisk;46 - (NSString *)contextMenuItemTagCopyImageToClipboard;47 - (NSString *)contextMenuItemTagOpenFrameInNewWindow;48 - (NSString *)contextMenuItemTagCopy;49 - (NSString *)contextMenuItemTagGoBack;50 - (NSString *)contextMenuItemTagGoForward;51 - (NSString *)contextMenuItemTagStop;52 - (NSString *)contextMenuItemTagReload;53 - (NSString *)contextMenuItemTagCut;54 - (NSString *)contextMenuItemTagPaste;55 - (NSString *)contextMenuItemTagNoGuessesFound;56 - (NSString *)contextMenuItemTagIgnoreSpelling;57 - (NSString *)contextMenuItemTagLearnSpelling;58 - (NSString *)contextMenuItemTagSearchInSpotlight;59 - (NSString *)contextMenuItemTagSearchWeb;60 - (NSString *)contextMenuItemTagLookUpInDictionary;61 - (NSString *)contextMenuItemTagOpenLink;62 - (NSString *)contextMenuItemTagIgnoreGrammar;63 - (NSString *)contextMenuItemTagSpellingMenu;64 - (NSString *)contextMenuItemTagShowSpellingPanel:(bool)show;65 - (NSString *)contextMenuItemTagCheckSpelling;66 - (NSString *)contextMenuItemTagCheckSpellingWhileTyping;67 - (NSString *)contextMenuItemTagCheckGrammarWithSpelling;68 - (NSString *)contextMenuItemTagFontMenu;69 - (NSString *)contextMenuItemTagShowFonts;70 - (NSString *)contextMenuItemTagBold;71 - (NSString *)contextMenuItemTagItalic;72 - (NSString *)contextMenuItemTagUnderline;73 - (NSString *)contextMenuItemTagOutline;74 - (NSString *)contextMenuItemTagStyles;75 - (NSString *)contextMenuItemTagShowColors;76 - (NSString *)contextMenuItemTagSpeechMenu;77 - (NSString *)contextMenuItemTagStartSpeaking;78 - (NSString *)contextMenuItemTagStopSpeaking;79 - (NSString *)contextMenuItemTagWritingDirectionMenu;80 - (NSString *)contextMenuItemTagTextDirectionMenu;81 - (NSString *)contextMenuItemTagDefaultDirection;82 - (NSString *)contextMenuItemTagLeftToRight;83 - (NSString *)contextMenuItemTagRightToLeft;84 - (NSString *)contextMenuItemTagCorrectSpellingAutomatically;85 - (NSString *)contextMenuItemTagSubstitutionsMenu;86 - (NSString *)contextMenuItemTagShowSubstitutions:(bool)show;87 - (NSString *)contextMenuItemTagSmartCopyPaste;88 - (NSString *)contextMenuItemTagSmartQuotes;89 - (NSString *)contextMenuItemTagSmartDashes;90 - (NSString *)contextMenuItemTagSmartLinks;91 - (NSString *)contextMenuItemTagTextReplacement;92 - (NSString *)contextMenuItemTagTransformationsMenu;93 - (NSString *)contextMenuItemTagMakeUpperCase;94 - (NSString *)contextMenuItemTagMakeLowerCase;95 - (NSString *)contextMenuItemTagCapitalize;96 - (NSString *)contextMenuItemTagChangeBack:(NSString *)replacedString;97 - (NSString *)contextMenuItemTagInspectElement;98 #endif // ENABLE(CONTEXT_MENUS)99 100 - (NSString *)searchMenuNoRecentSearchesText;101 - (NSString *)searchMenuRecentSearchesText;102 - (NSString *)searchMenuClearRecentSearchesText;103 104 31 - (NSString *)defaultLanguageCode; 105 106 - (NSString *)imageTitleForFilename:(NSString *)filename width:(int)width height:(int)height;107 32 108 33 - (BOOL)objectIsTextMarker:(id)object; … … 122 47 - (void)unregisterUniqueIdForUIElement:(id)element; 123 48 124 - (NSString *)AXWebAreaText;125 - (NSString *)AXLinkText;126 - (NSString *)AXListMarkerText;127 - (NSString *)AXImageMapText;128 - (NSString *)AXHeadingText;129 - (NSString *)AXDefinitionListTermText;130 - (NSString *)AXDefinitionListDefinitionText;131 - (NSString *)AXARIAContentGroupText:(NSString *)ariaType;132 133 - (NSString *)AXButtonActionVerb;134 - (NSString *)AXRadioButtonActionVerb;135 - (NSString *)AXTextFieldActionVerb;136 - (NSString *)AXCheckedCheckBoxActionVerb;137 - (NSString *)AXUncheckedCheckBoxActionVerb;138 - (NSString *)AXLinkActionVerb;139 - (NSString *)AXMenuListPopupActionVerb;140 - (NSString *)AXMenuListActionVerb;141 142 - (NSString *)missingPluginText;143 - (NSString *)crashedPluginText;144 145 - (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles;146 // FTP Directory Related147 - (NSString *)unknownFileSizeText;148 149 - (NSString *)mediaElementLoadingStateText;150 - (NSString *)mediaElementLiveBroadcastStateText;151 - (NSString*)localizedMediaControlElementString:(NSString*)name;152 - (NSString*)localizedMediaControlElementHelpText:(NSString*)name;153 - (NSString*)localizedMediaTimeDescription:(float)time;154 155 - (NSString *)validationMessageValueMissingText;156 - (NSString *)validationMessageTypeMismatchText;157 - (NSString *)validationMessagePatternMismatchText;158 - (NSString *)validationMessageTooLongText;159 - (NSString *)validationMessageRangeUnderflowText;160 - (NSString *)validationMessageRangeOverflowText;161 - (NSString *)validationMessageStepMismatchText;162 163 49 @end 164 50 -
trunk/WebCore/platform/PlatformStrategies.h
r61438 r63904 32 32 33 33 class PluginStrategy; 34 class LocalizationStrategy; 34 35 35 36 class PlatformStrategies { … … 39 40 if (!m_pluginStrategy) 40 41 m_pluginStrategy = createPluginStrategy(); 42 return m_pluginStrategy; 43 } 41 44 42 return m_pluginStrategy; 45 LocalizationStrategy* localizationStrategy() 46 { 47 if (!m_localizationStrategy) 48 m_localizationStrategy = createLocalizationStrategy(); 49 return m_localizationStrategy; 43 50 } 44 51 … … 48 55 { 49 56 } 50 virtual ~PlatformStrategies() { }51 57 52 private: 58 virtual ~PlatformStrategies() 59 { 60 } 61 62 private: 53 63 virtual PluginStrategy* createPluginStrategy() = 0; 64 virtual LocalizationStrategy* createLocalizationStrategy() = 0; 54 65 55 66 PluginStrategy* m_pluginStrategy; 67 LocalizationStrategy* m_localizationStrategy; 56 68 }; 57 69 -
trunk/WebCore/platform/mac/LocalizedStringsMac.mm
r57095 r63904 1 1 /* 2 * Copyright (C) 2003, 2006, 2009 Apple Computer, Inc.All rights reserved.2 * Copyright (C) 2003, 2006, 2009, 2010 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 27 27 #import "LocalizedStrings.h" 28 28 29 #import "BlockExceptions.h"30 29 #import "IntSize.h" 30 #import "LocalizationStrategy.h" 31 #import "PlatformStrategies.h" 31 32 #import "PlatformString.h" 32 #import "WebCoreViewFactory.h"33 33 34 34 namespace WebCore { … … 36 36 String inputElementAltText() 37 37 { 38 BEGIN_BLOCK_OBJC_EXCEPTIONS; 39 return [[WebCoreViewFactory sharedFactory] inputElementAltText]; 40 END_BLOCK_OBJC_EXCEPTIONS; 41 return String(); 38 return platformStrategies()->localizationStrategy()->inputElementAltText(); 42 39 } 43 40 44 41 String resetButtonDefaultLabel() 45 42 { 46 BEGIN_BLOCK_OBJC_EXCEPTIONS; 47 return [[WebCoreViewFactory sharedFactory] resetButtonDefaultLabel]; 48 END_BLOCK_OBJC_EXCEPTIONS; 49 return String(); 43 return platformStrategies()->localizationStrategy()->resetButtonDefaultLabel(); 50 44 } 51 45 52 46 String searchableIndexIntroduction() 53 47 { 54 BEGIN_BLOCK_OBJC_EXCEPTIONS; 55 return [[WebCoreViewFactory sharedFactory] searchableIndexIntroduction]; 56 END_BLOCK_OBJC_EXCEPTIONS; 57 return String(); 48 return platformStrategies()->localizationStrategy()->searchableIndexIntroduction(); 58 49 } 59 50 60 51 String submitButtonDefaultLabel() 61 52 { 62 BEGIN_BLOCK_OBJC_EXCEPTIONS; 63 return [[WebCoreViewFactory sharedFactory] submitButtonDefaultLabel]; 64 END_BLOCK_OBJC_EXCEPTIONS; 65 return String(); 53 return platformStrategies()->localizationStrategy()->submitButtonDefaultLabel(); 66 54 } 67 55 68 56 String fileButtonChooseFileLabel() 69 57 { 70 BEGIN_BLOCK_OBJC_EXCEPTIONS; 71 return [[WebCoreViewFactory sharedFactory] fileButtonChooseFileLabel]; 72 END_BLOCK_OBJC_EXCEPTIONS; 73 return String(); 58 return platformStrategies()->localizationStrategy()->fileButtonChooseFileLabel(); 74 59 } 75 60 76 61 String fileButtonNoFileSelectedLabel() 77 62 { 78 BEGIN_BLOCK_OBJC_EXCEPTIONS; 79 return [[WebCoreViewFactory sharedFactory] fileButtonNoFileSelectedLabel]; 80 END_BLOCK_OBJC_EXCEPTIONS; 81 return String(); 63 return platformStrategies()->localizationStrategy()->fileButtonNoFileSelectedLabel(); 82 64 } 83 65 84 66 String copyImageUnknownFileLabel() 85 67 { 86 BEGIN_BLOCK_OBJC_EXCEPTIONS; 87 return [[WebCoreViewFactory sharedFactory] copyImageUnknownFileLabel]; 88 END_BLOCK_OBJC_EXCEPTIONS; 89 return String(); 68 return platformStrategies()->localizationStrategy()->copyImageUnknownFileLabel(); 90 69 } 91 70 … … 93 72 String contextMenuItemTagOpenLinkInNewWindow() 94 73 { 95 BEGIN_BLOCK_OBJC_EXCEPTIONS; 96 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagOpenLinkInNewWindow]; 97 END_BLOCK_OBJC_EXCEPTIONS; 98 return String(); 74 return platformStrategies()->localizationStrategy()->contextMenuItemTagOpenLinkInNewWindow(); 99 75 } 100 76 101 77 String contextMenuItemTagDownloadLinkToDisk() 102 78 { 103 BEGIN_BLOCK_OBJC_EXCEPTIONS; 104 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagDownloadLinkToDisk]; 105 END_BLOCK_OBJC_EXCEPTIONS; 106 return String(); 79 return platformStrategies()->localizationStrategy()->contextMenuItemTagDownloadLinkToDisk(); 107 80 } 108 81 109 82 String contextMenuItemTagCopyLinkToClipboard() 110 83 { 111 BEGIN_BLOCK_OBJC_EXCEPTIONS; 112 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCopyLinkToClipboard]; 113 END_BLOCK_OBJC_EXCEPTIONS; 114 return String(); 84 return platformStrategies()->localizationStrategy()->contextMenuItemTagCopyLinkToClipboard(); 115 85 } 116 86 117 87 String contextMenuItemTagOpenImageInNewWindow() 118 88 { 119 BEGIN_BLOCK_OBJC_EXCEPTIONS; 120 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagOpenImageInNewWindow]; 121 END_BLOCK_OBJC_EXCEPTIONS; 122 return String(); 89 return platformStrategies()->localizationStrategy()->contextMenuItemTagOpenImageInNewWindow(); 123 90 } 124 91 125 92 String contextMenuItemTagDownloadImageToDisk() 126 93 { 127 BEGIN_BLOCK_OBJC_EXCEPTIONS; 128 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagDownloadImageToDisk]; 129 END_BLOCK_OBJC_EXCEPTIONS; 130 return String(); 94 return platformStrategies()->localizationStrategy()->contextMenuItemTagDownloadImageToDisk(); 131 95 } 132 96 133 97 String contextMenuItemTagCopyImageToClipboard() 134 98 { 135 BEGIN_BLOCK_OBJC_EXCEPTIONS; 136 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCopyImageToClipboard]; 137 END_BLOCK_OBJC_EXCEPTIONS; 138 return String(); 99 return platformStrategies()->localizationStrategy()->contextMenuItemTagCopyImageToClipboard(); 139 100 } 140 101 141 102 String contextMenuItemTagOpenFrameInNewWindow() 142 103 { 143 BEGIN_BLOCK_OBJC_EXCEPTIONS; 144 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagOpenFrameInNewWindow]; 145 END_BLOCK_OBJC_EXCEPTIONS; 146 return String(); 104 return platformStrategies()->localizationStrategy()->contextMenuItemTagOpenFrameInNewWindow(); 147 105 } 148 106 149 107 String contextMenuItemTagCopy() 150 108 { 151 BEGIN_BLOCK_OBJC_EXCEPTIONS; 152 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCopy]; 153 END_BLOCK_OBJC_EXCEPTIONS; 154 return String(); 109 return platformStrategies()->localizationStrategy()->contextMenuItemTagCopy(); 155 110 } 156 111 157 112 String contextMenuItemTagGoBack() 158 113 { 159 BEGIN_BLOCK_OBJC_EXCEPTIONS; 160 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagGoBack]; 161 END_BLOCK_OBJC_EXCEPTIONS; 162 return String(); 114 return platformStrategies()->localizationStrategy()->contextMenuItemTagGoBack(); 163 115 } 164 116 165 117 String contextMenuItemTagGoForward() 166 118 { 167 BEGIN_BLOCK_OBJC_EXCEPTIONS; 168 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagGoForward]; 169 END_BLOCK_OBJC_EXCEPTIONS; 170 return String(); 119 return platformStrategies()->localizationStrategy()->contextMenuItemTagGoForward(); 171 120 } 172 121 173 122 String contextMenuItemTagStop() 174 123 { 175 BEGIN_BLOCK_OBJC_EXCEPTIONS; 176 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagStop]; 177 END_BLOCK_OBJC_EXCEPTIONS; 178 return String(); 124 return platformStrategies()->localizationStrategy()->contextMenuItemTagStop(); 179 125 } 180 126 181 127 String contextMenuItemTagReload() 182 128 { 183 BEGIN_BLOCK_OBJC_EXCEPTIONS; 184 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagReload]; 185 END_BLOCK_OBJC_EXCEPTIONS; 186 return String(); 129 return platformStrategies()->localizationStrategy()->contextMenuItemTagReload(); 187 130 } 188 131 189 132 String contextMenuItemTagCut() 190 133 { 191 BEGIN_BLOCK_OBJC_EXCEPTIONS; 192 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCut]; 193 END_BLOCK_OBJC_EXCEPTIONS; 194 return String(); 134 return platformStrategies()->localizationStrategy()->contextMenuItemTagCut(); 195 135 } 196 136 197 137 String contextMenuItemTagPaste() 198 138 { 199 BEGIN_BLOCK_OBJC_EXCEPTIONS; 200 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagPaste]; 201 END_BLOCK_OBJC_EXCEPTIONS; 202 return String(); 139 return platformStrategies()->localizationStrategy()->contextMenuItemTagPaste(); 203 140 } 204 141 205 142 String contextMenuItemTagNoGuessesFound() 206 143 { 207 BEGIN_BLOCK_OBJC_EXCEPTIONS; 208 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagNoGuessesFound]; 209 END_BLOCK_OBJC_EXCEPTIONS; 210 return String(); 144 return platformStrategies()->localizationStrategy()->contextMenuItemTagNoGuessesFound(); 211 145 } 212 146 213 147 String contextMenuItemTagIgnoreSpelling() 214 148 { 215 BEGIN_BLOCK_OBJC_EXCEPTIONS; 216 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagIgnoreSpelling]; 217 END_BLOCK_OBJC_EXCEPTIONS; 218 return String(); 149 return platformStrategies()->localizationStrategy()->contextMenuItemTagIgnoreSpelling(); 219 150 } 220 151 221 152 String contextMenuItemTagLearnSpelling() 222 153 { 223 BEGIN_BLOCK_OBJC_EXCEPTIONS; 224 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagLearnSpelling]; 225 END_BLOCK_OBJC_EXCEPTIONS; 226 return String(); 154 return platformStrategies()->localizationStrategy()->contextMenuItemTagLearnSpelling(); 227 155 } 228 156 229 157 String contextMenuItemTagSearchInSpotlight() 230 158 { 231 BEGIN_BLOCK_OBJC_EXCEPTIONS; 232 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSearchInSpotlight]; 233 END_BLOCK_OBJC_EXCEPTIONS; 234 return String(); 159 return platformStrategies()->localizationStrategy()->contextMenuItemTagSearchInSpotlight(); 235 160 } 236 161 237 162 String contextMenuItemTagSearchWeb() 238 163 { 239 BEGIN_BLOCK_OBJC_EXCEPTIONS; 240 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSearchWeb]; 241 END_BLOCK_OBJC_EXCEPTIONS; 242 return String(); 164 return platformStrategies()->localizationStrategy()->contextMenuItemTagSearchWeb(); 243 165 } 244 166 245 167 String contextMenuItemTagLookUpInDictionary() 246 168 { 247 BEGIN_BLOCK_OBJC_EXCEPTIONS; 248 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagLookUpInDictionary]; 249 END_BLOCK_OBJC_EXCEPTIONS; 250 return String(); 169 return platformStrategies()->localizationStrategy()->contextMenuItemTagLookUpInDictionary(); 251 170 } 252 171 253 172 String contextMenuItemTagOpenLink() 254 173 { 255 BEGIN_BLOCK_OBJC_EXCEPTIONS; 256 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagOpenLink]; 257 END_BLOCK_OBJC_EXCEPTIONS; 258 return String(); 174 return platformStrategies()->localizationStrategy()->contextMenuItemTagOpenLink(); 259 175 } 260 176 261 177 String contextMenuItemTagIgnoreGrammar() 262 178 { 263 BEGIN_BLOCK_OBJC_EXCEPTIONS; 264 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagIgnoreGrammar]; 265 END_BLOCK_OBJC_EXCEPTIONS; 266 return String(); 179 return platformStrategies()->localizationStrategy()->contextMenuItemTagIgnoreGrammar(); 267 180 } 268 181 269 182 String contextMenuItemTagSpellingMenu() 270 183 { 271 BEGIN_BLOCK_OBJC_EXCEPTIONS; 272 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSpellingMenu]; 273 END_BLOCK_OBJC_EXCEPTIONS; 274 return String(); 184 return platformStrategies()->localizationStrategy()->contextMenuItemTagSpellingMenu(); 275 185 } 276 186 277 187 String contextMenuItemTagShowSpellingPanel(bool show) 278 188 { 279 BEGIN_BLOCK_OBJC_EXCEPTIONS; 280 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:show]; 281 END_BLOCK_OBJC_EXCEPTIONS; 282 return String(); 189 return platformStrategies()->localizationStrategy()->contextMenuItemTagShowSpellingPanel(show); 283 190 } 284 191 285 192 String contextMenuItemTagCheckSpelling() 286 193 { 287 BEGIN_BLOCK_OBJC_EXCEPTIONS; 288 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCheckSpelling]; 289 END_BLOCK_OBJC_EXCEPTIONS; 290 return String(); 194 return platformStrategies()->localizationStrategy()->contextMenuItemTagCheckSpelling(); 291 195 } 292 196 293 197 String contextMenuItemTagCheckSpellingWhileTyping() 294 198 { 295 BEGIN_BLOCK_OBJC_EXCEPTIONS; 296 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCheckSpellingWhileTyping]; 297 END_BLOCK_OBJC_EXCEPTIONS; 298 return String(); 199 return platformStrategies()->localizationStrategy()->contextMenuItemTagCheckSpellingWhileTyping(); 299 200 } 300 201 301 202 String contextMenuItemTagCheckGrammarWithSpelling() 302 203 { 303 BEGIN_BLOCK_OBJC_EXCEPTIONS; 304 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCheckGrammarWithSpelling]; 305 END_BLOCK_OBJC_EXCEPTIONS; 306 return String(); 204 return platformStrategies()->localizationStrategy()->contextMenuItemTagCheckGrammarWithSpelling(); 307 205 } 308 206 309 207 String contextMenuItemTagFontMenu() 310 208 { 311 BEGIN_BLOCK_OBJC_EXCEPTIONS; 312 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagFontMenu]; 313 END_BLOCK_OBJC_EXCEPTIONS; 314 return String(); 209 return platformStrategies()->localizationStrategy()->contextMenuItemTagFontMenu(); 315 210 } 316 211 317 212 String contextMenuItemTagShowFonts() 318 213 { 319 BEGIN_BLOCK_OBJC_EXCEPTIONS; 320 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagShowFonts]; 321 END_BLOCK_OBJC_EXCEPTIONS; 322 return String(); 214 return platformStrategies()->localizationStrategy()->contextMenuItemTagShowFonts(); 323 215 } 324 216 325 217 String contextMenuItemTagBold() 326 218 { 327 BEGIN_BLOCK_OBJC_EXCEPTIONS; 328 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagBold]; 329 END_BLOCK_OBJC_EXCEPTIONS; 330 return String(); 219 return platformStrategies()->localizationStrategy()->contextMenuItemTagBold(); 331 220 } 332 221 333 222 String contextMenuItemTagItalic() 334 223 { 335 BEGIN_BLOCK_OBJC_EXCEPTIONS; 336 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagItalic]; 337 END_BLOCK_OBJC_EXCEPTIONS; 338 return String(); 224 return platformStrategies()->localizationStrategy()->contextMenuItemTagItalic(); 339 225 } 340 226 341 227 String contextMenuItemTagUnderline() 342 228 { 343 BEGIN_BLOCK_OBJC_EXCEPTIONS; 344 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagUnderline]; 345 END_BLOCK_OBJC_EXCEPTIONS; 346 return String(); 229 return platformStrategies()->localizationStrategy()->contextMenuItemTagUnderline(); 347 230 } 348 231 349 232 String contextMenuItemTagOutline() 350 233 { 351 BEGIN_BLOCK_OBJC_EXCEPTIONS; 352 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagOutline]; 353 END_BLOCK_OBJC_EXCEPTIONS; 354 return String(); 234 return platformStrategies()->localizationStrategy()->contextMenuItemTagOutline(); 355 235 } 356 236 357 237 String contextMenuItemTagStyles() 358 238 { 359 BEGIN_BLOCK_OBJC_EXCEPTIONS; 360 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagStyles]; 361 END_BLOCK_OBJC_EXCEPTIONS; 362 return String(); 239 return platformStrategies()->localizationStrategy()->contextMenuItemTagStyles(); 363 240 } 364 241 365 242 String contextMenuItemTagShowColors() 366 243 { 367 BEGIN_BLOCK_OBJC_EXCEPTIONS; 368 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagShowColors]; 369 END_BLOCK_OBJC_EXCEPTIONS; 370 return String(); 244 return platformStrategies()->localizationStrategy()->contextMenuItemTagShowColors(); 371 245 } 372 246 373 247 String contextMenuItemTagSpeechMenu() 374 248 { 375 BEGIN_BLOCK_OBJC_EXCEPTIONS; 376 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSpeechMenu]; 377 END_BLOCK_OBJC_EXCEPTIONS; 378 return String(); 249 return platformStrategies()->localizationStrategy()->contextMenuItemTagSpeechMenu(); 379 250 } 380 251 381 252 String contextMenuItemTagStartSpeaking() 382 253 { 383 BEGIN_BLOCK_OBJC_EXCEPTIONS; 384 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagStartSpeaking]; 385 END_BLOCK_OBJC_EXCEPTIONS; 386 return String(); 254 return platformStrategies()->localizationStrategy()->contextMenuItemTagStartSpeaking(); 387 255 } 388 256 389 257 String contextMenuItemTagStopSpeaking() 390 258 { 391 BEGIN_BLOCK_OBJC_EXCEPTIONS; 392 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagStopSpeaking]; 393 END_BLOCK_OBJC_EXCEPTIONS; 394 return String(); 259 return platformStrategies()->localizationStrategy()->contextMenuItemTagStopSpeaking(); 395 260 } 396 261 397 262 String contextMenuItemTagWritingDirectionMenu() 398 263 { 399 BEGIN_BLOCK_OBJC_EXCEPTIONS; 400 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagWritingDirectionMenu]; 401 END_BLOCK_OBJC_EXCEPTIONS; 402 return String(); 264 return platformStrategies()->localizationStrategy()->contextMenuItemTagWritingDirectionMenu(); 403 265 } 404 266 405 267 String contextMenuItemTagTextDirectionMenu() 406 268 { 407 BEGIN_BLOCK_OBJC_EXCEPTIONS; 408 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagTextDirectionMenu]; 409 END_BLOCK_OBJC_EXCEPTIONS; 410 return String(); 269 return platformStrategies()->localizationStrategy()->contextMenuItemTagTextDirectionMenu(); 411 270 } 412 271 413 272 String contextMenuItemTagDefaultDirection() 414 273 { 415 BEGIN_BLOCK_OBJC_EXCEPTIONS; 416 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagDefaultDirection]; 417 END_BLOCK_OBJC_EXCEPTIONS; 418 return String(); 274 return platformStrategies()->localizationStrategy()->contextMenuItemTagDefaultDirection(); 419 275 } 420 276 421 277 String contextMenuItemTagLeftToRight() 422 278 { 423 BEGIN_BLOCK_OBJC_EXCEPTIONS; 424 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagLeftToRight]; 425 END_BLOCK_OBJC_EXCEPTIONS; 426 return String(); 279 return platformStrategies()->localizationStrategy()->contextMenuItemTagLeftToRight(); 427 280 } 428 281 429 282 String contextMenuItemTagRightToLeft() 430 283 { 431 BEGIN_BLOCK_OBJC_EXCEPTIONS; 432 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagRightToLeft]; 433 END_BLOCK_OBJC_EXCEPTIONS; 434 return String(); 284 return platformStrategies()->localizationStrategy()->contextMenuItemTagRightToLeft(); 435 285 } 436 286 437 287 String contextMenuItemTagCorrectSpellingAutomatically() 438 288 { 439 BEGIN_BLOCK_OBJC_EXCEPTIONS; 440 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]; 441 END_BLOCK_OBJC_EXCEPTIONS; 442 return String(); 289 return platformStrategies()->localizationStrategy()->contextMenuItemTagCorrectSpellingAutomatically(); 443 290 } 444 291 445 292 String contextMenuItemTagSubstitutionsMenu() 446 293 { 447 BEGIN_BLOCK_OBJC_EXCEPTIONS; 448 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]; 449 END_BLOCK_OBJC_EXCEPTIONS; 450 return String(); 294 return platformStrategies()->localizationStrategy()->contextMenuItemTagSubstitutionsMenu(); 451 295 } 452 296 453 297 String contextMenuItemTagShowSubstitutions(bool show) 454 298 { 455 BEGIN_BLOCK_OBJC_EXCEPTIONS; 456 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:show]; 457 END_BLOCK_OBJC_EXCEPTIONS; 458 return String(); 299 return platformStrategies()->localizationStrategy()->contextMenuItemTagShowSubstitutions(show); 459 300 } 460 301 461 302 String contextMenuItemTagSmartCopyPaste() 462 303 { 463 BEGIN_BLOCK_OBJC_EXCEPTIONS; 464 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSmartCopyPaste]; 465 END_BLOCK_OBJC_EXCEPTIONS; 466 return String(); 304 return platformStrategies()->localizationStrategy()->contextMenuItemTagSmartCopyPaste(); 467 305 } 468 306 469 307 String contextMenuItemTagSmartQuotes() 470 308 { 471 BEGIN_BLOCK_OBJC_EXCEPTIONS; 472 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSmartQuotes]; 473 END_BLOCK_OBJC_EXCEPTIONS; 474 return String(); 309 return platformStrategies()->localizationStrategy()->contextMenuItemTagSmartQuotes(); 475 310 } 476 311 477 312 String contextMenuItemTagSmartDashes() 478 313 { 479 BEGIN_BLOCK_OBJC_EXCEPTIONS; 480 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSmartDashes]; 481 END_BLOCK_OBJC_EXCEPTIONS; 482 return String(); 314 return platformStrategies()->localizationStrategy()->contextMenuItemTagSmartDashes(); 483 315 } 484 316 485 317 String contextMenuItemTagSmartLinks() 486 318 { 487 BEGIN_BLOCK_OBJC_EXCEPTIONS; 488 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagSmartLinks]; 489 END_BLOCK_OBJC_EXCEPTIONS; 490 return String(); 319 return platformStrategies()->localizationStrategy()->contextMenuItemTagSmartLinks(); 491 320 } 492 321 493 322 String contextMenuItemTagTextReplacement() 494 323 { 495 BEGIN_BLOCK_OBJC_EXCEPTIONS; 496 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagTextReplacement]; 497 END_BLOCK_OBJC_EXCEPTIONS; 498 return String(); 324 return platformStrategies()->localizationStrategy()->contextMenuItemTagTextReplacement(); 499 325 } 500 326 501 327 String contextMenuItemTagTransformationsMenu() 502 328 { 503 BEGIN_BLOCK_OBJC_EXCEPTIONS; 504 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagTransformationsMenu]; 505 END_BLOCK_OBJC_EXCEPTIONS; 506 return String(); 329 return platformStrategies()->localizationStrategy()->contextMenuItemTagTransformationsMenu(); 507 330 } 508 331 509 332 String contextMenuItemTagMakeUpperCase() 510 333 { 511 BEGIN_BLOCK_OBJC_EXCEPTIONS; 512 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagMakeUpperCase]; 513 END_BLOCK_OBJC_EXCEPTIONS; 514 return String(); 334 return platformStrategies()->localizationStrategy()->contextMenuItemTagMakeUpperCase(); 515 335 } 516 336 517 337 String contextMenuItemTagMakeLowerCase() 518 338 { 519 BEGIN_BLOCK_OBJC_EXCEPTIONS; 520 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagMakeLowerCase]; 521 END_BLOCK_OBJC_EXCEPTIONS; 522 return String(); 339 return platformStrategies()->localizationStrategy()->contextMenuItemTagMakeLowerCase(); 523 340 } 524 341 525 342 String contextMenuItemTagCapitalize() 526 343 { 527 BEGIN_BLOCK_OBJC_EXCEPTIONS; 528 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagCapitalize]; 529 END_BLOCK_OBJC_EXCEPTIONS; 530 return String(); 344 return platformStrategies()->localizationStrategy()->contextMenuItemTagCapitalize(); 531 345 } 532 346 533 347 String contextMenuItemTagChangeBack(const String& replacedString) 534 348 { 535 BEGIN_BLOCK_OBJC_EXCEPTIONS; 536 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagChangeBack:replacedString]; 537 END_BLOCK_OBJC_EXCEPTIONS; 538 return replacedString; 349 return platformStrategies()->localizationStrategy()->contextMenuItemTagChangeBack(replacedString); 539 350 } 540 351 541 352 String contextMenuItemTagInspectElement() 542 353 { 543 BEGIN_BLOCK_OBJC_EXCEPTIONS; 544 return [[WebCoreViewFactory sharedFactory] contextMenuItemTagInspectElement]; 545 END_BLOCK_OBJC_EXCEPTIONS; 546 return String(); 547 } 354 return platformStrategies()->localizationStrategy()->contextMenuItemTagInspectElement(); 355 } 356 548 357 #endif // ENABLE(CONTEXT_MENUS) 549 358 550 359 String searchMenuNoRecentSearchesText() 551 360 { 552 BEGIN_BLOCK_OBJC_EXCEPTIONS; 553 return [[WebCoreViewFactory sharedFactory] searchMenuNoRecentSearchesText]; 554 END_BLOCK_OBJC_EXCEPTIONS; 555 return String(); 361 return platformStrategies()->localizationStrategy()->searchMenuNoRecentSearchesText(); 556 362 } 557 363 558 364 String searchMenuRecentSearchesText () 559 365 { 560 BEGIN_BLOCK_OBJC_EXCEPTIONS; 561 return [[WebCoreViewFactory sharedFactory] searchMenuRecentSearchesText]; 562 END_BLOCK_OBJC_EXCEPTIONS; 563 return String(); 366 return platformStrategies()->localizationStrategy()->searchMenuRecentSearchesText (); 564 367 } 565 368 566 369 String searchMenuClearRecentSearchesText() 567 370 { 568 BEGIN_BLOCK_OBJC_EXCEPTIONS; 569 return [[WebCoreViewFactory sharedFactory] searchMenuClearRecentSearchesText]; 570 END_BLOCK_OBJC_EXCEPTIONS; 571 return String(); 371 return platformStrategies()->localizationStrategy()->searchMenuClearRecentSearchesText(); 572 372 } 573 373 574 374 String AXWebAreaText() 575 375 { 576 BEGIN_BLOCK_OBJC_EXCEPTIONS; 577 return [[WebCoreViewFactory sharedFactory] AXWebAreaText]; 578 END_BLOCK_OBJC_EXCEPTIONS; 579 return String(); 376 return platformStrategies()->localizationStrategy()->AXWebAreaText(); 580 377 } 581 378 582 379 String AXLinkText() 583 380 { 584 BEGIN_BLOCK_OBJC_EXCEPTIONS; 585 return [[WebCoreViewFactory sharedFactory] AXLinkText]; 586 END_BLOCK_OBJC_EXCEPTIONS; 587 return String(); 381 return platformStrategies()->localizationStrategy()->AXLinkText(); 588 382 } 589 383 590 384 String AXListMarkerText() 591 385 { 592 BEGIN_BLOCK_OBJC_EXCEPTIONS; 593 return [[WebCoreViewFactory sharedFactory] AXListMarkerText]; 594 END_BLOCK_OBJC_EXCEPTIONS; 595 return String(); 386 return platformStrategies()->localizationStrategy()->AXListMarkerText(); 596 387 } 597 388 598 389 String AXImageMapText() 599 390 { 600 BEGIN_BLOCK_OBJC_EXCEPTIONS; 601 return [[WebCoreViewFactory sharedFactory] AXImageMapText]; 602 END_BLOCK_OBJC_EXCEPTIONS; 603 return String(); 391 return platformStrategies()->localizationStrategy()->AXImageMapText(); 604 392 } 605 393 606 394 String AXHeadingText() 607 395 { 608 BEGIN_BLOCK_OBJC_EXCEPTIONS; 609 return [[WebCoreViewFactory sharedFactory] AXHeadingText]; 610 END_BLOCK_OBJC_EXCEPTIONS; 611 return String(); 396 return platformStrategies()->localizationStrategy()->AXHeadingText(); 612 397 } 613 398 614 399 String AXDefinitionListTermText() 615 400 { 616 BEGIN_BLOCK_OBJC_EXCEPTIONS; 617 return [[WebCoreViewFactory sharedFactory] AXDefinitionListTermText]; 618 END_BLOCK_OBJC_EXCEPTIONS; 619 return String(); 620 } 621 401 return platformStrategies()->localizationStrategy()->AXDefinitionListTermText(); 402 } 403 622 404 String AXDefinitionListDefinitionText() 623 405 { 624 BEGIN_BLOCK_OBJC_EXCEPTIONS; 625 return [[WebCoreViewFactory sharedFactory] AXDefinitionListDefinitionText]; 626 END_BLOCK_OBJC_EXCEPTIONS; 627 return String(); 628 } 629 406 return platformStrategies()->localizationStrategy()->AXDefinitionListDefinitionText(); 407 } 408 630 409 String AXARIAContentGroupText(const String& ariaType) 631 410 { 632 BEGIN_BLOCK_OBJC_EXCEPTIONS; 633 return [[WebCoreViewFactory sharedFactory] AXARIAContentGroupText:ariaType]; 634 END_BLOCK_OBJC_EXCEPTIONS; 635 return String(); 411 return platformStrategies()->localizationStrategy()->AXARIAContentGroupText(ariaType); 636 412 } 637 413 638 414 String AXButtonActionVerb() 639 415 { 640 BEGIN_BLOCK_OBJC_EXCEPTIONS; 641 return [[WebCoreViewFactory sharedFactory] AXButtonActionVerb]; 642 END_BLOCK_OBJC_EXCEPTIONS; 643 return String(); 416 return platformStrategies()->localizationStrategy()->AXButtonActionVerb(); 644 417 } 645 418 646 419 String AXRadioButtonActionVerb() 647 420 { 648 BEGIN_BLOCK_OBJC_EXCEPTIONS; 649 return [[WebCoreViewFactory sharedFactory] AXRadioButtonActionVerb]; 650 END_BLOCK_OBJC_EXCEPTIONS; 651 return String(); 421 return platformStrategies()->localizationStrategy()->AXRadioButtonActionVerb(); 652 422 } 653 423 654 424 String AXTextFieldActionVerb() 655 425 { 656 BEGIN_BLOCK_OBJC_EXCEPTIONS; 657 return [[WebCoreViewFactory sharedFactory] AXTextFieldActionVerb]; 658 END_BLOCK_OBJC_EXCEPTIONS; 659 return String(); 426 return platformStrategies()->localizationStrategy()->AXTextFieldActionVerb(); 660 427 } 661 428 662 429 String AXCheckedCheckBoxActionVerb() 663 430 { 664 BEGIN_BLOCK_OBJC_EXCEPTIONS; 665 return [[WebCoreViewFactory sharedFactory] AXCheckedCheckBoxActionVerb]; 666 END_BLOCK_OBJC_EXCEPTIONS; 667 return String(); 431 return platformStrategies()->localizationStrategy()->AXCheckedCheckBoxActionVerb(); 668 432 } 669 433 670 434 String AXUncheckedCheckBoxActionVerb() 671 435 { 672 BEGIN_BLOCK_OBJC_EXCEPTIONS; 673 return [[WebCoreViewFactory sharedFactory] AXUncheckedCheckBoxActionVerb]; 674 END_BLOCK_OBJC_EXCEPTIONS; 675 return String(); 436 return platformStrategies()->localizationStrategy()->AXUncheckedCheckBoxActionVerb(); 676 437 } 677 438 678 439 String AXLinkActionVerb() 679 440 { 680 BEGIN_BLOCK_OBJC_EXCEPTIONS; 681 return [[WebCoreViewFactory sharedFactory] AXLinkActionVerb]; 682 END_BLOCK_OBJC_EXCEPTIONS; 683 return String(); 441 return platformStrategies()->localizationStrategy()->AXLinkActionVerb(); 684 442 } 685 443 686 444 String AXMenuListPopupActionVerb() 687 445 { 688 BEGIN_BLOCK_OBJC_EXCEPTIONS; 689 return [[WebCoreViewFactory sharedFactory] AXMenuListPopupActionVerb]; 690 END_BLOCK_OBJC_EXCEPTIONS; 691 return String(); 446 return platformStrategies()->localizationStrategy()->AXMenuListPopupActionVerb(); 692 447 } 693 448 694 449 String AXMenuListActionVerb() 695 450 { 696 BEGIN_BLOCK_OBJC_EXCEPTIONS; 697 return [[WebCoreViewFactory sharedFactory] AXMenuListActionVerb]; 698 END_BLOCK_OBJC_EXCEPTIONS; 699 return String(); 451 return platformStrategies()->localizationStrategy()->AXMenuListActionVerb(); 700 452 } 701 453 702 454 String missingPluginText() 703 455 { 704 BEGIN_BLOCK_OBJC_EXCEPTIONS; 705 return [[WebCoreViewFactory sharedFactory] missingPluginText]; 706 END_BLOCK_OBJC_EXCEPTIONS; 707 return String(); 456 return platformStrategies()->localizationStrategy()->missingPluginText(); 708 457 } 709 458 710 459 String crashedPluginText() 711 460 { 712 BEGIN_BLOCK_OBJC_EXCEPTIONS; 713 return [[WebCoreViewFactory sharedFactory] crashedPluginText]; 714 END_BLOCK_OBJC_EXCEPTIONS; 715 return String(); 461 return platformStrategies()->localizationStrategy()->crashedPluginText(); 716 462 } 717 463 718 464 String multipleFileUploadText(unsigned numberOfFiles) 719 465 { 720 BEGIN_BLOCK_OBJC_EXCEPTIONS; 721 return [[WebCoreViewFactory sharedFactory] multipleFileUploadTextForNumberOfFiles:numberOfFiles]; 722 END_BLOCK_OBJC_EXCEPTIONS; 723 return String(); 466 return platformStrategies()->localizationStrategy()->multipleFileUploadText(numberOfFiles); 724 467 } 725 468 726 469 String unknownFileSizeText() 727 470 { 728 BEGIN_BLOCK_OBJC_EXCEPTIONS; 729 return [[WebCoreViewFactory sharedFactory] unknownFileSizeText]; 730 END_BLOCK_OBJC_EXCEPTIONS; 731 return String(); 471 return platformStrategies()->localizationStrategy()->unknownFileSizeText(); 732 472 } 733 473 734 474 String imageTitle(const String& filename, const IntSize& size) 735 475 { 736 BEGIN_BLOCK_OBJC_EXCEPTIONS; 737 return [[WebCoreViewFactory sharedFactory] imageTitleForFilename:filename width:size.width() height:size.height()]; 738 END_BLOCK_OBJC_EXCEPTIONS; 739 return String(); 476 return platformStrategies()->localizationStrategy()->imageTitle(filename, size); 740 477 } 741 478 742 479 String mediaElementLoadingStateText() 743 480 { 744 BEGIN_BLOCK_OBJC_EXCEPTIONS; 745 return [[WebCoreViewFactory sharedFactory] mediaElementLoadingStateText]; 746 END_BLOCK_OBJC_EXCEPTIONS; 747 return String(); 481 return platformStrategies()->localizationStrategy()->mediaElementLoadingStateText(); 748 482 } 749 483 750 484 String mediaElementLiveBroadcastStateText() 751 485 { 752 BEGIN_BLOCK_OBJC_EXCEPTIONS; 753 return [[WebCoreViewFactory sharedFactory] mediaElementLiveBroadcastStateText]; 754 END_BLOCK_OBJC_EXCEPTIONS; 755 return String(); 486 return platformStrategies()->localizationStrategy()->mediaElementLiveBroadcastStateText(); 756 487 } 757 488 758 489 String localizedMediaControlElementString(const String& controlName) 759 490 { 760 BEGIN_BLOCK_OBJC_EXCEPTIONS; 761 return [[WebCoreViewFactory sharedFactory] localizedMediaControlElementString:controlName]; 762 END_BLOCK_OBJC_EXCEPTIONS; 763 return String(); 491 return platformStrategies()->localizationStrategy()->localizedMediaControlElementString(controlName); 764 492 } 765 493 766 494 String localizedMediaControlElementHelpText(const String& controlName) 767 495 { 768 BEGIN_BLOCK_OBJC_EXCEPTIONS; 769 return [[WebCoreViewFactory sharedFactory] localizedMediaControlElementHelpText:controlName]; 770 END_BLOCK_OBJC_EXCEPTIONS; 771 return String(); 496 return platformStrategies()->localizationStrategy()->localizedMediaControlElementHelpText(controlName); 772 497 } 773 498 774 499 String localizedMediaTimeDescription(float time) 775 500 { 776 BEGIN_BLOCK_OBJC_EXCEPTIONS; 777 return [[WebCoreViewFactory sharedFactory] localizedMediaTimeDescription:time]; 778 END_BLOCK_OBJC_EXCEPTIONS; 779 return String(); 501 return platformStrategies()->localizationStrategy()->localizedMediaTimeDescription(time); 780 502 } 781 503 782 504 String validationMessageValueMissingText() 783 505 { 784 BEGIN_BLOCK_OBJC_EXCEPTIONS; 785 return [[WebCoreViewFactory sharedFactory] validationMessageValueMissingText]; 786 END_BLOCK_OBJC_EXCEPTIONS; 787 return String(); 506 return platformStrategies()->localizationStrategy()->validationMessageValueMissingText(); 788 507 } 789 508 790 509 String validationMessageTypeMismatchText() 791 510 { 792 BEGIN_BLOCK_OBJC_EXCEPTIONS; 793 return [[WebCoreViewFactory sharedFactory] validationMessageTypeMismatchText]; 794 END_BLOCK_OBJC_EXCEPTIONS; 795 return String(); 511 return platformStrategies()->localizationStrategy()->validationMessageTypeMismatchText(); 796 512 } 797 513 798 514 String validationMessagePatternMismatchText() 799 515 { 800 BEGIN_BLOCK_OBJC_EXCEPTIONS; 801 return [[WebCoreViewFactory sharedFactory] validationMessagePatternMismatchText]; 802 END_BLOCK_OBJC_EXCEPTIONS; 803 return String(); 516 return platformStrategies()->localizationStrategy()->validationMessagePatternMismatchText(); 804 517 } 805 518 806 519 String validationMessageTooLongText() 807 520 { 808 BEGIN_BLOCK_OBJC_EXCEPTIONS; 809 return [[WebCoreViewFactory sharedFactory] validationMessageTooLongText]; 810 END_BLOCK_OBJC_EXCEPTIONS; 811 return String(); 521 return platformStrategies()->localizationStrategy()->validationMessageTooLongText(); 812 522 } 813 523 814 524 String validationMessageRangeUnderflowText() 815 525 { 816 BEGIN_BLOCK_OBJC_EXCEPTIONS; 817 return [[WebCoreViewFactory sharedFactory] validationMessageRangeUnderflowText]; 818 END_BLOCK_OBJC_EXCEPTIONS; 819 return String(); 526 return platformStrategies()->localizationStrategy()->validationMessageRangeUnderflowText(); 820 527 } 821 528 822 529 String validationMessageRangeOverflowText() 823 530 { 824 BEGIN_BLOCK_OBJC_EXCEPTIONS; 825 return [[WebCoreViewFactory sharedFactory] validationMessageRangeOverflowText]; 826 END_BLOCK_OBJC_EXCEPTIONS; 827 return String(); 531 return platformStrategies()->localizationStrategy()->validationMessageRangeOverflowText(); 828 532 } 829 533 830 534 String validationMessageStepMismatchText() 831 535 { 832 BEGIN_BLOCK_OBJC_EXCEPTIONS; 833 return [[WebCoreViewFactory sharedFactory] validationMessageStepMismatchText]; 834 END_BLOCK_OBJC_EXCEPTIONS; 835 return String(); 836 } 837 838 } 536 return platformStrategies()->localizationStrategy()->validationMessageStepMismatchText(); 537 } 538 539 } // namespace WebCore -
trunk/WebKit/mac/ChangeLog
r63863 r63904 1 2010-07-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Patch for https://bugs.webkit.org/show_bug.cgi?id=42836 6 Add localized strings stubs for WebKit2. 7 8 - Convert WebKit (mac) to use a LocalizationStrategy rather than the WebCoreViewFactory 9 for localized strings. 10 11 Gets us below 200 tests failing in WebKitTestRunner. 12 13 * WebCoreSupport/WebContextMenuClient.mm: 14 (fixMenusReceivedFromOldClients): Use LocalizedStrings rather than the factory. 15 * WebCoreSupport/WebPlatformStrategies.h: 16 * WebCoreSupport/WebPlatformStrategies.mm: 17 * WebCoreSupport/WebViewFactory.mm: 18 1 19 2010-07-21 Brady Eidson <beidson@apple.com> 2 20 -
trunk/WebKit/mac/WebCoreSupport/WebContextMenuClient.mm
r60882 r63904 44 44 #import <WebCore/ContextMenu.h> 45 45 #import <WebCore/KURL.h> 46 #import <WebCore/LocalizedStrings.h> 46 47 #import <WebCore/RuntimeApplicationChecks.h> 47 48 #import <WebKit/DOMPrivate.h> … … 169 170 // Restore the specific tag for items on which we temporarily set WebMenuItemTagOther to match old behavior. 170 171 NSString *title = [item title]; 171 if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagOpenLink]])172 if ([title isEqualToString:contextMenuItemTagOpenLink()]) 172 173 modernTag = WebMenuItemTagOpenLink; 173 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagIgnoreGrammar]])174 else if ([title isEqualToString:contextMenuItemTagIgnoreGrammar()]) 174 175 modernTag = WebMenuItemTagIgnoreGrammar; 175 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSpellingMenu]])176 else if ([title isEqualToString:contextMenuItemTagSpellingMenu()]) 176 177 modernTag = WebMenuItemTagSpellingMenu; 177 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:true]]178 || [title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowSpellingPanel:false]])178 else if ([title isEqualToString:contextMenuItemTagShowSpellingPanel(true)] 179 || [title isEqualToString:contextMenuItemTagShowSpellingPanel(false)]) 179 180 modernTag = WebMenuItemTagShowSpellingPanel; 180 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagCheckSpelling]])181 else if ([title isEqualToString:contextMenuItemTagCheckSpelling()]) 181 182 modernTag = WebMenuItemTagCheckSpelling; 182 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagCheckSpellingWhileTyping]])183 else if ([title isEqualToString:contextMenuItemTagCheckSpellingWhileTyping()]) 183 184 modernTag = WebMenuItemTagCheckSpellingWhileTyping; 184 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagCheckGrammarWithSpelling]])185 else if ([title isEqualToString:contextMenuItemTagCheckGrammarWithSpelling()]) 185 186 modernTag = WebMenuItemTagCheckGrammarWithSpelling; 186 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagFontMenu]])187 else if ([title isEqualToString:contextMenuItemTagFontMenu()]) 187 188 modernTag = WebMenuItemTagFontMenu; 188 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowFonts]])189 else if ([title isEqualToString:contextMenuItemTagShowFonts()]) 189 190 modernTag = WebMenuItemTagShowFonts; 190 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagBold]])191 else if ([title isEqualToString:contextMenuItemTagBold()]) 191 192 modernTag = WebMenuItemTagBold; 192 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagItalic]])193 else if ([title isEqualToString:contextMenuItemTagItalic()]) 193 194 modernTag = WebMenuItemTagItalic; 194 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagUnderline]])195 else if ([title isEqualToString:contextMenuItemTagUnderline()]) 195 196 modernTag = WebMenuItemTagUnderline; 196 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagOutline]])197 else if ([title isEqualToString:contextMenuItemTagOutline()]) 197 198 modernTag = WebMenuItemTagOutline; 198 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagStyles]])199 else if ([title isEqualToString:contextMenuItemTagStyles()]) 199 200 modernTag = WebMenuItemTagStyles; 200 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowColors]])201 else if ([title isEqualToString:contextMenuItemTagShowColors()]) 201 202 modernTag = WebMenuItemTagShowColors; 202 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSpeechMenu]])203 else if ([title isEqualToString:contextMenuItemTagSpeechMenu()]) 203 204 modernTag = WebMenuItemTagSpeechMenu; 204 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagStartSpeaking]])205 else if ([title isEqualToString:contextMenuItemTagStartSpeaking()]) 205 206 modernTag = WebMenuItemTagStartSpeaking; 206 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagStopSpeaking]])207 else if ([title isEqualToString:contextMenuItemTagStopSpeaking()]) 207 208 modernTag = WebMenuItemTagStopSpeaking; 208 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagWritingDirectionMenu]])209 else if ([title isEqualToString:contextMenuItemTagWritingDirectionMenu()]) 209 210 modernTag = WebMenuItemTagWritingDirectionMenu; 210 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagDefaultDirection]])211 else if ([title isEqualToString:contextMenuItemTagDefaultDirection()]) 211 212 modernTag = WebMenuItemTagDefaultDirection; 212 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagLeftToRight]])213 else if ([title isEqualToString:contextMenuItemTagLeftToRight()]) 213 214 modernTag = WebMenuItemTagLeftToRight; 214 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagRightToLeft]])215 else if ([title isEqualToString:contextMenuItemTagRightToLeft()]) 215 216 modernTag = WebMenuItemTagRightToLeft; 216 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagInspectElement]])217 else if ([title isEqualToString:contextMenuItemTagInspectElement()]) 217 218 modernTag = WebMenuItemTagInspectElement; 218 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagCorrectSpellingAutomatically]])219 else if ([title isEqualToString:contextMenuItemTagCorrectSpellingAutomatically()]) 219 220 modernTag = WebMenuItemTagCorrectSpellingAutomatically; 220 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSubstitutionsMenu]])221 else if ([title isEqualToString:contextMenuItemTagSubstitutionsMenu()]) 221 222 modernTag = WebMenuItemTagSubstitutionsMenu; 222 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:true]]223 || [title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagShowSubstitutions:false]])223 else if ([title isEqualToString:contextMenuItemTagShowSubstitutions(true)] 224 || [title isEqualToString:contextMenuItemTagShowSubstitutions(false)]) 224 225 modernTag = WebMenuItemTagShowSubstitutions; 225 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSmartCopyPaste]])226 else if ([title isEqualToString:contextMenuItemTagSmartCopyPaste()]) 226 227 modernTag = WebMenuItemTagSmartCopyPaste; 227 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSmartQuotes]])228 else if ([title isEqualToString:contextMenuItemTagSmartQuotes()]) 228 229 modernTag = WebMenuItemTagSmartQuotes; 229 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSmartDashes]])230 else if ([title isEqualToString:contextMenuItemTagSmartDashes()]) 230 231 modernTag = WebMenuItemTagSmartDashes; 231 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagSmartLinks]])232 else if ([title isEqualToString:contextMenuItemTagSmartLinks()]) 232 233 modernTag = WebMenuItemTagSmartLinks; 233 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagTextReplacement]])234 else if ([title isEqualToString:contextMenuItemTagTextReplacement()]) 234 235 modernTag = WebMenuItemTagTextReplacement; 235 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagTransformationsMenu]])236 else if ([title isEqualToString:contextMenuItemTagTransformationsMenu()]) 236 237 modernTag = WebMenuItemTagTransformationsMenu; 237 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagMakeUpperCase]])238 else if ([title isEqualToString:contextMenuItemTagMakeUpperCase()]) 238 239 modernTag = WebMenuItemTagMakeUpperCase; 239 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagMakeLowerCase]])240 else if ([title isEqualToString:contextMenuItemTagMakeLowerCase()]) 240 241 modernTag = WebMenuItemTagMakeLowerCase; 241 else if ([title isEqualToString: [[WebViewFactory sharedFactory] contextMenuItemTagCapitalize]])242 else if ([title isEqualToString:contextMenuItemTagCapitalize()]) 242 243 modernTag = WebMenuItemTagCapitalize; 243 244 else { -
trunk/WebKit/mac/WebCoreSupport/WebPlatformStrategies.h
r61444 r63904 29 29 #include <WebCore/PlatformStrategies.h> 30 30 #include <WebCore/PluginStrategy.h> 31 #include <WebCore/LocalizationStrategy.h> 31 32 32 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy {33 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy { 33 34 public: 34 35 static void initialize(); … … 39 40 // WebCore::PlatformStrategies 40 41 virtual WebCore::PluginStrategy* createPluginStrategy(); 42 virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); 41 43 42 44 // WebCore::PluginStrategy 43 45 virtual void refreshPlugins(); 44 46 virtual void getPluginInfo(Vector<WebCore::PluginInfo>&); 47 48 // WebCore::LocalizationStrategy 49 virtual WebCore::String inputElementAltText(); 50 virtual WebCore::String resetButtonDefaultLabel(); 51 virtual WebCore::String searchableIndexIntroduction(); 52 virtual WebCore::String submitButtonDefaultLabel(); 53 virtual WebCore::String fileButtonChooseFileLabel(); 54 virtual WebCore::String fileButtonNoFileSelectedLabel(); 55 virtual WebCore::String copyImageUnknownFileLabel(); 56 #if ENABLE(CONTEXT_MENUS) 57 virtual WebCore::String contextMenuItemTagOpenLinkInNewWindow(); 58 virtual WebCore::String contextMenuItemTagDownloadLinkToDisk(); 59 virtual WebCore::String contextMenuItemTagCopyLinkToClipboard(); 60 virtual WebCore::String contextMenuItemTagOpenImageInNewWindow(); 61 virtual WebCore::String contextMenuItemTagDownloadImageToDisk(); 62 virtual WebCore::String contextMenuItemTagCopyImageToClipboard(); 63 virtual WebCore::String contextMenuItemTagOpenFrameInNewWindow(); 64 virtual WebCore::String contextMenuItemTagCopy(); 65 virtual WebCore::String contextMenuItemTagGoBack(); 66 virtual WebCore::String contextMenuItemTagGoForward(); 67 virtual WebCore::String contextMenuItemTagStop(); 68 virtual WebCore::String contextMenuItemTagReload(); 69 virtual WebCore::String contextMenuItemTagCut(); 70 virtual WebCore::String contextMenuItemTagPaste(); 71 virtual WebCore::String contextMenuItemTagNoGuessesFound(); 72 virtual WebCore::String contextMenuItemTagIgnoreSpelling(); 73 virtual WebCore::String contextMenuItemTagLearnSpelling(); 74 virtual WebCore::String contextMenuItemTagSearchWeb(); 75 virtual WebCore::String contextMenuItemTagLookUpInDictionary(); 76 virtual WebCore::String contextMenuItemTagOpenLink(); 77 virtual WebCore::String contextMenuItemTagIgnoreGrammar(); 78 virtual WebCore::String contextMenuItemTagSpellingMenu(); 79 virtual WebCore::String contextMenuItemTagShowSpellingPanel(bool show); 80 virtual WebCore::String contextMenuItemTagCheckSpelling(); 81 virtual WebCore::String contextMenuItemTagCheckSpellingWhileTyping(); 82 virtual WebCore::String contextMenuItemTagCheckGrammarWithSpelling(); 83 virtual WebCore::String contextMenuItemTagFontMenu(); 84 virtual WebCore::String contextMenuItemTagBold(); 85 virtual WebCore::String contextMenuItemTagItalic(); 86 virtual WebCore::String contextMenuItemTagUnderline(); 87 virtual WebCore::String contextMenuItemTagOutline(); 88 virtual WebCore::String contextMenuItemTagWritingDirectionMenu(); 89 virtual WebCore::String contextMenuItemTagTextDirectionMenu(); 90 virtual WebCore::String contextMenuItemTagDefaultDirection(); 91 virtual WebCore::String contextMenuItemTagLeftToRight(); 92 virtual WebCore::String contextMenuItemTagRightToLeft(); 93 virtual WebCore::String contextMenuItemTagSearchInSpotlight(); 94 virtual WebCore::String contextMenuItemTagShowFonts(); 95 virtual WebCore::String contextMenuItemTagStyles(); 96 virtual WebCore::String contextMenuItemTagShowColors(); 97 virtual WebCore::String contextMenuItemTagSpeechMenu(); 98 virtual WebCore::String contextMenuItemTagStartSpeaking(); 99 virtual WebCore::String contextMenuItemTagStopSpeaking(); 100 virtual WebCore::String contextMenuItemTagCorrectSpellingAutomatically(); 101 virtual WebCore::String contextMenuItemTagSubstitutionsMenu(); 102 virtual WebCore::String contextMenuItemTagShowSubstitutions(bool show); 103 virtual WebCore::String contextMenuItemTagSmartCopyPaste(); 104 virtual WebCore::String contextMenuItemTagSmartQuotes(); 105 virtual WebCore::String contextMenuItemTagSmartDashes(); 106 virtual WebCore::String contextMenuItemTagSmartLinks(); 107 virtual WebCore::String contextMenuItemTagTextReplacement(); 108 virtual WebCore::String contextMenuItemTagTransformationsMenu(); 109 virtual WebCore::String contextMenuItemTagMakeUpperCase(); 110 virtual WebCore::String contextMenuItemTagMakeLowerCase(); 111 virtual WebCore::String contextMenuItemTagCapitalize(); 112 virtual WebCore::String contextMenuItemTagChangeBack(const WebCore::String& replacedString); 113 virtual WebCore::String contextMenuItemTagInspectElement(); 114 #endif // ENABLE(CONTEXT_MENUS) 115 virtual WebCore::String searchMenuNoRecentSearchesText(); 116 virtual WebCore::String searchMenuRecentSearchesText(); 117 virtual WebCore::String searchMenuClearRecentSearchesText(); 118 virtual WebCore::String AXWebAreaText(); 119 virtual WebCore::String AXLinkText(); 120 virtual WebCore::String AXListMarkerText(); 121 virtual WebCore::String AXImageMapText(); 122 virtual WebCore::String AXHeadingText(); 123 virtual WebCore::String AXDefinitionListTermText(); 124 virtual WebCore::String AXDefinitionListDefinitionText(); 125 virtual WebCore::String AXARIAContentGroupText(const WebCore::String& ariaType); 126 virtual WebCore::String AXButtonActionVerb(); 127 virtual WebCore::String AXRadioButtonActionVerb(); 128 virtual WebCore::String AXTextFieldActionVerb(); 129 virtual WebCore::String AXCheckedCheckBoxActionVerb(); 130 virtual WebCore::String AXUncheckedCheckBoxActionVerb(); 131 virtual WebCore::String AXMenuListActionVerb(); 132 virtual WebCore::String AXMenuListPopupActionVerb(); 133 virtual WebCore::String AXLinkActionVerb(); 134 virtual WebCore::String missingPluginText(); 135 virtual WebCore::String crashedPluginText(); 136 virtual WebCore::String multipleFileUploadText(unsigned numberOfFiles); 137 virtual WebCore::String unknownFileSizeText(); 138 virtual WebCore::String imageTitle(const WebCore::String& filename, const WebCore::IntSize& size); 139 virtual WebCore::String mediaElementLoadingStateText(); 140 virtual WebCore::String mediaElementLiveBroadcastStateText(); 141 virtual WebCore::String localizedMediaControlElementString(const WebCore::String&); 142 virtual WebCore::String localizedMediaControlElementHelpText(const WebCore::String&); 143 virtual WebCore::String localizedMediaTimeDescription(float); 144 virtual WebCore::String validationMessageValueMissingText(); 145 virtual WebCore::String validationMessageTypeMismatchText(); 146 virtual WebCore::String validationMessagePatternMismatchText(); 147 virtual WebCore::String validationMessageTooLongText(); 148 virtual WebCore::String validationMessageRangeUnderflowText(); 149 virtual WebCore::String validationMessageRangeOverflowText(); 150 virtual WebCore::String validationMessageStepMismatchText(); 45 151 }; 46 152 -
trunk/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
r61581 r63904 26 26 #import "WebPlatformStrategies.h" 27 27 28 #import "WebLocalizableStrings.h" 28 29 #import "WebPluginDatabase.h" 29 30 #import "WebPluginPackage.h" 30 31 #import <WebCore/BlockExceptions.h> 32 #import <WebCore/IntSize.h> 31 33 #import <wtf/StdLibExtras.h> 32 34 … … 50 52 51 53 PluginStrategy* WebPlatformStrategies::createPluginStrategy() 54 { 55 return this; 56 } 57 58 LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() 52 59 { 53 60 return this; … … 73 80 } 74 81 75 82 // LocalizationStrategy 83 84 String WebPlatformStrategies::inputElementAltText() 85 { 86 return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value"); 87 } 88 89 String WebPlatformStrategies::resetButtonDefaultLabel() 90 { 91 return UI_STRING("Reset", "default label for Reset buttons in forms on web pages"); 92 } 93 94 String WebPlatformStrategies::searchableIndexIntroduction() 95 { 96 return UI_STRING("This is a searchable index. Enter search keywords: ", 97 "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); 98 } 99 100 String WebPlatformStrategies::submitButtonDefaultLabel() 101 { 102 return UI_STRING("Submit", "default label for Submit buttons in forms on web pages"); 103 } 104 105 String WebPlatformStrategies::fileButtonChooseFileLabel() 106 { 107 return UI_STRING("Choose File", "title for file button used in HTML forms"); 108 } 109 110 String WebPlatformStrategies::fileButtonNoFileSelectedLabel() 111 { 112 return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected"); 113 } 114 115 String WebPlatformStrategies::copyImageUnknownFileLabel() 116 { 117 return UI_STRING("unknown", "Unknown filename"); 118 } 119 120 #if ENABLE(CONTEXT_MENUS) 121 122 String WebPlatformStrategies::contextMenuItemTagOpenLinkInNewWindow() 123 { 124 return UI_STRING("Open Link in New Window", "Open in New Window context menu item"); 125 } 126 127 String WebPlatformStrategies::contextMenuItemTagDownloadLinkToDisk() 128 { 129 return UI_STRING("Download Linked File", "Download Linked File context menu item"); 130 } 131 132 String WebPlatformStrategies::contextMenuItemTagCopyLinkToClipboard() 133 { 134 return UI_STRING("Copy Link", "Copy Link context menu item"); 135 } 136 137 String WebPlatformStrategies::contextMenuItemTagOpenImageInNewWindow() 138 { 139 return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item"); 140 } 141 142 String WebPlatformStrategies::contextMenuItemTagDownloadImageToDisk() 143 { 144 return UI_STRING("Download Image", "Download Image context menu item"); 145 } 146 147 String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() 148 { 149 return UI_STRING("Copy Image", "Copy Image context menu item"); 150 } 151 152 String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() 153 { 154 return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); 155 } 156 157 String WebPlatformStrategies::contextMenuItemTagCopy() 158 { 159 return UI_STRING("Copy", "Copy context menu item"); 160 } 161 162 String WebPlatformStrategies::contextMenuItemTagGoBack() 163 { 164 return UI_STRING("Back", "Back context menu item"); 165 } 166 167 String WebPlatformStrategies::contextMenuItemTagGoForward() 168 { 169 return UI_STRING("Forward", "Forward context menu item"); 170 } 171 172 String WebPlatformStrategies::contextMenuItemTagStop() 173 { 174 return UI_STRING("Stop", "Stop context menu item"); 175 } 176 177 String WebPlatformStrategies::contextMenuItemTagReload() 178 { 179 return UI_STRING("Reload", "Reload context menu item"); 180 } 181 182 String WebPlatformStrategies::contextMenuItemTagCut() 183 { 184 return UI_STRING("Cut", "Cut context menu item"); 185 } 186 187 String WebPlatformStrategies::contextMenuItemTagPaste() 188 { 189 return UI_STRING("Paste", "Paste context menu item"); 190 } 191 192 String WebPlatformStrategies::contextMenuItemTagNoGuessesFound() 193 { 194 return UI_STRING("No Guesses Found", "No Guesses Found context menu item"); 195 } 196 197 String WebPlatformStrategies::contextMenuItemTagIgnoreSpelling() 198 { 199 return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item"); 200 } 201 202 String WebPlatformStrategies::contextMenuItemTagLearnSpelling() 203 { 204 return UI_STRING("Learn Spelling", "Learn Spelling context menu item"); 205 } 206 207 String WebPlatformStrategies::contextMenuItemTagSearchWeb() 208 { 209 return UI_STRING("Search in Google", "Search in Google context menu item"); 210 } 211 212 String WebPlatformStrategies::contextMenuItemTagLookUpInDictionary() 213 { 214 return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item"); 215 } 216 217 String WebPlatformStrategies::contextMenuItemTagOpenLink() 218 { 219 return UI_STRING("Open Link", "Open Link context menu item"); 220 } 221 222 String WebPlatformStrategies::contextMenuItemTagIgnoreGrammar() 223 { 224 return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item"); 225 } 226 227 String WebPlatformStrategies::contextMenuItemTagSpellingMenu() 228 { 229 #ifndef BUILDING_ON_TIGER 230 return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); 231 #else 232 return UI_STRING("Spelling", "Spelling context sub-menu item"); 233 #endif 234 } 235 236 String WebPlatformStrategies::contextMenuItemTagShowSpellingPanel(bool show) 237 { 238 #ifndef BUILDING_ON_TIGER 239 if (show) 240 return UI_STRING("Show Spelling and Grammar", "menu item title"); 241 return UI_STRING("Hide Spelling and Grammar", "menu item title"); 242 #else 243 return UI_STRING("Spelling...", "menu item title"); 244 #endif 245 } 246 247 String WebPlatformStrategies::contextMenuItemTagCheckSpelling() 248 { 249 #ifndef BUILDING_ON_TIGER 250 return UI_STRING("Check Document Now", "Check spelling context menu item"); 251 #else 252 return UI_STRING("Check Spelling", "Check spelling context menu item"); 253 #endif 254 } 255 256 String WebPlatformStrategies::contextMenuItemTagCheckSpellingWhileTyping() 257 { 258 #ifndef BUILDING_ON_TIGER 259 return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item"); 260 #else 261 return UI_STRING("Check Spelling as You Type", "Check spelling while typing context menu item"); 262 #endif 263 } 264 265 String WebPlatformStrategies::contextMenuItemTagCheckGrammarWithSpelling() 266 { 267 return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item"); 268 } 269 270 String WebPlatformStrategies::contextMenuItemTagFontMenu() 271 { 272 return UI_STRING("Font", "Font context sub-menu item"); 273 } 274 275 String WebPlatformStrategies::contextMenuItemTagBold() 276 { 277 return UI_STRING("Bold", "Bold context menu item"); 278 } 279 280 String WebPlatformStrategies::contextMenuItemTagItalic() 281 { 282 return UI_STRING("Italic", "Italic context menu item"); 283 } 284 285 String WebPlatformStrategies::contextMenuItemTagUnderline() 286 { 287 return UI_STRING("Underline", "Underline context menu item"); 288 } 289 290 String WebPlatformStrategies::contextMenuItemTagOutline() 291 { 292 return UI_STRING("Outline", "Outline context menu item"); 293 } 294 295 String WebPlatformStrategies::contextMenuItemTagWritingDirectionMenu() 296 { 297 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) 298 return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item"); 299 #else 300 return UI_STRING("Writing Direction", "Writing direction context sub-menu item"); 301 #endif 302 } 303 304 String WebPlatformStrategies::contextMenuItemTagTextDirectionMenu() 305 { 306 return UI_STRING("Selection Direction", "Selection direction context sub-menu item"); 307 } 308 309 String WebPlatformStrategies::contextMenuItemTagDefaultDirection() 310 { 311 return UI_STRING("Default", "Default writing direction context menu item"); 312 } 313 314 String WebPlatformStrategies::contextMenuItemTagLeftToRight() 315 { 316 return UI_STRING("Left to Right", "Left to Right context menu item"); 317 } 318 319 String WebPlatformStrategies::contextMenuItemTagRightToLeft() 320 { 321 return UI_STRING("Right to Left", "Right to Left context menu item"); 322 } 323 324 #if PLATFORM(MAC) 325 326 String WebPlatformStrategies::contextMenuItemTagSearchInSpotlight() 327 { 328 return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item"); 329 } 330 331 String WebPlatformStrategies::contextMenuItemTagShowFonts() 332 { 333 return UI_STRING("Show Fonts", "Show fonts context menu item"); 334 } 335 336 String WebPlatformStrategies::contextMenuItemTagStyles() 337 { 338 return UI_STRING("Styles...", "Styles context menu item"); 339 } 340 341 String WebPlatformStrategies::contextMenuItemTagShowColors() 342 { 343 return UI_STRING("Show Colors", "Show colors context menu item"); 344 } 345 346 String WebPlatformStrategies::contextMenuItemTagSpeechMenu() 347 { 348 return UI_STRING("Speech", "Speech context sub-menu item"); 349 } 350 351 String WebPlatformStrategies::contextMenuItemTagStartSpeaking() 352 { 353 return UI_STRING("Start Speaking", "Start speaking context menu item"); 354 } 355 356 String WebPlatformStrategies::contextMenuItemTagStopSpeaking() 357 { 358 return UI_STRING("Stop Speaking", "Stop speaking context menu item"); 359 } 360 361 String WebPlatformStrategies::contextMenuItemTagCorrectSpellingAutomatically() 362 { 363 return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item"); 364 } 365 366 String WebPlatformStrategies::contextMenuItemTagSubstitutionsMenu() 367 { 368 return UI_STRING("Substitutions", "Substitutions context sub-menu item"); 369 } 370 371 String WebPlatformStrategies::contextMenuItemTagShowSubstitutions(bool show) 372 { 373 if (show) 374 return UI_STRING("Show Substitutions", "menu item title"); 375 return UI_STRING("Hide Substitutions", "menu item title"); 376 } 377 378 String WebPlatformStrategies::contextMenuItemTagSmartCopyPaste() 379 { 380 return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item"); 381 } 382 383 String WebPlatformStrategies::contextMenuItemTagSmartQuotes() 384 { 385 return UI_STRING("Smart Quotes", "Smart Quotes context menu item"); 386 } 387 388 String WebPlatformStrategies::contextMenuItemTagSmartDashes() 389 { 390 return UI_STRING("Smart Dashes", "Smart Dashes context menu item"); 391 } 392 393 String WebPlatformStrategies::contextMenuItemTagSmartLinks() 394 { 395 return UI_STRING("Smart Links", "Smart Links context menu item"); 396 } 397 398 String WebPlatformStrategies::contextMenuItemTagTextReplacement() 399 { 400 return UI_STRING("Text Replacement", "Text Replacement context menu item"); 401 } 402 403 String WebPlatformStrategies::contextMenuItemTagTransformationsMenu() 404 { 405 return UI_STRING("Transformations", "Transformations context sub-menu item"); 406 } 407 408 String WebPlatformStrategies::contextMenuItemTagMakeUpperCase() 409 { 410 return UI_STRING("Make Upper Case", "Make Upper Case context menu item"); 411 } 412 413 String WebPlatformStrategies::contextMenuItemTagMakeLowerCase() 414 { 415 return UI_STRING("Make Lower Case", "Make Lower Case context menu item"); 416 } 417 418 String WebPlatformStrategies::contextMenuItemTagCapitalize() 419 { 420 return UI_STRING("Capitalize", "Capitalize context menu item"); 421 } 422 423 String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replacedString) 424 { 425 static NSString *formatString = nil; 426 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) 427 static bool lookedUpString = false; 428 if (!lookedUpString) { 429 formatString = [[[NSBundle bundleForClass:[NSSpellChecker class]] localizedStringForKey:@"Change Back to \\U201C%@\\U201D" value:nil table:@"MenuCommands"] retain]; 430 lookedUpString = true; 431 } 432 #endif 433 if (!formatString) 434 return replacedString; 435 return [NSString stringWithFormat:formatString, (NSString *)replacedString]; 436 } 437 438 #endif 439 440 String WebPlatformStrategies::contextMenuItemTagInspectElement() 441 { 442 return UI_STRING("Inspect Element", "Inspect Element context menu item"); 443 } 444 445 #endif // ENABLE(CONTEXT_MENUS) 446 447 String WebPlatformStrategies::searchMenuNoRecentSearchesText() 448 { 449 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"); 450 } 451 452 String WebPlatformStrategies::searchMenuRecentSearchesText() 453 { 454 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"); 455 } 456 457 String WebPlatformStrategies::searchMenuClearRecentSearchesText() 458 { 459 return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); 460 } 461 462 String WebPlatformStrategies::AXWebAreaText() 463 { 464 return UI_STRING("HTML content", "accessibility role description for web area"); 465 } 466 467 String WebPlatformStrategies::AXLinkText() 468 { 469 return UI_STRING("link", "accessibility role description for link"); 470 } 471 472 String WebPlatformStrategies::AXListMarkerText() 473 { 474 return UI_STRING("list marker", "accessibility role description for list marker"); 475 } 476 477 String WebPlatformStrategies::AXImageMapText() 478 { 479 return UI_STRING("image map", "accessibility role description for image map"); 480 } 481 482 String WebPlatformStrategies::AXHeadingText() 483 { 484 return UI_STRING("heading", "accessibility role description for headings"); 485 } 486 487 String WebPlatformStrategies::AXDefinitionListTermText() 488 { 489 return UI_STRING("term", "term word of a definition"); 490 } 491 492 String WebPlatformStrategies::AXDefinitionListDefinitionText() 493 { 494 return UI_STRING("definition", "definition phrase"); 495 } 496 497 String WebPlatformStrategies::AXARIAContentGroupText(const String& ariaType) 498 { 499 if (ariaType == "ARIAApplicationAlert") 500 return UI_STRING("alert", "An ARIA accessibility group that acts as an alert."); 501 if (ariaType == "ARIAApplicationAlertDialog") 502 return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); 503 if (ariaType == "ARIAApplicationDialog") 504 return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog."); 505 if (ariaType == "ARIAApplicationLog") 506 return UI_STRING("log", "An ARIA accessibility group that acts as a console log."); 507 if (ariaType == "ARIAApplicationMarquee") 508 return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee."); 509 if (ariaType == "ARIAApplicationStatus") 510 return UI_STRING("application status", "An ARIA accessibility group that acts as a status update."); 511 if (ariaType == "ARIAApplicationTimer") 512 return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer."); 513 if (ariaType == "ARIADocument") 514 return UI_STRING("document", "An ARIA accessibility group that acts as a document."); 515 if (ariaType == "ARIADocumentArticle") 516 return UI_STRING("article", "An ARIA accessibility group that acts as an article."); 517 if (ariaType == "ARIADocumentNote") 518 return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document."); 519 if (ariaType == "ARIADocumentRegion") 520 return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document."); 521 if (ariaType == "ARIALandmarkApplication") 522 return UI_STRING("application", "An ARIA accessibility group that acts as an application."); 523 if (ariaType == "ARIALandmarkBanner") 524 return UI_STRING("banner", "An ARIA accessibility group that acts as a banner."); 525 if (ariaType == "ARIALandmarkComplementary") 526 return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information."); 527 if (ariaType == "ARIALandmarkContentInfo") 528 return UI_STRING("content", "An ARIA accessibility group that contains content."); 529 if (ariaType == "ARIALandmarkMain") 530 return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website."); 531 if (ariaType == "ARIALandmarkNavigation") 532 return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website."); 533 if (ariaType == "ARIALandmarkSearch") 534 return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website."); 535 if (ariaType == "ARIAUserInterfaceTooltip") 536 return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip."); 537 if (ariaType == "ARIATabPanel") 538 return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab."); 539 if (ariaType == "ARIADocumentMath") 540 return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols."); 541 return String(); 542 } 543 544 String WebPlatformStrategies::AXButtonActionVerb() 545 { 546 return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility"); 547 } 548 549 String WebPlatformStrategies::AXRadioButtonActionVerb() 550 { 551 return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility"); 552 } 553 554 String WebPlatformStrategies::AXTextFieldActionVerb() 555 { 556 return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility"); 557 } 558 559 String WebPlatformStrategies::AXCheckedCheckBoxActionVerb() 560 { 561 return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility"); 562 } 563 564 String WebPlatformStrategies::AXUncheckedCheckBoxActionVerb() 565 { 566 return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility"); 567 } 568 569 String WebPlatformStrategies::AXMenuListActionVerb() 570 { 571 return String(); 572 } 573 574 String WebPlatformStrategies::AXMenuListPopupActionVerb() 575 { 576 return String(); 577 } 578 579 String WebPlatformStrategies::AXLinkActionVerb() 580 { 581 return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); 582 } 583 584 String WebPlatformStrategies::missingPluginText() 585 { 586 return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing"); 587 } 588 589 String WebPlatformStrategies::crashedPluginText() 590 { 591 return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed"); 592 } 593 594 String WebPlatformStrategies::multipleFileUploadText(unsigned numberOfFiles) 595 { 596 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]; 597 } 598 599 String WebPlatformStrategies::unknownFileSizeText() 600 { 601 return UI_STRING("Unknown", "Unknown filesize FTP directory listing item"); 602 } 603 604 String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size) 605 { 606 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()]; 607 } 608 609 String WebPlatformStrategies::mediaElementLoadingStateText() 610 { 611 return UI_STRING("Loading...", "Media controller status message when the media is loading"); 612 } 613 614 String WebPlatformStrategies::mediaElementLiveBroadcastStateText() 615 { 616 return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast"); 617 } 618 619 String WebPlatformStrategies::localizedMediaControlElementString(const String& name) 620 { 621 if (name == "AudioElement") 622 return UI_STRING("audio element controller", "accessibility role description for audio element controller"); 623 if (name == "VideoElement") 624 return UI_STRING("video element controller", "accessibility role description for video element controller"); 625 if (name == "MuteButton") 626 return UI_STRING("mute", "accessibility role description for mute button"); 627 if (name == "UnMuteButton") 628 return UI_STRING("unmute", "accessibility role description for turn mute off button"); 629 if (name == "PlayButton") 630 return UI_STRING("play", "accessibility role description for play button"); 631 if (name == "PauseButton") 632 return UI_STRING("pause", "accessibility role description for pause button"); 633 if (name == "Slider") 634 return UI_STRING("movie time", "accessibility role description for timeline slider"); 635 if (name == "SliderThumb") 636 return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb"); 637 if (name == "RewindButton") 638 return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button"); 639 if (name == "ReturnToRealtimeButton") 640 return UI_STRING("return to realtime", "accessibility role description for return to real time button"); 641 if (name == "CurrentTimeDisplay") 642 return UI_STRING("elapsed time", "accessibility role description for elapsed time display"); 643 if (name == "TimeRemainingDisplay") 644 return UI_STRING("remaining time", "accessibility role description for time remaining display"); 645 if (name == "StatusDisplay") 646 return UI_STRING("status", "accessibility role description for movie status"); 647 if (name == "FullscreenButton") 648 return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button"); 649 if (name == "SeekForwardButton") 650 return UI_STRING("fast forward", "accessibility role description for fast forward button"); 651 if (name == "SeekBackButton") 652 return UI_STRING("fast reverse", "accessibility role description for fast reverse button"); 653 if (name == "ShowClosedCaptionsButton") 654 return UI_STRING("show closed captions", "accessibility role description for show closed captions button"); 655 if (name == "HideClosedCaptionsButton") 656 return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button"); 657 658 // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy. 659 if (name == "ControlsPanel") 660 return String(); 661 662 ASSERT_NOT_REACHED(); 663 return String(); 664 } 665 666 String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& name) 667 { 668 if (name == "AudioElement") 669 return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller"); 670 if (name == "VideoElement") 671 return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller"); 672 if (name == "MuteButton") 673 return UI_STRING("mute audio tracks", "accessibility help text for mute button"); 674 if (name == "UnMuteButton") 675 return UI_STRING("unmute audio tracks", "accessibility help text for un mute button"); 676 if (name == "PlayButton") 677 return UI_STRING("begin playback", "accessibility help text for play button"); 678 if (name == "PauseButton") 679 return UI_STRING("pause playback", "accessibility help text for pause button"); 680 if (name == "Slider") 681 return UI_STRING("movie time scrubber", "accessibility help text for timeline slider"); 682 if (name == "SliderThumb") 683 return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); 684 if (name == "RewindButton") 685 return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); 686 if (name == "ReturnToRealtimeButton") 687 return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button"); 688 if (name == "CurrentTimeDisplay") 689 return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display"); 690 if (name == "TimeRemainingDisplay") 691 return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display"); 692 if (name == "StatusDisplay") 693 return UI_STRING("current movie status", "accessibility help text for movie status display"); 694 if (name == "SeekBackButton") 695 return UI_STRING("seek quickly back", "accessibility help text for fast rewind button"); 696 if (name == "SeekForwardButton") 697 return UI_STRING("seek quickly forward", "accessibility help text for fast forward button"); 698 if (name == "FullscreenButton") 699 return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); 700 if (name == "ShowClosedCaptionsButton") 701 return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button"); 702 if (name == "HideClosedCaptionsButton") 703 return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button"); 704 705 ASSERT_NOT_REACHED(); 706 return String(); 707 } 708 709 String WebPlatformStrategies::localizedMediaTimeDescription(float time) 710 { 711 if (!isfinite(time)) 712 return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value"); 713 714 int seconds = (int)fabsf(time); 715 int days = seconds / (60 * 60 * 24); 716 int hours = seconds / (60 * 60); 717 int minutes = (seconds / 60) % 60; 718 seconds %= 60; 719 720 if (days) 721 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]; 722 else if (hours) 723 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]; 724 else if (minutes) 725 return [NSString stringWithFormat:UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds]; 726 727 return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds]; 728 } 729 730 String WebPlatformStrategies::validationMessageValueMissingText() 731 { 732 return UI_STRING("value missing", "Validation message for required form control elements that have no value"); 733 } 734 735 String WebPlatformStrategies::validationMessageTypeMismatchText() 736 { 737 return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type"); 738 } 739 740 String WebPlatformStrategies::validationMessagePatternMismatchText() 741 { 742 return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); 743 } 744 745 String WebPlatformStrategies::validationMessageTooLongText() 746 { 747 return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length"); 748 } 749 750 String WebPlatformStrategies::validationMessageRangeUnderflowText() 751 { 752 return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum"); 753 } 754 755 String WebPlatformStrategies::validationMessageRangeOverflowText() 756 { 757 return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum"); 758 } 759 760 String WebPlatformStrategies::validationMessageStepMismatchText() 761 { 762 return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); 763 } 764 -
trunk/WebKit/mac/WebCoreSupport/WebViewFactory.mm
r61444 r63904 32 32 #import <WebKit/WebViewInternal.h> 33 33 #import <WebKit/WebHTMLViewInternal.h> 34 #import <WebKit/WebLocalizableStrings.h>35 34 #import <WebKit/WebNSUserDefaultsExtras.h> 36 35 #import <WebKit/WebNSObjectExtras.h> … … 65 64 } 66 65 67 - (NSString *)inputElementAltText68 {69 return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value");70 }71 72 - (NSString *)resetButtonDefaultLabel73 {74 return UI_STRING("Reset", "default label for Reset buttons in forms on web pages");75 }76 77 - (NSString *)searchableIndexIntroduction78 {79 return UI_STRING("This is a searchable index. Enter search keywords: ",80 "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'");81 }82 83 - (NSString *)submitButtonDefaultLabel84 {85 return UI_STRING("Submit", "default label for Submit buttons in forms on web pages");86 }87 88 - (NSString *)fileButtonChooseFileLabel89 {90 return UI_STRING("Choose File", "title for file button used in HTML forms");91 }92 93 - (NSString *)fileButtonNoFileSelectedLabel94 {95 return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected");96 }97 98 - (NSString *)copyImageUnknownFileLabel99 {100 return UI_STRING("unknown", "Unknown filename");101 }102 103 - (NSString *)searchMenuNoRecentSearchesText104 {105 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");106 }107 108 - (NSString *)searchMenuRecentSearchesText109 {110 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");111 }112 113 - (NSString *)searchMenuClearRecentSearchesText114 {115 return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents");116 }117 118 66 - (NSString *)defaultLanguageCode 119 67 { 120 68 return [NSUserDefaults _webkit_preferredLanguageCode]; 121 }122 123 - (NSString *)contextMenuItemTagOpenLinkInNewWindow124 {125 return UI_STRING("Open Link in New Window", "Open in New Window context menu item");126 }127 128 - (NSString *)contextMenuItemTagDownloadLinkToDisk129 {130 return UI_STRING("Download Linked File", "Download Linked File context menu item");131 }132 133 - (NSString *)contextMenuItemTagCopyLinkToClipboard134 {135 return UI_STRING("Copy Link", "Copy Link context menu item");136 }137 138 - (NSString *)contextMenuItemTagOpenImageInNewWindow139 {140 return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item");141 }142 143 - (NSString *)contextMenuItemTagDownloadImageToDisk144 {145 return UI_STRING("Download Image", "Download Image context menu item");146 }147 148 - (NSString *)contextMenuItemTagCopyImageToClipboard149 {150 return UI_STRING("Copy Image", "Copy Image context menu item");151 }152 153 - (NSString *)contextMenuItemTagOpenFrameInNewWindow154 {155 return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item");156 }157 158 - (NSString *)contextMenuItemTagCopy159 {160 return UI_STRING("Copy", "Copy context menu item");161 }162 163 - (NSString *)contextMenuItemTagGoBack164 {165 return UI_STRING("Back", "Back context menu item");166 }167 168 - (NSString *)contextMenuItemTagGoForward169 {170 return UI_STRING("Forward", "Forward context menu item");171 }172 173 - (NSString *)contextMenuItemTagStop174 {175 return UI_STRING("Stop", "Stop context menu item");176 }177 178 - (NSString *)contextMenuItemTagReload179 {180 return UI_STRING("Reload", "Reload context menu item");181 }182 183 - (NSString *)contextMenuItemTagCut184 {185 return UI_STRING("Cut", "Cut context menu item");186 }187 188 - (NSString *)contextMenuItemTagPaste189 {190 return UI_STRING("Paste", "Paste context menu item");191 }192 193 - (NSString *)contextMenuItemTagNoGuessesFound194 {195 return UI_STRING("No Guesses Found", "No Guesses Found context menu item");196 }197 198 - (NSString *)contextMenuItemTagIgnoreSpelling199 {200 return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item");201 }202 203 - (NSString *)contextMenuItemTagLearnSpelling204 {205 return UI_STRING("Learn Spelling", "Learn Spelling context menu item");206 }207 208 - (NSString *)contextMenuItemTagSearchInSpotlight209 {210 return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item");211 }212 213 - (NSString *)contextMenuItemTagSearchWeb214 {215 return UI_STRING("Search in Google", "Search in Google context menu item");216 }217 218 - (NSString *)contextMenuItemTagLookUpInDictionary219 {220 return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item");221 }222 223 - (NSString *)contextMenuItemTagOpenLink224 {225 return UI_STRING("Open Link", "Open Link context menu item");226 }227 228 - (NSString *)contextMenuItemTagIgnoreGrammar229 {230 return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item");231 }232 233 - (NSString *)contextMenuItemTagSpellingMenu234 {235 #ifndef BUILDING_ON_TIGER236 return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item");237 #else238 return UI_STRING("Spelling", "Spelling context sub-menu item");239 #endif240 }241 242 - (NSString *)contextMenuItemTagShowSpellingPanel:(bool)show243 {244 #ifndef BUILDING_ON_TIGER245 if (show)246 return UI_STRING("Show Spelling and Grammar", "menu item title");247 return UI_STRING("Hide Spelling and Grammar", "menu item title");248 #else249 return UI_STRING("Spelling...", "menu item title");250 #endif251 }252 253 - (NSString *)contextMenuItemTagCheckSpelling254 {255 #ifndef BUILDING_ON_TIGER256 return UI_STRING("Check Document Now", "Check spelling context menu item");257 #else258 return UI_STRING("Check Spelling", "Check spelling context menu item");259 #endif260 }261 262 - (NSString *)contextMenuItemTagCheckSpellingWhileTyping263 {264 #ifndef BUILDING_ON_TIGER265 return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item");266 #else267 return UI_STRING("Check Spelling as You Type", "Check spelling while typing context menu item");268 #endif269 }270 271 - (NSString *)contextMenuItemTagCheckGrammarWithSpelling272 {273 return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item");274 }275 276 - (NSString *)contextMenuItemTagFontMenu277 {278 return UI_STRING("Font", "Font context sub-menu item");279 }280 281 - (NSString *)contextMenuItemTagShowFonts282 {283 return UI_STRING("Show Fonts", "Show fonts context menu item");284 }285 286 - (NSString *)contextMenuItemTagBold287 {288 return UI_STRING("Bold", "Bold context menu item");289 }290 291 - (NSString *)contextMenuItemTagItalic292 {293 return UI_STRING("Italic", "Italic context menu item");294 }295 296 - (NSString *)contextMenuItemTagUnderline297 {298 return UI_STRING("Underline", "Underline context menu item");299 }300 301 - (NSString *)contextMenuItemTagOutline302 {303 return UI_STRING("Outline", "Outline context menu item");304 }305 306 - (NSString *)contextMenuItemTagStyles307 {308 return UI_STRING("Styles...", "Styles context menu item");309 }310 311 - (NSString *)contextMenuItemTagShowColors312 {313 return UI_STRING("Show Colors", "Show colors context menu item");314 }315 316 - (NSString *)contextMenuItemTagSpeechMenu317 {318 return UI_STRING("Speech", "Speech context sub-menu item");319 }320 321 - (NSString *)contextMenuItemTagStartSpeaking322 {323 return UI_STRING("Start Speaking", "Start speaking context menu item");324 }325 326 - (NSString *)contextMenuItemTagStopSpeaking327 {328 return UI_STRING("Stop Speaking", "Stop speaking context menu item");329 }330 331 - (NSString *)contextMenuItemTagWritingDirectionMenu332 {333 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)334 return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item");335 #else336 return UI_STRING("Writing Direction", "Writing direction context sub-menu item");337 #endif338 }339 340 - (NSString *)contextMenuItemTagTextDirectionMenu341 {342 return UI_STRING("Selection Direction", "Selection direction context sub-menu item");343 }344 345 - (NSString *)contextMenuItemTagDefaultDirection346 {347 return UI_STRING("Default", "Default writing direction context menu item");348 }349 350 - (NSString *)contextMenuItemTagLeftToRight351 {352 return UI_STRING("Left to Right", "Left to Right context menu item");353 }354 355 - (NSString *)contextMenuItemTagRightToLeft356 {357 return UI_STRING("Right to Left", "Right to Left context menu item");358 }359 360 - (NSString *)contextMenuItemTagCorrectSpellingAutomatically361 {362 return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item");363 }364 365 - (NSString *)contextMenuItemTagSubstitutionsMenu366 {367 return UI_STRING("Substitutions", "Substitutions context sub-menu item");368 }369 370 - (NSString *)contextMenuItemTagShowSubstitutions:(bool)show371 {372 if (show)373 return UI_STRING("Show Substitutions", "menu item title");374 return UI_STRING("Hide Substitutions", "menu item title");375 }376 377 - (NSString *)contextMenuItemTagSmartCopyPaste378 {379 return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item");380 }381 382 - (NSString *)contextMenuItemTagSmartQuotes383 {384 return UI_STRING("Smart Quotes", "Smart Quotes context menu item");385 }386 387 - (NSString *)contextMenuItemTagSmartDashes388 {389 return UI_STRING("Smart Dashes", "Smart Dashes context menu item");390 }391 392 - (NSString *)contextMenuItemTagSmartLinks393 {394 return UI_STRING("Smart Links", "Smart Links context menu item");395 }396 397 - (NSString *)contextMenuItemTagTextReplacement398 {399 return UI_STRING("Text Replacement", "Text Replacement context menu item");400 }401 402 - (NSString *)contextMenuItemTagTransformationsMenu403 {404 return UI_STRING("Transformations", "Transformations context sub-menu item");405 }406 407 - (NSString *)contextMenuItemTagMakeUpperCase408 {409 return UI_STRING("Make Upper Case", "Make Upper Case context menu item");410 }411 412 - (NSString *)contextMenuItemTagMakeLowerCase413 {414 return UI_STRING("Make Lower Case", "Make Lower Case context menu item");415 }416 417 - (NSString *)contextMenuItemTagCapitalize418 {419 return UI_STRING("Capitalize", "Capitalize context menu item");420 }421 422 - (NSString *)contextMenuItemTagChangeBack:(NSString *)replacedString423 {424 static NSString *formatString = nil;425 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)426 static bool lookedUpString = false;427 if (!lookedUpString) {428 formatString = [[[NSBundle bundleForClass:[NSSpellChecker class]] localizedStringForKey:@"Change Back to \\U201C%@\\U201D" value:nil table:@"MenuCommands"] retain];429 lookedUpString = true;430 }431 #endif432 return formatString ? [NSString stringWithFormat:formatString, replacedString] : replacedString;433 }434 435 - (NSString *)contextMenuItemTagInspectElement436 {437 return UI_STRING("Inspect Element", "Inspect Element context menu item");438 69 } 439 70 … … 508 139 } 509 140 510 - (NSString *)AXWebAreaText511 {512 return UI_STRING("HTML content", "accessibility role description for web area");513 }514 515 - (NSString *)AXLinkText516 {517 return UI_STRING("link", "accessibility role description for link");518 }519 520 - (NSString *)AXListMarkerText521 {522 return UI_STRING("list marker", "accessibility role description for list marker");523 }524 525 - (NSString *)AXImageMapText526 {527 return UI_STRING("image map", "accessibility role description for image map");528 }529 530 - (NSString *)AXHeadingText531 {532 return UI_STRING("heading", "accessibility role description for headings");533 }534 535 - (NSString *)AXDefinitionListTermText536 {537 return UI_STRING("term", "term word of a definition");538 }539 540 - (NSString *)AXDefinitionListDefinitionText541 {542 return UI_STRING("definition", "definition phrase");543 }544 545 - (NSString *)AXARIAContentGroupText:(NSString *)ariaType546 {547 if ([ariaType isEqualToString:@"ARIAApplicationAlert"])548 return UI_STRING("alert", "An ARIA accessibility group that acts as an alert.");549 if ([ariaType isEqualToString:@"ARIAApplicationAlertDialog"])550 return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog.");551 if ([ariaType isEqualToString:@"ARIAApplicationDialog"])552 return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog.");553 if ([ariaType isEqualToString:@"ARIAApplicationLog"])554 return UI_STRING("log", "An ARIA accessibility group that acts as a console log.");555 if ([ariaType isEqualToString:@"ARIAApplicationMarquee"])556 return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee.");557 if ([ariaType isEqualToString:@"ARIAApplicationStatus"])558 return UI_STRING("application status", "An ARIA accessibility group that acts as a status update.");559 if ([ariaType isEqualToString:@"ARIAApplicationTimer"])560 return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer.");561 if ([ariaType isEqualToString:@"ARIADocument"])562 return UI_STRING("document", "An ARIA accessibility group that acts as a document.");563 if ([ariaType isEqualToString:@"ARIADocumentArticle"])564 return UI_STRING("article", "An ARIA accessibility group that acts as an article.");565 if ([ariaType isEqualToString:@"ARIADocumentNote"])566 return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document.");567 if ([ariaType isEqualToString:@"ARIADocumentRegion"])568 return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document.");569 if ([ariaType isEqualToString:@"ARIALandmarkApplication"])570 return UI_STRING("application", "An ARIA accessibility group that acts as an application.");571 if ([ariaType isEqualToString:@"ARIALandmarkBanner"])572 return UI_STRING("banner", "An ARIA accessibility group that acts as a banner.");573 if ([ariaType isEqualToString:@"ARIALandmarkComplementary"])574 return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information.");575 if ([ariaType isEqualToString:@"ARIALandmarkContentInfo"])576 return UI_STRING("content", "An ARIA accessibility group that contains content.");577 if ([ariaType isEqualToString:@"ARIALandmarkMain"])578 return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website.");579 if ([ariaType isEqualToString:@"ARIALandmarkNavigation"])580 return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website.");581 if ([ariaType isEqualToString:@"ARIALandmarkSearch"])582 return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website.");583 if ([ariaType isEqualToString:@"ARIAUserInterfaceTooltip"])584 return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip.");585 if ([ariaType isEqualToString:@"ARIATabPanel"])586 return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab.");587 if ([ariaType isEqualToString:@"ARIADocumentMath"])588 return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols.");589 return nil;590 }591 592 - (NSString *)AXButtonActionVerb593 {594 return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility");595 }596 597 - (NSString *)AXRadioButtonActionVerb598 {599 return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility");600 }601 602 - (NSString *)AXTextFieldActionVerb603 {604 return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility");605 }606 607 - (NSString *)AXCheckedCheckBoxActionVerb608 {609 return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility");610 }611 612 - (NSString *)AXUncheckedCheckBoxActionVerb613 {614 return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility");615 }616 617 - (NSString *)AXLinkActionVerb618 {619 return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility");620 }621 622 - (NSString *)AXMenuListPopupActionVerb623 {624 return nil;625 }626 627 - (NSString *)AXMenuListActionVerb628 {629 return nil;630 }631 632 - (NSString *)missingPluginText633 {634 return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing");635 }636 637 - (NSString *)crashedPluginText638 {639 return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed");640 }641 642 - (NSString *)multipleFileUploadTextForNumberOfFiles:(unsigned)numberOfFiles643 {644 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];645 }646 647 - (NSString *)unknownFileSizeText648 {649 return UI_STRING("Unknown", "Unknown filesize FTP directory listing item");650 }651 652 - (NSString*)imageTitleForFilename:(NSString*)filename width:(int)width height:(int)height653 {654 return [NSString stringWithFormat:UI_STRING("%@ %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filename, width, height];655 }656 657 - (NSString*)mediaElementLoadingStateText658 {659 return UI_STRING("Loading...", "Media controller status message when the media is loading");660 }661 662 - (NSString*)mediaElementLiveBroadcastStateText663 {664 return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast");665 }666 667 - (NSString*)localizedMediaControlElementString:(NSString*)name668 {669 if ([name isEqualToString:@"AudioElement"])670 return UI_STRING("audio element controller", "accessibility role description for audio element controller");671 if ([name isEqualToString:@"VideoElement"])672 return UI_STRING("video element controller", "accessibility role description for video element controller");673 674 // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy.675 if ([name isEqualToString:@"ControlsPanel"])676 return @"";677 678 if ([name isEqualToString:@"MuteButton"])679 return UI_STRING("mute", "accessibility role description for mute button");680 if ([name isEqualToString:@"UnMuteButton"])681 return UI_STRING("unmute", "accessibility role description for turn mute off button");682 if ([name isEqualToString:@"PlayButton"])683 return UI_STRING("play", "accessibility role description for play button");684 if ([name isEqualToString:@"PauseButton"])685 return UI_STRING("pause", "accessibility role description for pause button");686 if ([name isEqualToString:@"Slider"])687 return UI_STRING("movie time", "accessibility role description for timeline slider");688 if ([name isEqualToString:@"SliderThumb"])689 return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb");690 if ([name isEqualToString:@"RewindButton"])691 return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button");692 if ([name isEqualToString:@"ReturnToRealtimeButton"])693 return UI_STRING("return to realtime", "accessibility role description for return to real time button");694 if ([name isEqualToString:@"CurrentTimeDisplay"])695 return UI_STRING("elapsed time", "accessibility role description for elapsed time display");696 if ([name isEqualToString:@"TimeRemainingDisplay"])697 return UI_STRING("remaining time", "accessibility role description for time remaining display");698 if ([name isEqualToString:@"StatusDisplay"])699 return UI_STRING("status", "accessibility role description for movie status");700 if ([name isEqualToString:@"FullscreenButton"])701 return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button");702 if ([name isEqualToString:@"SeekForwardButton"])703 return UI_STRING("fast forward", "accessibility role description for fast forward button");704 if ([name isEqualToString:@"SeekBackButton"])705 return UI_STRING("fast reverse", "accessibility role description for fast reverse button");706 if ([name isEqualToString:@"ShowClosedCaptionsButton"])707 return UI_STRING("show closed captions", "accessibility role description for show closed captions button");708 if ([name isEqualToString:@"HideClosedCaptionsButton"])709 return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button");710 711 ASSERT_NOT_REACHED();712 return @"";713 }714 715 - (NSString*)localizedMediaControlElementHelpText:(NSString*)name716 {717 if ([name isEqualToString:@"AudioElement"])718 return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller");719 if ([name isEqualToString:@"VideoElement"])720 return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller");721 722 if ([name isEqualToString:@"MuteButton"])723 return UI_STRING("mute audio tracks", "accessibility help text for mute button");724 if ([name isEqualToString:@"UnMuteButton"])725 return UI_STRING("unmute audio tracks", "accessibility help text for un mute button");726 if ([name isEqualToString:@"PlayButton"])727 return UI_STRING("begin playback", "accessibility help text for play button");728 if ([name isEqualToString:@"PauseButton"])729 return UI_STRING("pause playback", "accessibility help text for pause button");730 if ([name isEqualToString:@"Slider"])731 return UI_STRING("movie time scrubber", "accessibility help text for timeline slider");732 if ([name isEqualToString:@"SliderThumb"])733 return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb");734 if ([name isEqualToString:@"RewindButton"])735 return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button");736 if ([name isEqualToString:@"ReturnToRealtimeButton"])737 return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button");738 if ([name isEqualToString:@"CurrentTimeDisplay"])739 return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display");740 if ([name isEqualToString:@"TimeRemainingDisplay"])741 return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display");742 if ([name isEqualToString:@"StatusDisplay"])743 return UI_STRING("current movie status", "accessibility help text for movie status display");744 if ([name isEqualToString:@"SeekBackButton"])745 return UI_STRING("seek quickly back", "accessibility help text for fast rewind button");746 if ([name isEqualToString:@"SeekForwardButton"])747 return UI_STRING("seek quickly forward", "accessibility help text for fast forward button");748 if ([name isEqualToString:@"FullscreenButton"])749 return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button");750 if ([name isEqualToString:@"ShowClosedCaptionsButton"])751 return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button");752 if ([name isEqualToString:@"HideClosedCaptionsButton"])753 return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button");754 ASSERT_NOT_REACHED();755 return @"";756 }757 758 - (NSString*)localizedMediaTimeDescription:(float)time759 {760 if (!isfinite(time))761 return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value");762 763 int seconds = (int)fabsf(time);764 int days = seconds / (60 * 60 * 24);765 int hours = seconds / (60 * 60);766 int minutes = (seconds / 60) % 60;767 seconds %= 60;768 769 if (days)770 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];771 else if (hours)772 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];773 else if (minutes)774 return [NSString stringWithFormat:UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds];775 776 return [NSString stringWithFormat:UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds];777 }778 779 - (NSString *)validationMessageValueMissingText780 {781 return UI_STRING("value missing", "Validation message for required form control elements that have no value");782 }783 784 - (NSString *)validationMessageTypeMismatchText785 {786 return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type");787 }788 789 - (NSString *)validationMessagePatternMismatchText790 {791 return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern");792 }793 794 - (NSString *)validationMessageTooLongText795 {796 return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length");797 }798 799 - (NSString *)validationMessageRangeUnderflowText800 {801 return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum");802 }803 804 - (NSString *)validationMessageRangeOverflowText805 {806 return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum");807 }808 809 - (NSString *)validationMessageStepMismatchText810 {811 return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute");812 }813 814 141 @end -
trunk/WebKit2/ChangeLog
r63903 r63904 1 2010-07-22 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Anders Carlsson. 4 5 Patch for https://bugs.webkit.org/show_bug.cgi?id=42836 6 Add localized strings stubs for WebKit2. 7 8 Gets us below 200 tests failing in WebKitTestRunner. 9 10 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 11 * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 12 1 13 2010-07-22 Andras Becsi <abecsi@webkit.org> 2 14 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r61725 r63904 28 28 #if USE(PLATFORM_STRATEGIES) 29 29 30 #include "NotImplemented.h" 30 31 #include "PluginInfoStore.h" 31 32 #include "WebCoreArgumentCoders.h" 32 33 #include "WebProcess.h" 33 34 #include "WebProcessProxyMessageKinds.h" 35 #include <wtf/MathExtras.h> 36 #include <wtf/text/CString.h> 37 38 // FIXME: Implement localization. 39 #define UI_STRING(string, description) string 40 #define UI_STRING_KEY(string, key, description) string 34 41 35 42 using namespace WebCore; … … 55 62 return this; 56 63 } 64 65 LocalizationStrategy* WebPlatformStrategies::createLocalizationStrategy() 66 { 67 return this; 68 } 69 70 // PluginStrategy 57 71 58 72 void WebPlatformStrategies::populatePluginCache() … … 88 102 } 89 103 104 // LocalizationStrategy 105 106 String WebPlatformStrategies::inputElementAltText() 107 { 108 return UI_STRING_KEY("Submit", "Submit (input element)", "alt text for <input> elements with no alt, title, or value"); 109 } 110 111 String WebPlatformStrategies::resetButtonDefaultLabel() 112 { 113 return UI_STRING("Reset", "default label for Reset buttons in forms on web pages"); 114 } 115 116 String WebPlatformStrategies::searchableIndexIntroduction() 117 { 118 return UI_STRING("This is a searchable index. Enter search keywords: ", 119 "text that appears at the start of nearly-obsolete web pages in the form of a 'searchable index'"); 120 } 121 122 String WebPlatformStrategies::submitButtonDefaultLabel() 123 { 124 return UI_STRING("Submit", "default label for Submit buttons in forms on web pages"); 125 } 126 127 String WebPlatformStrategies::fileButtonChooseFileLabel() 128 { 129 return UI_STRING("Choose File", "title for file button used in HTML forms"); 130 } 131 132 String WebPlatformStrategies::fileButtonNoFileSelectedLabel() 133 { 134 return UI_STRING("no file selected", "text to display in file button used in HTML forms when no file is selected"); 135 } 136 137 String WebPlatformStrategies::copyImageUnknownFileLabel() 138 { 139 return UI_STRING("unknown", "Unknown filename"); 140 } 141 142 #if ENABLE(CONTEXT_MENUS) 143 144 String WebPlatformStrategies::contextMenuItemTagOpenLinkInNewWindow() 145 { 146 return UI_STRING("Open Link in New Window", "Open in New Window context menu item"); 147 } 148 149 String WebPlatformStrategies::contextMenuItemTagDownloadLinkToDisk() 150 { 151 return UI_STRING("Download Linked File", "Download Linked File context menu item"); 152 } 153 154 String WebPlatformStrategies::contextMenuItemTagCopyLinkToClipboard() 155 { 156 return UI_STRING("Copy Link", "Copy Link context menu item"); 157 } 158 159 String WebPlatformStrategies::contextMenuItemTagOpenImageInNewWindow() 160 { 161 return UI_STRING("Open Image in New Window", "Open Image in New Window context menu item"); 162 } 163 164 String WebPlatformStrategies::contextMenuItemTagDownloadImageToDisk() 165 { 166 return UI_STRING("Download Image", "Download Image context menu item"); 167 } 168 169 String WebPlatformStrategies::contextMenuItemTagCopyImageToClipboard() 170 { 171 return UI_STRING("Copy Image", "Copy Image context menu item"); 172 } 173 174 String WebPlatformStrategies::contextMenuItemTagOpenFrameInNewWindow() 175 { 176 return UI_STRING("Open Frame in New Window", "Open Frame in New Window context menu item"); 177 } 178 179 String WebPlatformStrategies::contextMenuItemTagCopy() 180 { 181 return UI_STRING("Copy", "Copy context menu item"); 182 } 183 184 String WebPlatformStrategies::contextMenuItemTagGoBack() 185 { 186 return UI_STRING("Back", "Back context menu item"); 187 } 188 189 String WebPlatformStrategies::contextMenuItemTagGoForward() 190 { 191 return UI_STRING("Forward", "Forward context menu item"); 192 } 193 194 String WebPlatformStrategies::contextMenuItemTagStop() 195 { 196 return UI_STRING("Stop", "Stop context menu item"); 197 } 198 199 String WebPlatformStrategies::contextMenuItemTagReload() 200 { 201 return UI_STRING("Reload", "Reload context menu item"); 202 } 203 204 String WebPlatformStrategies::contextMenuItemTagCut() 205 { 206 return UI_STRING("Cut", "Cut context menu item"); 207 } 208 209 String WebPlatformStrategies::contextMenuItemTagPaste() 210 { 211 return UI_STRING("Paste", "Paste context menu item"); 212 } 213 214 #if PLATFORM(GTK) 215 216 String WebPlatformStrategies::contextMenuItemTagDelete() 217 { 218 notImplemented(); 219 return "Delete"; 220 } 221 222 String WebPlatformStrategies::contextMenuItemTagSelectAll() 223 { 224 notImplemented(); 225 return "Select All"; 226 } 227 228 String WebPlatformStrategies::contextMenuItemTagInputMethods() 229 { 230 notImplemented(); 231 return "Input Methods"; 232 } 233 234 String WebPlatformStrategies::contextMenuItemTagUnicode() 235 { 236 notImplemented(); 237 return "Unicode"; 238 } 239 240 #endif 241 242 String WebPlatformStrategies::contextMenuItemTagNoGuessesFound() 243 { 244 return UI_STRING("No Guesses Found", "No Guesses Found context menu item"); 245 } 246 247 String WebPlatformStrategies::contextMenuItemTagIgnoreSpelling() 248 { 249 return UI_STRING("Ignore Spelling", "Ignore Spelling context menu item"); 250 } 251 252 String WebPlatformStrategies::contextMenuItemTagLearnSpelling() 253 { 254 return UI_STRING("Learn Spelling", "Learn Spelling context menu item"); 255 } 256 257 String WebPlatformStrategies::contextMenuItemTagSearchWeb() 258 { 259 return UI_STRING("Search in Google", "Search in Google context menu item"); 260 } 261 262 String WebPlatformStrategies::contextMenuItemTagLookUpInDictionary() 263 { 264 return UI_STRING("Look Up in Dictionary", "Look Up in Dictionary context menu item"); 265 } 266 267 String WebPlatformStrategies::contextMenuItemTagOpenLink() 268 { 269 return UI_STRING("Open Link", "Open Link context menu item"); 270 } 271 272 String WebPlatformStrategies::contextMenuItemTagIgnoreGrammar() 273 { 274 return UI_STRING("Ignore Grammar", "Ignore Grammar context menu item"); 275 } 276 277 String WebPlatformStrategies::contextMenuItemTagSpellingMenu() 278 { 279 return UI_STRING("Spelling and Grammar", "Spelling and Grammar context sub-menu item"); 280 } 281 282 String WebPlatformStrategies::contextMenuItemTagShowSpellingPanel(bool show) 283 { 284 if (show) 285 return UI_STRING("Show Spelling and Grammar", "menu item title"); 286 return UI_STRING("Hide Spelling and Grammar", "menu item title"); 287 } 288 289 String WebPlatformStrategies::contextMenuItemTagCheckSpelling() 290 { 291 return UI_STRING("Check Document Now", "Check spelling context menu item"); 292 } 293 294 String WebPlatformStrategies::contextMenuItemTagCheckSpellingWhileTyping() 295 { 296 return UI_STRING("Check Spelling While Typing", "Check spelling while typing context menu item"); 297 } 298 299 String WebPlatformStrategies::contextMenuItemTagCheckGrammarWithSpelling() 300 { 301 return UI_STRING("Check Grammar With Spelling", "Check grammar with spelling context menu item"); 302 } 303 304 String WebPlatformStrategies::contextMenuItemTagFontMenu() 305 { 306 return UI_STRING("Font", "Font context sub-menu item"); 307 } 308 309 String WebPlatformStrategies::contextMenuItemTagBold() 310 { 311 return UI_STRING("Bold", "Bold context menu item"); 312 } 313 314 String WebPlatformStrategies::contextMenuItemTagItalic() 315 { 316 return UI_STRING("Italic", "Italic context menu item"); 317 } 318 319 String WebPlatformStrategies::contextMenuItemTagUnderline() 320 { 321 return UI_STRING("Underline", "Underline context menu item"); 322 } 323 324 String WebPlatformStrategies::contextMenuItemTagOutline() 325 { 326 return UI_STRING("Outline", "Outline context menu item"); 327 } 328 329 String WebPlatformStrategies::contextMenuItemTagWritingDirectionMenu() 330 { 331 return UI_STRING("Paragraph Direction", "Paragraph direction context sub-menu item"); 332 } 333 334 String WebPlatformStrategies::contextMenuItemTagTextDirectionMenu() 335 { 336 return UI_STRING("Selection Direction", "Selection direction context sub-menu item"); 337 } 338 339 String WebPlatformStrategies::contextMenuItemTagDefaultDirection() 340 { 341 return UI_STRING("Default", "Default writing direction context menu item"); 342 } 343 344 String WebPlatformStrategies::contextMenuItemTagLeftToRight() 345 { 346 return UI_STRING("Left to Right", "Left to Right context menu item"); 347 } 348 349 String WebPlatformStrategies::contextMenuItemTagRightToLeft() 350 { 351 return UI_STRING("Right to Left", "Right to Left context menu item"); 352 } 353 354 #if PLATFORM(MAC) 355 356 String WebPlatformStrategies::contextMenuItemTagSearchInSpotlight() 357 { 358 return UI_STRING("Search in Spotlight", "Search in Spotlight context menu item"); 359 } 360 361 String WebPlatformStrategies::contextMenuItemTagShowFonts() 362 { 363 return UI_STRING("Show Fonts", "Show fonts context menu item"); 364 } 365 366 String WebPlatformStrategies::contextMenuItemTagStyles() 367 { 368 return UI_STRING("Styles...", "Styles context menu item"); 369 } 370 371 String WebPlatformStrategies::contextMenuItemTagShowColors() 372 { 373 return UI_STRING("Show Colors", "Show colors context menu item"); 374 } 375 376 String WebPlatformStrategies::contextMenuItemTagSpeechMenu() 377 { 378 return UI_STRING("Speech", "Speech context sub-menu item"); 379 } 380 381 String WebPlatformStrategies::contextMenuItemTagStartSpeaking() 382 { 383 return UI_STRING("Start Speaking", "Start speaking context menu item"); 384 } 385 386 String WebPlatformStrategies::contextMenuItemTagStopSpeaking() 387 { 388 return UI_STRING("Stop Speaking", "Stop speaking context menu item"); 389 } 390 391 String WebPlatformStrategies::contextMenuItemTagCorrectSpellingAutomatically() 392 { 393 return UI_STRING("Correct Spelling Automatically", "Correct Spelling Automatically context menu item"); 394 } 395 396 String WebPlatformStrategies::contextMenuItemTagSubstitutionsMenu() 397 { 398 return UI_STRING("Substitutions", "Substitutions context sub-menu item"); 399 } 400 401 String WebPlatformStrategies::contextMenuItemTagShowSubstitutions(bool show) 402 { 403 if (show) 404 return UI_STRING("Show Substitutions", "menu item title"); 405 return UI_STRING("Hide Substitutions", "menu item title"); 406 } 407 408 String WebPlatformStrategies::contextMenuItemTagSmartCopyPaste() 409 { 410 return UI_STRING("Smart Copy/Paste", "Smart Copy/Paste context menu item"); 411 } 412 413 String WebPlatformStrategies::contextMenuItemTagSmartQuotes() 414 { 415 return UI_STRING("Smart Quotes", "Smart Quotes context menu item"); 416 } 417 418 String WebPlatformStrategies::contextMenuItemTagSmartDashes() 419 { 420 return UI_STRING("Smart Dashes", "Smart Dashes context menu item"); 421 } 422 423 String WebPlatformStrategies::contextMenuItemTagSmartLinks() 424 { 425 return UI_STRING("Smart Links", "Smart Links context menu item"); 426 } 427 428 String WebPlatformStrategies::contextMenuItemTagTextReplacement() 429 { 430 return UI_STRING("Text Replacement", "Text Replacement context menu item"); 431 } 432 433 String WebPlatformStrategies::contextMenuItemTagTransformationsMenu() 434 { 435 return UI_STRING("Transformations", "Transformations context sub-menu item"); 436 } 437 438 String WebPlatformStrategies::contextMenuItemTagMakeUpperCase() 439 { 440 return UI_STRING("Make Upper Case", "Make Upper Case context menu item"); 441 } 442 443 String WebPlatformStrategies::contextMenuItemTagMakeLowerCase() 444 { 445 return UI_STRING("Make Lower Case", "Make Lower Case context menu item"); 446 } 447 448 String WebPlatformStrategies::contextMenuItemTagCapitalize() 449 { 450 return UI_STRING("Capitalize", "Capitalize context menu item"); 451 } 452 453 String WebPlatformStrategies::contextMenuItemTagChangeBack(const String& replacedString) 454 { 455 notImplemented(); 456 return replacedString; 457 } 458 459 #endif 460 461 String WebPlatformStrategies::contextMenuItemTagInspectElement() 462 { 463 return UI_STRING("Inspect Element", "Inspect Element context menu item"); 464 } 465 466 #endif // ENABLE(CONTEXT_MENUS) 467 468 String WebPlatformStrategies::searchMenuNoRecentSearchesText() 469 { 470 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"); 471 } 472 473 String WebPlatformStrategies::searchMenuRecentSearchesText() 474 { 475 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"); 476 } 477 478 String WebPlatformStrategies::searchMenuClearRecentSearchesText() 479 { 480 return UI_STRING("Clear Recent Searches", "menu item in Recent Searches menu that empties menu's contents"); 481 } 482 483 String WebPlatformStrategies::AXWebAreaText() 484 { 485 return UI_STRING("HTML content", "accessibility role description for web area"); 486 } 487 488 String WebPlatformStrategies::AXLinkText() 489 { 490 return UI_STRING("link", "accessibility role description for link"); 491 } 492 493 String WebPlatformStrategies::AXListMarkerText() 494 { 495 return UI_STRING("list marker", "accessibility role description for list marker"); 496 } 497 498 String WebPlatformStrategies::AXImageMapText() 499 { 500 return UI_STRING("image map", "accessibility role description for image map"); 501 } 502 503 String WebPlatformStrategies::AXHeadingText() 504 { 505 return UI_STRING("heading", "accessibility role description for headings"); 506 } 507 508 String WebPlatformStrategies::AXDefinitionListTermText() 509 { 510 return UI_STRING("term", "term word of a definition"); 511 } 512 513 String WebPlatformStrategies::AXDefinitionListDefinitionText() 514 { 515 return UI_STRING("definition", "definition phrase"); 516 } 517 518 String WebPlatformStrategies::AXARIAContentGroupText(const String& ariaType) 519 { 520 if (ariaType == "ARIAApplicationAlert") 521 return UI_STRING("alert", "An ARIA accessibility group that acts as an alert."); 522 if (ariaType == "ARIAApplicationAlertDialog") 523 return UI_STRING("alert dialog", "An ARIA accessibility group that acts as an alert dialog."); 524 if (ariaType == "ARIAApplicationDialog") 525 return UI_STRING("dialog", "An ARIA accessibility group that acts as an dialog."); 526 if (ariaType == "ARIAApplicationLog") 527 return UI_STRING("log", "An ARIA accessibility group that acts as a console log."); 528 if (ariaType == "ARIAApplicationMarquee") 529 return UI_STRING("marquee", "An ARIA accessibility group that acts as a marquee."); 530 if (ariaType == "ARIAApplicationStatus") 531 return UI_STRING("application status", "An ARIA accessibility group that acts as a status update."); 532 if (ariaType == "ARIAApplicationTimer") 533 return UI_STRING("timer", "An ARIA accessibility group that acts as an updating timer."); 534 if (ariaType == "ARIADocument") 535 return UI_STRING("document", "An ARIA accessibility group that acts as a document."); 536 if (ariaType == "ARIADocumentArticle") 537 return UI_STRING("article", "An ARIA accessibility group that acts as an article."); 538 if (ariaType == "ARIADocumentNote") 539 return UI_STRING("note", "An ARIA accessibility group that acts as a note in a document."); 540 if (ariaType == "ARIADocumentRegion") 541 return UI_STRING("region", "An ARIA accessibility group that acts as a distinct region in a document."); 542 if (ariaType == "ARIALandmarkApplication") 543 return UI_STRING("application", "An ARIA accessibility group that acts as an application."); 544 if (ariaType == "ARIALandmarkBanner") 545 return UI_STRING("banner", "An ARIA accessibility group that acts as a banner."); 546 if (ariaType == "ARIALandmarkComplementary") 547 return UI_STRING("complementary", "An ARIA accessibility group that acts as a region of complementary information."); 548 if (ariaType == "ARIALandmarkContentInfo") 549 return UI_STRING("content", "An ARIA accessibility group that contains content."); 550 if (ariaType == "ARIALandmarkMain") 551 return UI_STRING("main", "An ARIA accessibility group that is the main portion of the website."); 552 if (ariaType == "ARIALandmarkNavigation") 553 return UI_STRING("navigation", "An ARIA accessibility group that contains the main navigation elements of a website."); 554 if (ariaType == "ARIALandmarkSearch") 555 return UI_STRING("search", "An ARIA accessibility group that contains a search feature of a website."); 556 if (ariaType == "ARIAUserInterfaceTooltip") 557 return UI_STRING("tooltip", "An ARIA accessibility group that acts as a tooltip."); 558 if (ariaType == "ARIATabPanel") 559 return UI_STRING("tab panel", "An ARIA accessibility group that contains the content of a tab."); 560 if (ariaType == "ARIADocumentMath") 561 return UI_STRING("math", "An ARIA accessibility group that contains mathematical symbols."); 562 return String(); 563 } 564 565 String WebPlatformStrategies::AXButtonActionVerb() 566 { 567 return UI_STRING("press", "Verb stating the action that will occur when a button is pressed, as used by accessibility"); 568 } 569 570 String WebPlatformStrategies::AXRadioButtonActionVerb() 571 { 572 return UI_STRING("select", "Verb stating the action that will occur when a radio button is clicked, as used by accessibility"); 573 } 574 575 String WebPlatformStrategies::AXTextFieldActionVerb() 576 { 577 return UI_STRING("activate", "Verb stating the action that will occur when a text field is selected, as used by accessibility"); 578 } 579 580 String WebPlatformStrategies::AXCheckedCheckBoxActionVerb() 581 { 582 return UI_STRING("uncheck", "Verb stating the action that will occur when a checked checkbox is clicked, as used by accessibility"); 583 } 584 585 String WebPlatformStrategies::AXUncheckedCheckBoxActionVerb() 586 { 587 return UI_STRING("check", "Verb stating the action that will occur when an unchecked checkbox is clicked, as used by accessibility"); 588 } 589 590 String WebPlatformStrategies::AXMenuListActionVerb() 591 { 592 notImplemented(); 593 return "select"; 594 } 595 596 String WebPlatformStrategies::AXMenuListPopupActionVerb() 597 { 598 notImplemented(); 599 return "select"; 600 } 601 602 String WebPlatformStrategies::AXLinkActionVerb() 603 { 604 return UI_STRING("jump", "Verb stating the action that will occur when a link is clicked, as used by accessibility"); 605 } 606 607 String WebPlatformStrategies::missingPluginText() 608 { 609 return UI_STRING("Missing Plug-in", "Label text to be used when a plugin is missing"); 610 } 611 612 String WebPlatformStrategies::crashedPluginText() 613 { 614 return UI_STRING("Plug-in Failure", "Label text to be used if plugin host process has crashed"); 615 } 616 617 String WebPlatformStrategies::multipleFileUploadText(unsigned numberOfFiles) 618 { 619 return String::format(UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles); 620 } 621 622 String WebPlatformStrategies::unknownFileSizeText() 623 { 624 return UI_STRING("Unknown", "Unknown filesize FTP directory listing item"); 625 } 626 627 #if PLATFORM(WIN) 628 629 String WebPlatformStrategies::uploadFileText() 630 { 631 notImplemented(); 632 return "upload"; 633 } 634 635 String WebPlatformStrategies::allFilesText() 636 { 637 notImplemented(); 638 return "all files"; 639 } 640 641 #endif 642 643 String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size) 644 { 645 return String::format(UI_STRING("%s %d×%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filename.utf8().data(), size.width(), size.height()); 646 } 647 648 String WebPlatformStrategies::mediaElementLoadingStateText() 649 { 650 return UI_STRING("Loading...", "Media controller status message when the media is loading"); 651 } 652 653 String WebPlatformStrategies::mediaElementLiveBroadcastStateText() 654 { 655 return UI_STRING("Live Broadcast", "Media controller status message when watching a live broadcast"); 656 } 657 658 String WebPlatformStrategies::localizedMediaControlElementString(const String& name) 659 { 660 if (name == "AudioElement") 661 return UI_STRING("audio element controller", "accessibility role description for audio element controller"); 662 if (name == "VideoElement") 663 return UI_STRING("video element controller", "accessibility role description for video element controller"); 664 if (name == "MuteButton") 665 return UI_STRING("mute", "accessibility role description for mute button"); 666 if (name == "UnMuteButton") 667 return UI_STRING("unmute", "accessibility role description for turn mute off button"); 668 if (name == "PlayButton") 669 return UI_STRING("play", "accessibility role description for play button"); 670 if (name == "PauseButton") 671 return UI_STRING("pause", "accessibility role description for pause button"); 672 if (name == "Slider") 673 return UI_STRING("movie time", "accessibility role description for timeline slider"); 674 if (name == "SliderThumb") 675 return UI_STRING("timeline slider thumb", "accessibility role description for timeline thumb"); 676 if (name == "RewindButton") 677 return UI_STRING("back 30 seconds", "accessibility role description for seek back 30 seconds button"); 678 if (name == "ReturnToRealtimeButton") 679 return UI_STRING("return to realtime", "accessibility role description for return to real time button"); 680 if (name == "CurrentTimeDisplay") 681 return UI_STRING("elapsed time", "accessibility role description for elapsed time display"); 682 if (name == "TimeRemainingDisplay") 683 return UI_STRING("remaining time", "accessibility role description for time remaining display"); 684 if (name == "StatusDisplay") 685 return UI_STRING("status", "accessibility role description for movie status"); 686 if (name == "FullscreenButton") 687 return UI_STRING("fullscreen", "accessibility role description for enter fullscreen button"); 688 if (name == "SeekForwardButton") 689 return UI_STRING("fast forward", "accessibility role description for fast forward button"); 690 if (name == "SeekBackButton") 691 return UI_STRING("fast reverse", "accessibility role description for fast reverse button"); 692 if (name == "ShowClosedCaptionsButton") 693 return UI_STRING("show closed captions", "accessibility role description for show closed captions button"); 694 if (name == "HideClosedCaptionsButton") 695 return UI_STRING("hide closed captions", "accessibility role description for hide closed captions button"); 696 697 // FIXME: the ControlsPanel container should never be visible in the accessibility hierarchy. 698 if (name == "ControlsPanel") 699 return String(); 700 701 ASSERT_NOT_REACHED(); 702 return String(); 703 } 704 705 String WebPlatformStrategies::localizedMediaControlElementHelpText(const String& name) 706 { 707 if (name == "AudioElement") 708 return UI_STRING("audio element playback controls and status display", "accessibility role description for audio element controller"); 709 if (name == "VideoElement") 710 return UI_STRING("video element playback controls and status display", "accessibility role description for video element controller"); 711 if (name == "MuteButton") 712 return UI_STRING("mute audio tracks", "accessibility help text for mute button"); 713 if (name == "UnMuteButton") 714 return UI_STRING("unmute audio tracks", "accessibility help text for un mute button"); 715 if (name == "PlayButton") 716 return UI_STRING("begin playback", "accessibility help text for play button"); 717 if (name == "PauseButton") 718 return UI_STRING("pause playback", "accessibility help text for pause button"); 719 if (name == "Slider") 720 return UI_STRING("movie time scrubber", "accessibility help text for timeline slider"); 721 if (name == "SliderThumb") 722 return UI_STRING("movie time scrubber thumb", "accessibility help text for timeline slider thumb"); 723 if (name == "RewindButton") 724 return UI_STRING("seek movie back 30 seconds", "accessibility help text for jump back 30 seconds button"); 725 if (name == "ReturnToRealtimeButton") 726 return UI_STRING("return streaming movie to real time", "accessibility help text for return streaming movie to real time button"); 727 if (name == "CurrentTimeDisplay") 728 return UI_STRING("current movie time in seconds", "accessibility help text for elapsed time display"); 729 if (name == "TimeRemainingDisplay") 730 return UI_STRING("number of seconds of movie remaining", "accessibility help text for remaining time display"); 731 if (name == "StatusDisplay") 732 return UI_STRING("current movie status", "accessibility help text for movie status display"); 733 if (name == "SeekBackButton") 734 return UI_STRING("seek quickly back", "accessibility help text for fast rewind button"); 735 if (name == "SeekForwardButton") 736 return UI_STRING("seek quickly forward", "accessibility help text for fast forward button"); 737 if (name == "FullscreenButton") 738 return UI_STRING("Play movie in fullscreen mode", "accessibility help text for enter fullscreen button"); 739 if (name == "ShowClosedCaptionsButton") 740 return UI_STRING("start displaying closed captions", "accessibility help text for show closed captions button"); 741 if (name == "HideClosedCaptionsButton") 742 return UI_STRING("stop displaying closed captions", "accessibility help text for hide closed captions button"); 743 744 ASSERT_NOT_REACHED(); 745 return String(); 746 } 747 748 String WebPlatformStrategies::localizedMediaTimeDescription(float time) 749 { 750 if (!isfinite(time)) 751 return UI_STRING("indefinite time", "accessibility help text for an indefinite media controller time value"); 752 753 int seconds = static_cast<int>(fabsf(time)); 754 int days = seconds / (60 * 60 * 24); 755 int hours = seconds / (60 * 60); 756 int minutes = (seconds / 60) % 60; 757 seconds %= 60; 758 759 if (days) 760 return String::format(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); 761 if (hours) 762 return String::format(UI_STRING("%1$d hours %2$d minutes %3$d seconds", "accessibility help text for media controller time value >= 60 minutes"), hours, minutes, seconds); 763 if (minutes) 764 return String::format(UI_STRING("%1$d minutes %2$d seconds", "accessibility help text for media controller time value >= 60 seconds"), minutes, seconds); 765 return String::format(UI_STRING("%1$d seconds", "accessibility help text for media controller time value < 60 seconds"), seconds); 766 } 767 768 String WebPlatformStrategies::validationMessageValueMissingText() 769 { 770 return UI_STRING("value missing", "Validation message for required form control elements that have no value"); 771 } 772 773 String WebPlatformStrategies::validationMessageTypeMismatchText() 774 { 775 return UI_STRING("type mismatch", "Validation message for input form controls with a value not matching type"); 776 } 777 778 String WebPlatformStrategies::validationMessagePatternMismatchText() 779 { 780 return UI_STRING("pattern mismatch", "Validation message for input form controls requiring a constrained value according to pattern"); 781 } 782 783 String WebPlatformStrategies::validationMessageTooLongText() 784 { 785 return UI_STRING("too long", "Validation message for form control elements with a value longer than maximum allowed length"); 786 } 787 788 String WebPlatformStrategies::validationMessageRangeUnderflowText() 789 { 790 return UI_STRING("range underflow", "Validation message for input form controls with value lower than allowed minimum"); 791 } 792 793 String WebPlatformStrategies::validationMessageRangeOverflowText() 794 { 795 return UI_STRING("range overflow", "Validation message for input form controls with value higher than allowed maximum"); 796 } 797 798 String WebPlatformStrategies::validationMessageStepMismatchText() 799 { 800 return UI_STRING("step mismatch", "Validation message for input form controls with value not respecting the step attribute"); 801 } 802 90 803 } // namespace WebKit 91 804 -
trunk/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.h
r61702 r63904 31 31 #include <WebCore/PlatformStrategies.h> 32 32 #include <WebCore/PluginStrategy.h> 33 #include <WebCore/LocalizationStrategy.h> 33 34 34 35 namespace WebKit { 35 36 36 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy {37 class WebPlatformStrategies : public WebCore::PlatformStrategies, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy { 37 38 public: 38 39 static void initialize(); … … 43 44 // WebCore::PlatformStrategies 44 45 virtual WebCore::PluginStrategy* createPluginStrategy(); 46 virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); 45 47 46 48 // WebCore::PluginStrategy 47 49 virtual void refreshPlugins(); 48 50 virtual void getPluginInfo(Vector<WebCore::PluginInfo>&); 49 51 52 // WebCore::LocalizationStrategy 53 virtual WebCore::String inputElementAltText(); 54 virtual WebCore::String resetButtonDefaultLabel(); 55 virtual WebCore::String searchableIndexIntroduction(); 56 virtual WebCore::String submitButtonDefaultLabel(); 57 virtual WebCore::String fileButtonChooseFileLabel(); 58 virtual WebCore::String fileButtonNoFileSelectedLabel(); 59 virtual WebCore::String copyImageUnknownFileLabel(); 60 #if ENABLE(CONTEXT_MENUS) 61 virtual WebCore::String contextMenuItemTagOpenLinkInNewWindow(); 62 virtual WebCore::String contextMenuItemTagDownloadLinkToDisk(); 63 virtual WebCore::String contextMenuItemTagCopyLinkToClipboard(); 64 virtual WebCore::String contextMenuItemTagOpenImageInNewWindow(); 65 virtual WebCore::String contextMenuItemTagDownloadImageToDisk(); 66 virtual WebCore::String contextMenuItemTagCopyImageToClipboard(); 67 virtual WebCore::String contextMenuItemTagOpenFrameInNewWindow(); 68 virtual WebCore::String contextMenuItemTagCopy(); 69 virtual WebCore::String contextMenuItemTagGoBack(); 70 virtual WebCore::String contextMenuItemTagGoForward(); 71 virtual WebCore::String contextMenuItemTagStop(); 72 virtual WebCore::String contextMenuItemTagReload(); 73 virtual WebCore::String contextMenuItemTagCut(); 74 virtual WebCore::String contextMenuItemTagPaste(); 75 #if PLATFORM(GTK) 76 virtual WebCore::String contextMenuItemTagDelete(); 77 virtual WebCore::String contextMenuItemTagSelectAll(); 78 virtual WebCore::String contextMenuItemTagInputMethods(); 79 virtual WebCore::String contextMenuItemTagUnicode(); 80 #endif 81 virtual WebCore::String contextMenuItemTagNoGuessesFound(); 82 virtual WebCore::String contextMenuItemTagIgnoreSpelling(); 83 virtual WebCore::String contextMenuItemTagLearnSpelling(); 84 virtual WebCore::String contextMenuItemTagSearchWeb(); 85 virtual WebCore::String contextMenuItemTagLookUpInDictionary(); 86 virtual WebCore::String contextMenuItemTagOpenLink(); 87 virtual WebCore::String contextMenuItemTagIgnoreGrammar(); 88 virtual WebCore::String contextMenuItemTagSpellingMenu(); 89 virtual WebCore::String contextMenuItemTagShowSpellingPanel(bool show); 90 virtual WebCore::String contextMenuItemTagCheckSpelling(); 91 virtual WebCore::String contextMenuItemTagCheckSpellingWhileTyping(); 92 virtual WebCore::String contextMenuItemTagCheckGrammarWithSpelling(); 93 virtual WebCore::String contextMenuItemTagFontMenu(); 94 virtual WebCore::String contextMenuItemTagBold(); 95 virtual WebCore::String contextMenuItemTagItalic(); 96 virtual WebCore::String contextMenuItemTagUnderline(); 97 virtual WebCore::String contextMenuItemTagOutline(); 98 virtual WebCore::String contextMenuItemTagWritingDirectionMenu(); 99 virtual WebCore::String contextMenuItemTagTextDirectionMenu(); 100 virtual WebCore::String contextMenuItemTagDefaultDirection(); 101 virtual WebCore::String contextMenuItemTagLeftToRight(); 102 virtual WebCore::String contextMenuItemTagRightToLeft(); 103 #if PLATFORM(MAC) 104 virtual WebCore::String contextMenuItemTagSearchInSpotlight(); 105 virtual WebCore::String contextMenuItemTagShowFonts(); 106 virtual WebCore::String contextMenuItemTagStyles(); 107 virtual WebCore::String contextMenuItemTagShowColors(); 108 virtual WebCore::String contextMenuItemTagSpeechMenu(); 109 virtual WebCore::String contextMenuItemTagStartSpeaking(); 110 virtual WebCore::String contextMenuItemTagStopSpeaking(); 111 virtual WebCore::String contextMenuItemTagCorrectSpellingAutomatically(); 112 virtual WebCore::String contextMenuItemTagSubstitutionsMenu(); 113 virtual WebCore::String contextMenuItemTagShowSubstitutions(bool show); 114 virtual WebCore::String contextMenuItemTagSmartCopyPaste(); 115 virtual WebCore::String contextMenuItemTagSmartQuotes(); 116 virtual WebCore::String contextMenuItemTagSmartDashes(); 117 virtual WebCore::String contextMenuItemTagSmartLinks(); 118 virtual WebCore::String contextMenuItemTagTextReplacement(); 119 virtual WebCore::String contextMenuItemTagTransformationsMenu(); 120 virtual WebCore::String contextMenuItemTagMakeUpperCase(); 121 virtual WebCore::String contextMenuItemTagMakeLowerCase(); 122 virtual WebCore::String contextMenuItemTagCapitalize(); 123 virtual WebCore::String contextMenuItemTagChangeBack(const WebCore::String& replacedString); 124 #endif 125 virtual WebCore::String contextMenuItemTagInspectElement(); 126 #endif // ENABLE(CONTEXT_MENUS) 127 virtual WebCore::String searchMenuNoRecentSearchesText(); 128 virtual WebCore::String searchMenuRecentSearchesText(); 129 virtual WebCore::String searchMenuClearRecentSearchesText(); 130 virtual WebCore::String AXWebAreaText(); 131 virtual WebCore::String AXLinkText(); 132 virtual WebCore::String AXListMarkerText(); 133 virtual WebCore::String AXImageMapText(); 134 virtual WebCore::String AXHeadingText(); 135 virtual WebCore::String AXDefinitionListTermText(); 136 virtual WebCore::String AXDefinitionListDefinitionText(); 137 virtual WebCore::String AXARIAContentGroupText(const WebCore::String& ariaType); 138 virtual WebCore::String AXButtonActionVerb(); 139 virtual WebCore::String AXRadioButtonActionVerb(); 140 virtual WebCore::String AXTextFieldActionVerb(); 141 virtual WebCore::String AXCheckedCheckBoxActionVerb(); 142 virtual WebCore::String AXUncheckedCheckBoxActionVerb(); 143 virtual WebCore::String AXMenuListActionVerb(); 144 virtual WebCore::String AXMenuListPopupActionVerb(); 145 virtual WebCore::String AXLinkActionVerb(); 146 virtual WebCore::String missingPluginText(); 147 virtual WebCore::String crashedPluginText(); 148 virtual WebCore::String multipleFileUploadText(unsigned numberOfFiles); 149 virtual WebCore::String unknownFileSizeText(); 150 #if PLATFORM(WIN) 151 virtual WebCore::String uploadFileText(); 152 virtual WebCore::String allFilesText(); 153 #endif 154 virtual WebCore::String imageTitle(const WebCore::String& filename, const WebCore::IntSize& size); 155 virtual WebCore::String mediaElementLoadingStateText(); 156 virtual WebCore::String mediaElementLiveBroadcastStateText(); 157 virtual WebCore::String localizedMediaControlElementString(const WebCore::String&); 158 virtual WebCore::String localizedMediaControlElementHelpText(const WebCore::String&); 159 virtual WebCore::String localizedMediaTimeDescription(float); 160 virtual WebCore::String validationMessageValueMissingText(); 161 virtual WebCore::String validationMessageTypeMismatchText(); 162 virtual WebCore::String validationMessagePatternMismatchText(); 163 virtual WebCore::String validationMessageTooLongText(); 164 virtual WebCore::String validationMessageRangeUnderflowText(); 165 virtual WebCore::String validationMessageRangeOverflowText(); 166 virtual WebCore::String validationMessageStepMismatchText(); 167 50 168 void populatePluginCache(); 51 169
Note: See TracChangeset
for help on using the changeset viewer.