Bug 31969

Summary: Cleanup: Remove unnecessary #includes
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, ian, laszlo.gombos, mitz
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch eric: review+

Description Daniel Bates 2009-11-29 17:59:54 PST
We can remove the following #includes, because they are unnecessary (either they aren't used or are indirectly included by other #includes):

css/CSSComputedStyleDeclaration.cpp: CachedImage.h, and Pair.h
css/CSSCursorImageValue.cpp: RenderStyle.h
css/CSSFontFaceSrcValue.cpp: Node.h
css/CSSFontSelector.cpp: NodeList.h
css/CSSGradientValue.cpp: GraphicsContext.h, ImageBuffer.h
css/CSSImageValue.cpp: RenderStyle.h
css/CSSMutableStyleDeclaration.cpp: CSSProperty.h
css/CSSRule.cpp: CSSStyleSheet.h
css/CSSStyleSelector.cpp: CSSFontFace.h, CSSFontFaceSource.h, and CSSProperty.h
page/EventSource.h: EventListener.h
Comment 1 Daniel Bates 2009-11-29 18:01:05 PST
Created attachment 44001 [details]
Patch

No functionality was changed. So, no new tests.
Comment 2 Daniel Bates 2009-11-29 18:13:52 PST
Created attachment 44003 [details]
Patch

Found another one:

css/CSSImportRule.cpp: MediaList.h
Comment 3 Eric Seidel (no email) 2009-11-29 18:21:10 PST
Comment on attachment 44003 [details]
Patch

OK.  I assume you used the script?
Comment 4 Daniel Bates 2009-11-29 18:27:29 PST
No. I did this by hand. What script are you talking about? And if we have a script, why don't we use it?

(In reply to comment #3)
> (From update of attachment 44003 [details])
> OK.  I assume you used the script?
Comment 5 Daniel Bates 2009-11-29 18:46:25 PST
Committed r51473: <http://trac.webkit.org/changeset/51473>
Comment 6 Laszlo Gombos 2009-11-30 12:10:44 PST
This change seems to break the QtWebkit build. Here is the build error:

WebCore/css/CSSFontFaceSrcValue.cpp: In member function 'virtual void WebCore::CSSFontFaceSrcValue::addSubresourceStyleURLs(WTF::ListHashSet<WebCore::KURL, WebCore::KURLHash>&, const WebCore::CSSStyleSheet*)':

WebCore/css/CSSFontFaceSrcValue.cpp:74: error: 'addSubresourceURL' was not declared in this scope
make[1]: *** [obj/release/CSSFontFaceSrcValue.o] Error 1

Daniel, can you check this ?
Comment 7 Laszlo Gombos 2009-11-30 16:14:52 PST
This is now fixed by the following change:

http://trac.webkit.org/changeset/51520