<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&#64;apple.com" title="Darin Adler &lt;darin&#64;apple.com&gt;"> <span class="fn">Darin Adler</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=252836&amp;action=diff" name="attach_252836" title="Patch">attachment 252836</a> <a href="attachment.cgi?id=252836&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=252836&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=252836&amp;action=review</a>

Most of those OS(DARWIN) -&gt; 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">&gt; Source/WTF/wtf/WorkQueue.h:39
&gt; -#if OS(DARWIN)
&gt; +#if PLATFORM(COCOA)
&gt;  #include &lt;dispatch/dispatch.h&gt;
&gt;  #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">&gt; Source/WTF/wtf/WorkQueue.h:76
&gt; -#if OS(DARWIN)
&gt; +#if PLATFORM(COCOA)
&gt;      dispatch_queue_t dispatchQueue() const { return m_dispatchQueue; }
&gt;  #elif PLATFORM(GTK)</span >

Better to just put PLATFORM(GTK) first.

<span class="quote">&gt; Source/WTF/wtf/WorkQueue.h:106
&gt; -#if OS(DARWIN)
&gt; +#if PLATFORM(COCOA)
&gt;      static void executeFunction(void*);
&gt;      dispatch_queue_t m_dispatchQueue;
&gt;  #elif PLATFORM(GTK)</span >

Better to just put PLATFORM(GTK) first.

<span class="quote">&gt; Source/WebCore/platform/graphics/PlatformDisplay.cpp:49
&gt;  #if PLATFORM(GTK)
&gt; +#include &lt;gdk/gdk.h&gt;
&gt; +#if ENABLE(X11_TARGET)
&gt;  #include &lt;gdk/gdkx.h&gt;
&gt;  #endif
&gt; +#endif</span >

To keep includes clean we prefer this style:

    #if PLATFORM(GTK)
    #include &lt;gdk/gdk.h&gt;
    #endif

    #if PLATFORM(GTK) &amp;&amp; ENABLE(X11_TARGET)
    #ijnclude &lt;gdk/gdkx.h&gt;
    #endif

The nested includes are harder to read and have no other obvious advantages.

<span class="quote">&gt; Source/WebCore/platform/graphics/opentype/OpenTypeMathData.cpp:45
&gt; +#if PLATFORM(COCOA)
&gt;  const FourCharCode MATHTag = 'MATH';
&gt;  #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>