Bug 128404 - Stop using PLATFORM(MAC) in WebCore/platform except where it means “OS X but not iOS”
Summary: Stop using PLATFORM(MAC) in WebCore/platform except where it means “OS X but ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: mitz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-07 15:02 PST by mitz
Modified: 2014-02-08 09:37 PST (History)
13 users (show)

See Also:


Attachments
Replace PLATFORM(MAC) with equivalent alternatives (101.15 KB, patch)
2014-02-07 15:25 PST, mitz
andersca: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2014-02-07 15:02:30 PST
So that we can make PLATFORM(MAC) false when building for iOS, we need to replace all uses of it that don’t take iOS into account. Most such uses are about building for Cocoa.
Comment 1 mitz 2014-02-07 15:25:39 PST
Created attachment 223503 [details]
Replace PLATFORM(MAC) with equivalent alternatives
Comment 2 Anders Carlsson 2014-02-07 15:30:29 PST
Comment on attachment 223503 [details]
Replace PLATFORM(MAC) with equivalent alternatives

View in context: https://bugs.webkit.org/attachment.cgi?id=223503&action=review

> Source/WebCore/platform/graphics/IntRect.h:196
> +#if PLATFORM(MAC) && !PLATFORM(IOS) &&!defined(NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES)

&&!defined

> Source/WebCore/platform/mac/WebCoreSystemInterface.h:68
> +#if PLATFORM(COCOA) && USE(CA)

Is USE(CA) even needed here.
Comment 3 Darin Adler 2014-02-08 07:09:44 PST
Comment on attachment 223503 [details]
Replace PLATFORM(MAC) with equivalent alternatives

How did you choose between PLATFORM(COCOA) and USE(APPKIT)?
Comment 4 mitz 2014-02-08 09:37:24 PST
(In reply to comment #3)
> (From update of attachment 223503 [details])
> How did you choose between PLATFORM(COCOA) and USE(APPKIT)?

Those aren’t interchangeable: USE(APPKIT) is true only on Mac. I used it in two places: once around a header import, when the header was subsequently used under USE(CG) and USE(APPKIT) conditions; the other was around a forward-declaration of the AppKit class NSImage. That change caused trouble because some WebKit code that was compiling for iOS relied on that class declaration, so I had to fix WebKit in <http://trac.webkit.org/r163660>.

Oh, and this change itself was committed in <http://trac.webkit.org/r163657> with another build fix in <http://trac.webkit.org/r163658>.