Title: [207136] trunk/Source/WebCore
Revision
207136
Author
[email protected]
Date
2016-10-11 07:09:51 -0700 (Tue, 11 Oct 2016)

Log Message

[Win] Compile fix.
https://bugs.webkit.org/show_bug.cgi?id=163272

Reviewed by Brent Fulgham.

When compiling with older SDKs, some CoreText symbols are redefined.
This patch checks if the relevant CoreText header file has been
included before defining the symbol.

* platform/spi/win/CoreTextSPIWin.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (207135 => 207136)


--- trunk/Source/WebCore/ChangeLog	2016-10-11 14:06:29 UTC (rev 207135)
+++ trunk/Source/WebCore/ChangeLog	2016-10-11 14:09:51 UTC (rev 207136)
@@ -1,3 +1,16 @@
+2016-10-11  Per Arne Vollan  <[email protected]>
+
+        [Win] Compile fix.
+        https://bugs.webkit.org/show_bug.cgi?id=163272
+
+        Reviewed by Brent Fulgham.
+
+        When compiling with older SDKs, some CoreText symbols are redefined.
+        This patch checks if the relevant CoreText header file has been
+        included before defining the symbol.
+
+        * platform/spi/win/CoreTextSPIWin.h:
+
 2016-10-11  Antoine Quint  <[email protected]>
 
         [Modern Media Controls] Buttons container

Modified: trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h (207135 => 207136)


--- trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h	2016-10-11 14:06:29 UTC (rev 207135)
+++ trunk/Source/WebCore/platform/spi/win/CoreTextSPIWin.h	2016-10-11 14:09:51 UTC (rev 207136)
@@ -27,8 +27,7 @@
 
 #include <CoreFoundation/CoreFoundation.h>
 #include <CoreGraphics/CoreGraphics.h>
-#include <CoreText/CTDefines.h>
-#include <CoreText/CTFontDescriptor.h>
+#include <CoreText/CoreText.h>
 
 WTF_EXTERN_C_BEGIN
 
@@ -40,11 +39,14 @@
 CT_EXPORT const CFStringRef kCTFontAttributeName;
 CT_EXPORT const CFStringRef kCTForegroundColorFromContextAttributeName;
 
+// This enum is defined in CTFont.h. To avoid redefinition, only define it here if CTFont.h has not been included. 
+#ifndef __CTFONT__
 typedef CF_OPTIONS(uint32_t, CTFontTableOptions)
 {
     kCTFontTableOptionNoOptions = 0,
     kCTFontTableOptionExcludeSynthetic = (1 << 0)
 };
+#endif
 
 CTFontRef CTFontCreateWithName(CFStringRef, CGFloat size, const CGAffineTransform*);
 CTFontRef CTFontCreateWithGraphicsFont(CGFontRef, CGFloat size, const CGAffineTransform*, CTFontDescriptorRef attributes);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to