Bug 3761

Summary: Code Cleanup: Remove all uncessary #include statements from .h files
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Enhancement CC: akshay1992kalbhor, ddkilzer, ggaren, Hironori.Fujii, ian, sam
Priority: P3    
Version: 412   
Hardware: Mac   
OS: OS X 10.4   
Bug Depends on: 4749, 31964    
Bug Blocks: 31965, 31966, 40350    
Attachments:
Description Flags
please ignore none

Description Eric Seidel (no email) 2005-06-29 00:56:25 PDT
Code Cleanup:  Remove all uncessary #include statements from .h files

Many, many, many kwq (and khtml) files have uncessary #include statements in the headers, which causes 
massive compile-time dependencies... meaning that a single change in kwq header basically amounts to 
rebuilding all of WebCore (due to the header cascade.

It would be really nice to see this cleaned up.  I will eventually get around to it if noone else does.. but in 
case new WebCore hackers are looking for something easy (and useful), this is such a bug.
Comment 1 Eric Seidel (no email) 2005-06-29 00:58:33 PDT
To be clear:

This means replacing things like:

#include <qstring.h>
with
class QString;
instead.

This is only possible when QString is neither returned from a function in the class, nor used as an 
instance variable on the class itself.
Comment 2 Arthur Langereis 2005-08-27 17:21:08 PDT
Created attachment 3611 [details]
please ignore

This is my proposed patch to add support for optional identifiers to function
expression statements. This is my first ever cvs patch, so please excuse any
mistakes.
Comment 3 Arthur Langereis 2005-08-27 17:24:20 PDT
Comment on attachment 3611 [details]
please ignore

Sorry, sorry, wrong bugreport! Never mind my comments
Comment 4 Jussi Hagman 2005-08-27 17:46:33 PDT
(In reply to comment #0)
> in  case new WebCore hackers are looking for something easy (and useful), this is such a bug.

This sounds like my kind of a job! Are there any issues or tips I should know before I start doing the 
cleanup? Is there any difference where I should start? Should I make one enormous patch or several small 
ones?
Comment 5 Maciej Stachowiak 2005-08-30 02:23:26 PDT
I think doing it incrementally is a good idea. I did some of the work in 4749
Comment 6 Eric Seidel (no email) 2011-04-25 10:44:25 PDT
I tried this again with bug 40350.  We should probably just dup these.
Comment 7 Akshay Kalbhor 2021-02-23 22:23:41 PST
I know this is an old bug, but it seems beginner-friendly. Is the cleanup still going to help or are all files already clean? Any extra information would be helpful.
Comment 8 Fujii Hironori 2021-02-23 23:16:08 PST
See also:

Bug 211821 – [IWYU] Try removing redundant includes in WTF implementation files
Bug 211867 – [IWYU] Remove unnecessary includes from JSC implementation files