[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
sfalken at apple.com
sfalken at apple.com
Wed Dec 22 11:20:23 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 35de2069f35122e20f114b1f48acbd1b51f1e6bc
Author: sfalken at apple.com <sfalken at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Jul 20 03:00:27 2010 +0000
Windows Build fixes for new ColorSync API.
We support both new and old APIs, since the newer headers aren't in the tree yet.
* WebCorePrefix.h: Removed include of CoreServices.h. Included via ColorSyncPriv.h instead, since header may not be present.
* platform/graphics/cg/ColorCG.cpp:
(WebCore::createCGColor): Conditionally use new ColorSync API.
* platform/graphics/opentype/OpenTypeUtilities.cpp: Define Fixed if CoreServices.h doesn't.
* platform/graphics/win/GraphicsLayerCACF.cpp:
(WebCore::GraphicsLayerCACF::updateLayerDrawsContent): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
* platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Include AssertMacros.h.
* platform/network/cf/ResourceErrorCF.cpp:
(WebCore::ResourceError::operator CFErrorRef): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@63709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 43c745f..2cad9db 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-07-19 Steve Falkenburg <sfalken at apple.com>
+
+ Windows Build fixes for new ColorSync API.
+ We support both new and old APIs, since the newer headers aren't in the tree yet.
+
+ * WebCorePrefix.h: Removed include of CoreServices.h. Included via ColorSyncPriv.h instead, since header may not be present.
+ * platform/graphics/cg/ColorCG.cpp:
+ (WebCore::createCGColor): Conditionally use new ColorSync API.
+ * platform/graphics/opentype/OpenTypeUtilities.cpp: Define Fixed if CoreServices.h doesn't.
+ * platform/graphics/win/GraphicsLayerCACF.cpp:
+ (WebCore::GraphicsLayerCACF::updateLayerDrawsContent): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
+ * platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp: Include AssertMacros.h.
+ * platform/network/cf/ResourceErrorCF.cpp:
+ (WebCore::ResourceError::operator CFErrorRef): Use 0 instead of nil, since nil is no longer present via CoreServices.h.
+
2010-07-19 Tony Gentilcore <tonyg at chromium.org>
Reviewed by Dimitri Glazkov.
diff --git a/WebCore/WebCorePrefix.h b/WebCore/WebCorePrefix.h
index db79bad..017a483 100644
--- a/WebCore/WebCorePrefix.h
+++ b/WebCore/WebCorePrefix.h
@@ -133,12 +133,20 @@
#include <windows.h>
#include <stdio.h>
#else
-#include <CoreServices/CoreServices.h>
#if defined(WIN32) || defined(_WIN32)
-/* Including CoreServices.h on Windows doesn't include CFNetwork.h, so we do
+// FIXME <rdar://problem/8208868> Remove support for obsolete ColorSync API, CoreServices header in CoreGraphics
+// We can remove this once the new ColorSync APIs are available in an internal Safari SDK.
+#include <ColorSync/ColorSyncPriv.h>
+#ifdef COLORSYNC_CORE_SERVICES_H_
+#define COREGRAPHICS_INCLUDES_CORESERVICES_HEADER
+#define OBSOLETE_COLORSYNC_API
+#endif
+/* Windows doesn't include CFNetwork.h via CoreServices.h, so we do
it explicitly here to make Windows more consistent with Mac. */
#include <CFNetwork/CFNetwork.h>
+#else
+#include <CoreServices/CoreServices.h>
#endif
#endif
diff --git a/WebCore/platform/graphics/cg/ColorCG.cpp b/WebCore/platform/graphics/cg/ColorCG.cpp
index e514fa3..9257642 100644
--- a/WebCore/platform/graphics/cg/ColorCG.cpp
+++ b/WebCore/platform/graphics/cg/ColorCG.cpp
@@ -73,10 +73,14 @@ Color::Color(CGColorRef color)
CGColorRef createCGColor(const Color& c)
{
CGColorRef color = NULL;
+#ifdef OBSOLETE_COLORSYNC_API
CMProfileRef prof = NULL;
CMGetSystemProfile(&prof);
-
RetainPtr<CGColorSpaceRef> rgbSpace(AdoptCF, CGColorSpaceCreateWithPlatformColorSpace(prof));
+#else
+ ColorSyncProfileRef prof = ColorSyncProfileCreateWithDisplayID(0);
+ RetainPtr<CGColorSpaceRef> rgbSpace(AdoptCF, CGColorSpaceCreateWithPlatformColorSpace(const_cast<void*>(reinterpret_cast<const void*>(prof))));
+#endif
if (rgbSpace) {
CGFloat components[4] = { static_cast<CGFloat>(c.red()) / 255, static_cast<CGFloat>(c.green()) / 255,
@@ -84,7 +88,12 @@ CGColorRef createCGColor(const Color& c)
color = CGColorCreate(rgbSpace.get(), components);
}
+#ifdef OBSOLETE_COLORSYNC_API
CMCloseProfile(prof);
+#else
+ if (prof)
+ CFRelease(prof);
+#endif
return color;
}
diff --git a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
index 12ae09d..7f4547d 100644
--- a/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
+++ b/WebCore/platform/graphics/opentype/OpenTypeUtilities.cpp
@@ -70,8 +70,8 @@ struct TableDirectoryEntry {
BigEndianULong length;
};
-#if !PLATFORM(CG)
-// Fixed type is not defined on non-CG platforms. |version| in sfntHeader
+#if !PLATFORM(CG) || !defined(COREGRAPHICS_INCLUDES_CORESERVICES_HEADER)
+// Fixed type is not defined on non-CG and Windows platforms. |version| in sfntHeader
// and headTable and |fontRevision| in headTable are of Fixed, but they're
// not actually refered to anywhere. Therefore, we just have to match
// the size (4 bytes). For the definition of Fixed type, see
diff --git a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
index 20d76ef..96ac0c1 100644
--- a/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
+++ b/WebCore/platform/graphics/win/GraphicsLayerCACF.cpp
@@ -669,7 +669,7 @@ void GraphicsLayerCACF::updateLayerDrawsContent()
if (m_drawsContent)
m_layer->setNeedsDisplay();
else
- m_layer->setContents(nil);
+ m_layer->setContents(0);
updateDebugIndicators();
}
diff --git a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
index aa7bdd4..e0ecf78 100644
--- a/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
+++ b/WebCore/platform/graphics/win/MediaPlayerPrivateQuickTimeVisualContext.cpp
@@ -46,6 +46,7 @@
#include "StringHash.h"
#include "TimeRanges.h"
#include "Timer.h"
+#include <AssertMacros.h>
#include <CoreGraphics/CGContext.h>
#include <Wininet.h>
#include <wtf/CurrentTime.h>
diff --git a/WebCore/platform/network/cf/ResourceErrorCF.cpp b/WebCore/platform/network/cf/ResourceErrorCF.cpp
index dacc68b..1eba97e 100644
--- a/WebCore/platform/network/cf/ResourceErrorCF.cpp
+++ b/WebCore/platform/network/cf/ResourceErrorCF.cpp
@@ -115,7 +115,7 @@ ResourceError::operator CFErrorRef() const
{
if (m_isNull) {
ASSERT(!m_platformError);
- return nil;
+ return 0;
}
if (!m_platformError) {
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list