Bug 63475

Summary: Use specific headers includes rather than full system headers.
Product: WebKit Reporter: Alexis Menard (darktears) <menard>
Component: New BugsAssignee: Alexis Menard (darktears) <menard>
Status: RESOLVED FIXED    
Severity: Normal CC: darin, eric.carlson, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Alexis Menard (darktears) 2011-06-27 13:14:57 PDT
Use specific headers includes rather than full system headers.
Comment 1 Alexis Menard (darktears) 2011-06-27 13:18:15 PDT
Created attachment 98773 [details]
Patch
Comment 2 Darin Adler 2011-06-27 13:28:25 PDT
Comment on attachment 98773 [details]
Patch

Is there a concrete benefit to this change? I ask, because due to the way precompiled headers and such work, the other teams at Apple have told us that best practice is to include the complete header, not the specific headers, for system frameworks like these.
Comment 3 Alexis Menard (darktears) 2011-06-27 13:30:54 PDT
(In reply to comment #2)
> (From update of attachment 98773 [details])
> Is there a concrete benefit to this change? I ask, because due to the way precompiled headers and such work, the other teams at Apple have told us that best practice is to include the complete header, not the specific headers, for system frameworks like these.

Quoting Sam Weinig who send me an email :

"The inclusion of <Cocoa/Cocoa.h> in header files seems really suspect here.  I have been trying to remove as many full system header inclusions as possible, and this seems like a step in the wrong direction."
Comment 4 Darin Adler 2011-06-27 13:33:43 PDT
Comment on attachment 98773 [details]
Patch

OK. If Sam says this is the right thing to do, I guess that’s OK.
Comment 5 WebKit Review Bot 2011-06-27 14:23:44 PDT
Comment on attachment 98773 [details]
Patch

Clearing flags on attachment: 98773

Committed r89858: <http://trac.webkit.org/changeset/89858>
Comment 6 WebKit Review Bot 2011-06-27 14:23:48 PDT
All reviewed patches have been landed.  Closing bug.