[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.16-1409-g5afdf4d
eric at webkit.org
eric at webkit.org
Thu Dec 3 13:20:19 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 67d597d826d969d8a3561b3cb158672a3e52e19c
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Oct 27 10:17:36 2009 +0000
2009-10-27 Laszlo Gombos <laszlo.1.gombos at nokia.com>
Reviewed by Antti Koivisto.
Fix QtWebKit build for WIN_OS if Netscape plug-in support
is turned off and refactor some related code
https://bugs.webkit.org/show_bug.cgi?id=30786
No new tests as there is no new functionality introduced.
* platform/FileSystem.h: Refactor to make sure that each different
type definition is only repeated once.
* plugins/PluginPackage.cpp:
(WebCore::PluginPackage::compareFileVersion): Move it out from the
ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH guard and combine it with the
function body from PluginPackageWin.
* plugins/win/PluginPackageWin.cpp: Remove compareFileVersion as
it is now in PluginPackage.cpp.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50138 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 087433f..9d7f36b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,24 @@
+2009-10-27 Laszlo Gombos <laszlo.1.gombos at nokia.com>
+
+ Reviewed by Antti Koivisto.
+
+ Fix QtWebKit build for WIN_OS if Netscape plug-in support
+ is turned off and refactor some related code
+ https://bugs.webkit.org/show_bug.cgi?id=30786
+
+ No new tests as there is no new functionality introduced.
+
+ * platform/FileSystem.h: Refactor to make sure that each different
+ type definition is only repeated once.
+
+ * plugins/PluginPackage.cpp:
+ (WebCore::PluginPackage::compareFileVersion): Move it out from the
+ ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH guard and combine it with the
+ function body from PluginPackageWin.
+
+ * plugins/win/PluginPackageWin.cpp: Remove compareFileVersion as
+ it is now in PluginPackage.cpp.
+
2009-10-26 Xan Lopez <xlopez at igalia.com>
Reviewed by Gustavo Noronha.
diff --git a/WebCore/platform/FileSystem.h b/WebCore/platform/FileSystem.h
index 958eb73..9952b39 100644
--- a/WebCore/platform/FileSystem.h
+++ b/WebCore/platform/FileSystem.h
@@ -65,15 +65,23 @@ namespace WebCore {
class CString;
-#if PLATFORM(QT)
-
-typedef QFile* PlatformFileHandle;
-const PlatformFileHandle invalidPlatformFileHandle = 0;
+// PlatformModule
+#if PLATFORM(WIN_OS)
+typedef HMODULE PlatformModule;
+#elif PLATFORM(QT)
#if defined(Q_WS_MAC)
typedef CFBundleRef PlatformModule;
-typedef unsigned PlatformModuleVersion;
-#elif defined(Q_OS_WIN)
-typedef HMODULE PlatformModule;
+#else
+typedef QLibrary* PlatformModule;
+#endif // defined(Q_WS_MAC)
+#elif PLATFORM(GTK)
+typedef GModule* PlatformModule;
+#else
+typedef void* PlatformModule;
+#endif
+
+// PlatformModuleVersion
+#if PLATFORM(WIN_OS)
struct PlatformModuleVersion {
unsigned leastSig;
unsigned mostSig;
@@ -92,44 +100,21 @@ struct PlatformModuleVersion {
};
#else
-typedef QLibrary* PlatformModule;
typedef unsigned PlatformModuleVersion;
#endif
+// PlatformFileHandle
+#if PLATFORM(QT)
+typedef QFile* PlatformFileHandle;
+const PlatformFileHandle invalidPlatformFileHandle = 0;
#elif PLATFORM(WIN_OS)
typedef HANDLE PlatformFileHandle;
-typedef HMODULE PlatformModule;
// FIXME: -1 is INVALID_HANDLE_VALUE, defined in <winbase.h>. Chromium tries to
// avoid using Windows headers in headers. We'd rather move this into the .cpp.
const PlatformFileHandle invalidPlatformFileHandle = reinterpret_cast<HANDLE>(-1);
-
-struct PlatformModuleVersion {
- unsigned leastSig;
- unsigned mostSig;
-
- PlatformModuleVersion(unsigned)
- : leastSig(0)
- , mostSig(0)
- {
- }
-
- PlatformModuleVersion(unsigned lsb, unsigned msb)
- : leastSig(lsb)
- , mostSig(msb)
- {
- }
-
-};
#else
typedef int PlatformFileHandle;
-#if PLATFORM(GTK)
-typedef GModule* PlatformModule;
-#else
-typedef void* PlatformModule;
-#endif
const PlatformFileHandle invalidPlatformFileHandle = -1;
-
-typedef unsigned PlatformModuleVersion;
#endif
bool fileExists(const String&);
diff --git a/WebCore/plugins/PluginPackage.cpp b/WebCore/plugins/PluginPackage.cpp
index 19337f0..8f2dfa9 100644
--- a/WebCore/plugins/PluginPackage.cpp
+++ b/WebCore/plugins/PluginPackage.cpp
@@ -319,15 +319,24 @@ bool PluginPackage::equal(const PluginPackage& a, const PluginPackage& b)
{
return a.m_description == b.m_description;
}
+#endif
int PluginPackage::compareFileVersion(const PlatformModuleVersion& compareVersion) const
{
// return -1, 0, or 1 if plug-in version is less than, equal to, or greater than
// the passed version
+
+#if PLATFORM(WIN_OS)
+ if (m_moduleVersion.mostSig != compareVersion.mostSig)
+ return m_moduleVersion.mostSig > compareVersion.mostSig ? 1 : -1;
+ if (m_moduleVersion.leastSig != compareVersion.leastSig)
+ return m_moduleVersion.leastSig > compareVersion.leastSig ? 1 : -1;
+#else
if (m_moduleVersion != compareVersion)
return m_moduleVersion > compareVersion ? 1 : -1;
+#endif
+
return 0;
}
-#endif
}
diff --git a/WebCore/plugins/win/PluginPackageWin.cpp b/WebCore/plugins/win/PluginPackageWin.cpp
index e6fb9d5..dc9ec17 100644
--- a/WebCore/plugins/win/PluginPackageWin.cpp
+++ b/WebCore/plugins/win/PluginPackageWin.cpp
@@ -56,17 +56,6 @@ static String getVersionInfo(const LPVOID versionInfoData, const String& info)
return String(reinterpret_cast<UChar*>(buffer), bufferLength - 1);
}
-int PluginPackage::compareFileVersion(const PlatformModuleVersion& compareVersion) const
-{
- // return -1, 0, or 1 if plug-in version is less than, equal to, or greater than
- // the passed version
- if (m_moduleVersion.mostSig != compareVersion.mostSig)
- return m_moduleVersion.mostSig > compareVersion.mostSig ? 1 : -1;
- if (m_moduleVersion.leastSig != compareVersion.leastSig)
- return m_moduleVersion.leastSig > compareVersion.leastSig ? 1 : -1;
- return 0;
-}
-
bool PluginPackage::isPluginBlacklisted()
{
if (name() == "Citrix ICA Client") {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list