<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)"
href="https://bugs.webkit.org/show_bug.cgi?id=144560#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Fix combinations of PLATFORM(GTK) and OS(DARWIN)"
href="https://bugs.webkit.org/show_bug.cgi?id=144560">bug 144560</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=252836&action=diff" name="attach_252836" title="Patch">attachment 252836</a> <a href="attachment.cgi?id=252836&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=252836&action=review">https://bugs.webkit.org/attachment.cgi?id=252836&action=review</a>
Most of those OS(DARWIN) -> PLATFORM(COCOA) changes don’t seem right to me. I added comments about a few of them. Others sound comment on the use inside WebKit2.
<span class="quote">> Source/WTF/wtf/WorkQueue.h:39
> -#if OS(DARWIN)
> +#if PLATFORM(COCOA)
> #include <dispatch/dispatch.h>
> #endif</span >
It’s a little sad to go in this direction. Better to use the OS ones than the PLATFORM ones whenever possible.
<span class="quote">> Source/WTF/wtf/WorkQueue.h:76
> -#if OS(DARWIN)
> +#if PLATFORM(COCOA)
> dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
> #elif PLATFORM(GTK)</span >
Better to just put PLATFORM(GTK) first.
<span class="quote">> Source/WTF/wtf/WorkQueue.h:106
> -#if OS(DARWIN)
> +#if PLATFORM(COCOA)
> static void executeFunction(void*);
> dispatch_queue_t m_dispatchQueue;
> #elif PLATFORM(GTK)</span >
Better to just put PLATFORM(GTK) first.
<span class="quote">> Source/WebCore/platform/graphics/PlatformDisplay.cpp:49
> #if PLATFORM(GTK)
> +#include <gdk/gdk.h>
> +#if ENABLE(X11_TARGET)
> #include <gdk/gdkx.h>
> #endif
> +#endif</span >
To keep includes clean we prefer this style:
#if PLATFORM(GTK)
#include <gdk/gdk.h>
#endif
#if PLATFORM(GTK) && ENABLE(X11_TARGET)
#ijnclude <gdk/gdkx.h>
#endif
The nested includes are harder to read and have no other obvious advantages.
<span class="quote">> Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp:45
> +#if PLATFORM(COCOA)
> const FourCharCode MATHTag = 'MATH';
> #else</span >
Just get rid of this and use the other version everywhere, including Cocoa/Darwin.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>