Changeset 80693 in webkit
- Timestamp:
- Mar 9, 2011 10:31:32 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80690 r80693 1 2011-03-09 Peter Kasting <pkasting@google.com> 2 3 Reviewed by Ryosuke Niwa. 4 5 Add UA string tags for Windows 64. 6 https://bugs.webkit.org/show_bug.cgi?id=55226 7 8 * StringsNotToBeLocalized.txt: 9 * platform/win/SystemInfo.cpp: 10 (WebCore::osVersionForUAString): 11 (WebCore::isWOW64): 12 (WebCore::processorArchitecture): 13 (WebCore::architectureTokenForUAString): 14 (WebCore::windowsVersionForUAString): 15 1 16 2011-03-09 Peter Kasting <pkasting@google.com> 2 17 -
trunk/Source/WebCore/StringsNotToBeLocalized.txt
r80688 r80693 100 100 ":/?#" 101 101 "; " 102 "; WOW64" 103 "; Win64; x64" 104 "; Win64; IA64" 102 105 "<!" 103 106 "<%@ %@>" … … 512 515 "WebWorkersPrivate" 513 516 "Windows " 514 "Windows CE"515 "Windows CE "516 "Windows CE .NET"517 517 "Windows 3.1" 518 518 "Windows 95" 519 519 "Windows 98" 520 520 "Windows 98; Win 9x 4.90" 521 "Windows CE" 522 "Windows CE " 523 "Windows CE .NET" 524 "Windows NT " 521 525 "WinNT4.0" 522 "Windows NT "523 526 "WmvPlugin" 524 527 "XSL" … … 688 691 "jpeg" 689 692 "js" 693 "kernel32.dll" 690 694 "kioskmode" 691 695 "ks_c_5601-1987" -
trunk/Source/WebCore/platform/win/SystemInfo.cpp
r80689 r80693 87 87 } 88 88 89 String windowsVersionForUAString()89 static String osVersionForUAString() 90 90 { 91 91 int major, minor; … … 114 114 } 115 115 116 static bool isWOW64() 117 { 118 static bool initialized = false; 119 static bool wow64 = false; 120 121 if (!initialized) { 122 initialized = true; 123 HMODULE kernel32Module = GetModuleHandleA("kernel32.dll"); 124 if (!kernel32Module) 125 return wow64; 126 typedef BOOL (WINAPI* IsWow64ProcessFunc)(HANDLE, PBOOL); 127 IsWow64ProcessFunc isWOW64Process = reinterpret_cast<IsWow64ProcessFunc>(GetProcAddress(kernel32Module, "IsWow64Process")); 128 if (isWOW64Process) { 129 BOOL result = FALSE; 130 wow64 = isWOW64Process(GetCurrentProcess(), &result) && result; 131 } 132 } 133 134 return wow64; 135 } 136 137 static WORD processorArchitecture() 138 { 139 static bool initialized = false; 140 static WORD architecture = PROCESSOR_ARCHITECTURE_INTEL; 141 142 if (!initialized) { 143 initialized = true; 144 HMODULE kernel32Module = GetModuleHandleA("kernel32.dll"); 145 if (!kernel32Module) 146 return architecture; 147 typedef VOID (WINAPI* GetNativeSystemInfoFunc)(LPSYSTEM_INFO); 148 GetNativeSystemInfoFunc getNativeSystemInfo = reinterpret_cast<GetNativeSystemInfoFunc>(GetProcAddress(kernel32Module, "GetNativeSystemInfo")); 149 if (getNativeSystemInfo) { 150 SYSTEM_INFO systemInfo = {0}; 151 getNativeSystemInfo(&systemInfo); 152 architecture = systemInfo.wProcessorArchitecture; 153 } 154 } 155 156 return architecture; 157 } 158 159 static String architectureTokenForUAString() 160 { 161 #if !OS(WINCE) 162 if (isWOW64()) 163 return "; WOW64"; 164 if (processorArchitecture() == PROCESSOR_ARCHITECTURE_AMD64) 165 return "; Win64; x64"; 166 if (processorArchitecture() == PROCESSOR_ARCHITECTURE_IA64) 167 return "; Win64; IA64"; 168 #endif 169 return String(); 170 } 171 172 String windowsVersionForUAString() 173 { 174 return makeString(osVersionForUAString(), architectureTokenForUAString()); 175 } 176 116 177 } // namespace WebCore
Note: See TracChangeset
for help on using the changeset viewer.