[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
paroga at webkit.org
paroga at webkit.org
Wed Dec 22 14:55:57 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 07a90afecdd4f3d33e97f796359e417e4a6d584c
Author: paroga at webkit.org <paroga at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Mon Oct 25 17:03:24 2010 +0000
2010-10-25 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* wtf/Platform.h:
2010-10-25 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* platform/win/FileSystemWin.cpp:
(WebCore::openTemporaryFile):
* platform/wince/FileSystemWinCE.cpp:
(WebCore::openTemporaryFile):
* plugins/win/PluginDatabaseWin.cpp:
(WebCore::addPluginPathsFromRegistry):
(WebCore::addWindowsMediaPlayerPluginDirectory):
(WebCore::addMacromediaPluginDirectories):
2010-10-25 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* WebCoreSupport/WebContextMenuClient.cpp:
(isPreInspectElementTagSafari):
* WebView.cpp:
(WebView::interpretKeyEvent):
2010-10-25 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* WebCoreSupport/EditorClientWinCE.cpp:
(WebKit::EditorClientWinCE::interpretKeyEvent):
2010-10-25 Patrick Gansterer <paroga at webkit.org>
Reviewed by David Kilzer.
Replace _countof with WTF_ARRAY_LENGTH
https://bugs.webkit.org/show_bug.cgi?id=48229
* UIProcess/Launcher/win/ProcessLauncherWin.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
(WebKit::safariPluginsDirectory):
(WebKit::addMozillaPluginDirectories):
(WebKit::addWindowsMediaPlayerPluginDirectory):
(WebKit::addAdobeAcrobatPluginDirectory):
(WebKit::addMacromediaPluginDirectories):
(WebKit::addPluginPathsFromRegistry):
* WebProcess/WebPage/win/WebPageWin.cpp:
(WebKit::WebPage::interpretKeyEvent):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index c11eda2..e42c7dd 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,12 @@
+2010-10-25 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Replace _countof with WTF_ARRAY_LENGTH
+ https://bugs.webkit.org/show_bug.cgi?id=48229
+
+ * wtf/Platform.h:
+
2010-10-25 Peter Rybin <peter.rybin at gmail.com>
Reviewed by Adam Barth.
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index e2aca61..79f194a 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -563,11 +563,6 @@
#define _INC_ASSERT /* disable "assert.h" */
#define assert(x)
-/* _countof is only included in CE6; for CE5 we need to define it ourself */
-#ifndef _countof
-#define _countof(x) (sizeof(x) / sizeof((x)[0]))
-#endif
-
#endif /* OS(WINCE) && !PLATFORM(QT) */
#if PLATFORM(QT)
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f0f461b..444b0ac 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,19 @@
+2010-10-25 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Replace _countof with WTF_ARRAY_LENGTH
+ https://bugs.webkit.org/show_bug.cgi?id=48229
+
+ * platform/win/FileSystemWin.cpp:
+ (WebCore::openTemporaryFile):
+ * platform/wince/FileSystemWinCE.cpp:
+ (WebCore::openTemporaryFile):
+ * plugins/win/PluginDatabaseWin.cpp:
+ (WebCore::addPluginPathsFromRegistry):
+ (WebCore::addWindowsMediaPlayerPluginDirectory):
+ (WebCore::addMacromediaPluginDirectories):
+
2010-10-25 David Hyatt <hyatt at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebCore/platform/win/FileSystemWin.cpp b/WebCore/platform/win/FileSystemWin.cpp
index 4b7a692..2cca08c 100644
--- a/WebCore/platform/win/FileSystemWin.cpp
+++ b/WebCore/platform/win/FileSystemWin.cpp
@@ -192,8 +192,8 @@ CString openTemporaryFile(const char*, PlatformFileHandle& handle)
handle = INVALID_HANDLE_VALUE;
char tempPath[MAX_PATH];
- int tempPathLength = ::GetTempPathA(_countof(tempPath), tempPath);
- if (tempPathLength <= 0 || tempPathLength > _countof(tempPath))
+ int tempPathLength = ::GetTempPathA(WTF_ARRAY_LENGTH(tempPath), tempPath);
+ if (tempPathLength <= 0 || tempPathLength > WTF_ARRAY_LENGTH(tempPath))
return CString();
HCRYPTPROV hCryptProv = 0;
diff --git a/WebCore/platform/wince/FileSystemWinCE.cpp b/WebCore/platform/wince/FileSystemWinCE.cpp
index 2a27089..90b278e 100644
--- a/WebCore/platform/wince/FileSystemWinCE.cpp
+++ b/WebCore/platform/wince/FileSystemWinCE.cpp
@@ -174,8 +174,8 @@ CString openTemporaryFile(const char*, PlatformFileHandle& handle)
handle = INVALID_HANDLE_VALUE;
wchar_t tempPath[MAX_PATH];
- int tempPathLength = ::GetTempPath(_countof(tempPath), tempPath);
- if (tempPathLength <= 0 || tempPathLength > _countof(tempPath))
+ int tempPathLength = ::GetTempPath(WTF_ARRAY_LENGTH(tempPath), tempPath);
+ if (tempPathLength <= 0 || tempPathLength > WTF_ARRAY_LENGTH(tempPath))
return CString();
HCRYPTPROV hCryptProv = 0;
diff --git a/WebCore/plugins/win/PluginDatabaseWin.cpp b/WebCore/plugins/win/PluginDatabaseWin.cpp
index 6cbcdc8..27121c6 100644
--- a/WebCore/plugins/win/PluginDatabaseWin.cpp
+++ b/WebCore/plugins/win/PluginDatabaseWin.cpp
@@ -34,10 +34,6 @@
#include <windows.h>
#include <shlwapi.h>
-#if COMPILER(MINGW)
-#define _countof(x) (sizeof(x)/sizeof(x[0]))
-#endif
-
#if OS(WINCE)
// WINCE doesn't support Registry Key Access Rights. The parameter should always be 0
#ifndef KEY_ENUMERATE_SUB_KEYS
@@ -96,7 +92,7 @@ static inline void addPluginPathsFromRegistry(HKEY rootKey, HashSet<String>& pat
// Enumerate subkeys
for (int i = 0;; i++) {
- DWORD nameLen = _countof(name);
+ DWORD nameLen = WTF_ARRAY_LENGTH(name);
result = RegEnumKeyExW(key, i, name, &nameLen, 0, 0, 0, &lastModified);
if (result != ERROR_SUCCESS)
@@ -257,9 +253,9 @@ static inline void addWindowsMediaPlayerPluginDirectory(Vector<String>& director
#if !OS(WINCE)
// The new WMP Firefox plugin is installed in \PFiles\Plugins if it can't find any Firefox installs
WCHAR pluginDirectoryStr[_MAX_PATH + 1];
- DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, _countof(pluginDirectoryStr));
+ DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(TEXT("%SYSTEMDRIVE%\\PFiles\\Plugins"), pluginDirectoryStr, WTF_ARRAY_LENGTH(pluginDirectoryStr));
- if (pluginDirectorySize > 0 && pluginDirectorySize <= _countof(pluginDirectoryStr))
+ if (pluginDirectorySize > 0 && pluginDirectorySize <= WTF_ARRAY_LENGTH(pluginDirectoryStr))
directories.append(String(pluginDirectoryStr, pluginDirectorySize - 1));
#endif
@@ -410,7 +406,7 @@ static inline void addMacromediaPluginDirectories(Vector<String>& directories)
#if !OS(WINCE)
WCHAR systemDirectoryStr[MAX_PATH];
- if (GetSystemDirectory(systemDirectoryStr, _countof(systemDirectoryStr)) == 0)
+ if (!GetSystemDirectory(systemDirectoryStr, WTF_ARRAY_LENGTH(systemDirectoryStr)))
return;
WCHAR macromediaDirectoryStr[MAX_PATH];
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 11055c3..b71e232 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2010-10-25 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Replace _countof with WTF_ARRAY_LENGTH
+ https://bugs.webkit.org/show_bug.cgi?id=48229
+
+ * WebCoreSupport/WebContextMenuClient.cpp:
+ (isPreInspectElementTagSafari):
+ * WebView.cpp:
+ (WebView::interpretKeyEvent):
+
2010-10-24 Dan Bernstein <mitz at apple.com>
Build fix.
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index ab1f79e..24178f2 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -60,7 +60,7 @@ static bool isPreInspectElementTagSafari(IWebUIDelegate* uiDelegate)
return false;
TCHAR modulePath[MAX_PATH];
- DWORD length = ::GetModuleFileName(0, modulePath, _countof(modulePath));
+ DWORD length = ::GetModuleFileName(0, modulePath, WTF_ARRAY_LENGTH(modulePath));
if (!length)
return false;
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index a6c3cb4..a3fb3a5 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -1833,10 +1833,10 @@ const char* WebView::interpretKeyEvent(const KeyboardEvent* evt)
keyDownCommandsMap = new HashMap<int, const char*>;
keyPressCommandsMap = new HashMap<int, const char*>;
- for (unsigned i = 0; i < _countof(keyDownEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyDownEntries); ++i)
keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name);
- for (unsigned i = 0; i < _countof(keyPressEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyPressEntries); ++i)
keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name);
}
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index 2e0585d..be2a4d8 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-25 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Replace _countof with WTF_ARRAY_LENGTH
+ https://bugs.webkit.org/show_bug.cgi?id=48229
+
+ * WebCoreSupport/EditorClientWinCE.cpp:
+ (WebKit::EditorClientWinCE::interpretKeyEvent):
+
2010-10-22 Sam Weinig <sam at webkit.org>
Reviewed by Anders Carlsson.
diff --git a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
index b9e6fb1..7dee562 100644
--- a/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp
@@ -313,10 +313,10 @@ const char* EditorClientWinCE::interpretKeyEvent(const KeyboardEvent* event)
keyDownCommandsMap = new HashMap<int, const char*>;
keyPressCommandsMap = new HashMap<int, const char*>;
- for (unsigned i = 0; i < _countof(keyDownEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyDownEntries); ++i)
keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name);
- for (unsigned i = 0; i < _countof(keyPressEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyPressEntries); ++i)
keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name);
}
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bc93e72..1e0434a 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,22 @@
+2010-10-25 Patrick Gansterer <paroga at webkit.org>
+
+ Reviewed by David Kilzer.
+
+ Replace _countof with WTF_ARRAY_LENGTH
+ https://bugs.webkit.org/show_bug.cgi?id=48229
+
+ * UIProcess/Launcher/win/ProcessLauncherWin.cpp:
+ (WebKit::ProcessLauncher::launchProcess):
+ * UIProcess/Plugins/win/PluginInfoStoreWin.cpp:
+ (WebKit::safariPluginsDirectory):
+ (WebKit::addMozillaPluginDirectories):
+ (WebKit::addWindowsMediaPlayerPluginDirectory):
+ (WebKit::addAdobeAcrobatPluginDirectory):
+ (WebKit::addMacromediaPluginDirectories):
+ (WebKit::addPluginPathsFromRegistry):
+ * WebProcess/WebPage/win/WebPageWin.cpp:
+ (WebKit::WebPage::interpretKeyEvent):
+
2010-10-25 Adam Roben <aroben at apple.com>
Stop copying .messages.in files into WebKit2's framework bundle
diff --git a/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp b/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
index a1c9aaf..f12e492 100644
--- a/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
+++ b/WebKit2/UIProcess/Launcher/win/ProcessLauncherWin.cpp
@@ -64,7 +64,7 @@ void ProcessLauncher::launchProcess()
return;
WCHAR pathStr[MAX_PATH];
- if (!::GetModuleFileNameW(webKitModule, pathStr, _countof(pathStr)))
+ if (!::GetModuleFileNameW(webKitModule, pathStr, WTF_ARRAY_LENGTH(pathStr)))
return;
::PathRemoveFileSpecW(pathStr);
diff --git a/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp b/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp
index 645b4c0..d5ae037 100644
--- a/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp
+++ b/WebKit2/UIProcess/Plugins/win/PluginInfoStoreWin.cpp
@@ -82,9 +82,9 @@ static inline String safariPluginsDirectory()
cachedPluginDirectory = true;
WCHAR moduleFileNameStr[MAX_PATH];
- int moduleFileNameLen = ::GetModuleFileNameW(0, moduleFileNameStr, _countof(moduleFileNameStr));
+ int moduleFileNameLen = ::GetModuleFileNameW(0, moduleFileNameStr, WTF_ARRAY_LENGTH(moduleFileNameStr));
- if (!moduleFileNameLen || moduleFileNameLen == _countof(moduleFileNameStr))
+ if (!moduleFileNameLen || moduleFileNameLen == WTF_ARRAY_LENGTH(moduleFileNameStr))
return pluginsDirectory;
if (!::PathRemoveFileSpecW(moduleFileNameStr))
@@ -109,7 +109,7 @@ static inline void addMozillaPluginDirectories(Vector<String>& directories)
// Enumerate subkeys
for (int i = 0;; i++) {
- DWORD nameLen = _countof(name);
+ DWORD nameLen = WTF_ARRAY_LENGTH(name);
result = ::RegEnumKeyExW(key, i, name, &nameLen, 0, 0, 0, &lastModified);
if (result != ERROR_SUCCESS)
@@ -143,9 +143,9 @@ static inline void addWindowsMediaPlayerPluginDirectory(Vector<String>& director
{
// The new WMP Firefox plugin is installed in \PFiles\Plugins if it can't find any Firefox installs
WCHAR pluginDirectoryStr[MAX_PATH + 1];
- DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(L"%SYSTEMDRIVE%\\PFiles\\Plugins", pluginDirectoryStr, _countof(pluginDirectoryStr));
+ DWORD pluginDirectorySize = ::ExpandEnvironmentStringsW(L"%SYSTEMDRIVE%\\PFiles\\Plugins", pluginDirectoryStr, WTF_ARRAY_LENGTH(pluginDirectoryStr));
- if (pluginDirectorySize > 0 && pluginDirectorySize <= _countof(pluginDirectoryStr))
+ if (pluginDirectorySize > 0 && pluginDirectorySize <= WTF_ARRAY_LENGTH(pluginDirectoryStr))
directories.append(String(pluginDirectoryStr, pluginDirectorySize - 1));
DWORD type;
@@ -187,7 +187,7 @@ static inline void addAdobeAcrobatPluginDirectory(Vector<String>& directories)
// Enumerate subkeys
for (int i = 0;; i++) {
- DWORD nameLen = _countof(name);
+ DWORD nameLen = WTF_ARRAY_LENGTH(name);
result = ::RegEnumKeyExW(key, i, name, &nameLen, 0, 0, 0, &lastModified);
if (result != ERROR_SUCCESS)
@@ -222,7 +222,7 @@ static inline void addMacromediaPluginDirectories(Vector<String>& directories)
#if !OS(WINCE)
WCHAR systemDirectoryStr[MAX_PATH];
- if (!::GetSystemDirectoryW(systemDirectoryStr, _countof(systemDirectoryStr)))
+ if (!::GetSystemDirectoryW(systemDirectoryStr, WTF_ARRAY_LENGTH(systemDirectoryStr)))
return;
WCHAR macromediaDirectoryStr[MAX_PATH];
@@ -312,7 +312,7 @@ static void addPluginPathsFromRegistry(HKEY rootKey, Vector<String>& paths)
for (size_t i = 0; ; ++i) {
// MSDN says that key names have a maximum length of 255 characters.
wchar_t name[256];
- DWORD nameLen = _countof(name);
+ DWORD nameLen = WTF_ARRAY_LENGTH(name);
if (::RegEnumKeyExW(key, i, name, &nameLen, 0, 0, 0, 0) != ERROR_SUCCESS)
break;
diff --git a/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp b/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
index bbe2186..526474a 100644
--- a/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
+++ b/WebKit2/WebProcess/WebPage/win/WebPageWin.cpp
@@ -157,10 +157,10 @@ const char* WebPage::interpretKeyEvent(const KeyboardEvent* evt)
keyDownCommandsMap = new HashMap<int, const char*>;
keyPressCommandsMap = new HashMap<int, const char*>;
- for (unsigned i = 0; i < _countof(keyDownEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyDownEntries); ++i)
keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name);
- for (unsigned i = 0; i < _countof(keyPressEntries); i++)
+ for (size_t i = 0; i < WTF_ARRAY_LENGTH(keyPressEntries); ++i)
keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name);
}
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list