Bug 31969 - Cleanup: Remove unnecessary #includes
Summary: Cleanup: Remove unnecessary #includes
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2009-11-29 17:59 PST by Daniel Bates
Modified: 2009-11-30 16:14 PST (History)
4 users (show)

See Also:

Patch (5.42 KB, patch)
2009-11-29 18:01 PST, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch (5.86 KB, patch)
2009-11-29 18:13 PST, Daniel Bates
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]

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

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]

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: