[Webkit-unassigned] [Bug 23027] Switch to more portable PlatformGraphicsContext types in WebKit.dll API

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 30 17:05:35 PST 2008


https://bugs.webkit.org/show_bug.cgi?id=23027





------- Comment #4 from darin at apple.com  2008-12-30 17:05 PDT -------
(In reply to comment #3)
> This shouldn't change anything, or at least it builds and compiles using CG or
> Cairo.
> 
> The only thing that is changing here is that rather than directly using the
> CGContext type directly, we are using a typedef that is either CGContext (for
> CG based WebKit.dll), or cairo_t (for Cairo-backed WebKit.dll).
> 
> There is no change in functionality, data types, etc.
> 
> I included WebCore/GraphicsContext.h because it provides a convenient set of
> typedefs for these types, conditionalized by the platform in use.
> 
> An alternative patch would just #if/def in the header file and typedef to
> CGContext or cairo_t.

Now I understand.

This still won't work as-is. The platform conditionals are not visible outside
the project, so we can't use #ifdef in public headers used by clients. The
conditionals control how WebKit is built, but don't need to be set by all
programs using WebKit.

Instead, we need to either completely avoid these types in public header files,
use two copies of the relevant source files, or generate the relevant files.

For this specific example, I suggest you consider treating these headers as
Safari-only features and not bother to try to make non-CoreGraphics versions of
them. There's no general requirement to have these WebKitGraphics.h functions
for general purpose WebKit clients.

But if you do want to create non-CoreGraphics versions it's fine -- we just
need to either implement the "two copies of headers" design or the "generate
headers" design.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list