From 0e18bf4e2dd93dadf7f42589e0e2802cbf3ba7dd Mon Sep 17 00:00:00 2001 From: "darin@apple.com" Date: Thu, 6 Jan 2011 07:16:02 +0000 Subject: [PATCH] Fix Chromium Mac build. * platform/graphics/Gradient.h: Forward-declare CGContextRef. This might even make it possible to remove the include of for PLATFORM(WIN), but I did not do that at this time because I don't want to break the Windows build when fixing the Chromium build. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75145 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 10 ++++++++++ WebCore/platform/graphics/Gradient.h | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 31413f45928c..3a505793220d 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2011-01-05 Darin Adler + + Fix Chromium Mac build. + + * platform/graphics/Gradient.h: Forward-declare CGContextRef. + This might even make it possible to remove the include of + for PLATFORM(WIN), but I did not + do that at this time because I don't want to break the Windows + build when fixing the Chromium build. + 2011-01-05 Xianzhu Wang Reviewed by David Levin. diff --git a/WebCore/platform/graphics/Gradient.h b/WebCore/platform/graphics/Gradient.h index 4d5cdc6148fa..9f7ccb2677e3 100644 --- a/WebCore/platform/graphics/Gradient.h +++ b/WebCore/platform/graphics/Gradient.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008, 2011 Apple Inc. All rights reserved. * Copyright (C) 2007 Alp Toker * Copyright (C) 2008 Torch Mobile, Inc. * @@ -41,6 +41,8 @@ #if PLATFORM(CG) +typedef struct CGContext* CGContextRef; + #define USE_CG_SHADING defined(BUILDING_ON_TIGER) || defined(BUILDING_ON_LEOPARD) #if USE_CG_SHADING @@ -115,6 +117,7 @@ namespace WebCore { #else PlatformGradient platformGradient(); #endif + struct ColorStop { float stop; float red; @@ -143,6 +146,7 @@ namespace WebCore { void paint(CGContextRef); void paint(GraphicsContext*); #endif + private: Gradient(const FloatPoint& p0, const FloatPoint& p1); Gradient(const FloatPoint& p0, float r0, const FloatPoint& p1, float r1, float aspectRatio); -- 2.36.0