Commit a7c639a8 authored by aroben@apple.com's avatar aroben@apple.com

Reduce #includes in a few high-use headers

Removed unnecessary #includes in these headers:
  - Frame.h
  - FrameWin.h
  - Node.h
  - Page.h
  - StringImpl.h

The rest of the patch is all adding #includes to source files that now
require them.

Fixes <http://webkit.org/b/32718>.

Rubber-stamped by Anders Carlsson.

WebCore:

* dom/Node.h:
* page/Frame.h:
* page/Page.h:
* page/win/FrameWin.h:
* platform/text/StringImpl.h:
Removed unnecessary #includes.

* accessibility/win/AXObjectCacheWin.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* dom/Document.cpp:
* dom/InputElement.cpp:
* dom/Node.cpp:
* dom/SelectElement.cpp:
* editing/EditorCommand.cpp:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLParser.cpp:
* html/HTMLTextAreaElement.cpp:
* html/HTMLVideoElement.cpp:
* inspector/InspectorController.cpp:
* loader/FrameLoader.cpp:
* loader/HistoryController.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* page/Console.cpp:
* page/EventHandler.cpp:
* page/Frame.cpp:
* page/FrameView.cpp:
* page/Navigator.cpp:
* page/PageGroup.cpp:
* page/Settings.cpp:
* page/mac/EventHandlerMac.mm:
* platform/KURL.h:
* platform/ScrollbarThemeComposite.cpp:
* platform/cf/BinaryPropertyList.cpp:
* platform/graphics/mac/GraphicsLayerCA.h:
* platform/graphics/win/WKCACFLayerRenderer.cpp:
* platform/mac/PopupMenuMac.mm:
* platform/mac/WidgetMac.mm:
* platform/network/cf/DNSCFNet.cpp:
* platform/text/StringImpl.cpp:
* platform/win/FileSystemWin.cpp:
* platform/win/PlatformScreenWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/WidgetWin.cpp:
* plugins/PluginView.cpp:
* plugins/win/PluginViewWin.cpp:
* rendering/InlineTextBox.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderFileUploadControl.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderObject.cpp:
* rendering/RootInlineBox.cpp:
* storage/DatabaseTracker.cpp:
* storage/DatabaseTracker.h:
* storage/SQLTransactionClient.cpp:
* svg/graphics/SVGImage.cpp:
Added now-needed #includes.

WebKit/mac:

Add #includes needed after WebCore clean-up

* WebView/WebFrame.mm:
* WebView/WebFrameView.mm:
* WebView/WebView.mm:

WebKit/win:

Add #includes needed after WebCore clean-up

* WebCoreSupport/WebContextMenuClient.cpp:
* WebDataSource.cpp:
* WebHTMLRepresentation.cpp:
* WebView.cpp:
* WebView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52314 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 903f8391
2009-12-18 Adam Roben <aroben@apple.com>
Reduce #includes in a few high-use headers
Removed unnecessary #includes in these headers:
- Frame.h
- FrameWin.h
- Node.h
- Page.h
- StringImpl.h
The rest of the patch is all adding #includes to source files that now
require them.
Fixes <http://webkit.org/b/32718>.
Rubber-stamped by Anders Carlsson.
* dom/Node.h:
* page/Frame.h:
* page/Page.h:
* page/win/FrameWin.h:
* platform/text/StringImpl.h:
Removed unnecessary #includes.
* accessibility/win/AXObjectCacheWin.cpp:
* bindings/js/JSDOMWindowBase.cpp:
* bindings/js/JSDOMWindowCustom.cpp:
* dom/Document.cpp:
* dom/InputElement.cpp:
* dom/Node.cpp:
* dom/SelectElement.cpp:
* editing/EditorCommand.cpp:
* html/HTMLFormControlElement.cpp:
* html/HTMLFormElement.cpp:
* html/HTMLMediaElement.cpp:
* html/HTMLParser.cpp:
* html/HTMLTextAreaElement.cpp:
* html/HTMLVideoElement.cpp:
* inspector/InspectorController.cpp:
* loader/FrameLoader.cpp:
* loader/HistoryController.cpp:
* loader/appcache/ApplicationCacheGroup.cpp:
* page/Console.cpp:
* page/EventHandler.cpp:
* page/Frame.cpp:
* page/FrameView.cpp:
* page/Navigator.cpp:
* page/PageGroup.cpp:
* page/Settings.cpp:
* page/mac/EventHandlerMac.mm:
* platform/KURL.h:
* platform/ScrollbarThemeComposite.cpp:
* platform/cf/BinaryPropertyList.cpp:
* platform/graphics/mac/GraphicsLayerCA.h:
* platform/graphics/win/WKCACFLayerRenderer.cpp:
* platform/mac/PopupMenuMac.mm:
* platform/mac/WidgetMac.mm:
* platform/network/cf/DNSCFNet.cpp:
* platform/text/StringImpl.cpp:
* platform/win/FileSystemWin.cpp:
* platform/win/PlatformScreenWin.cpp:
* platform/win/PopupMenuWin.cpp:
* platform/win/WidgetWin.cpp:
* plugins/PluginView.cpp:
* plugins/win/PluginViewWin.cpp:
* rendering/InlineTextBox.cpp:
* rendering/RenderBox.cpp:
* rendering/RenderFileUploadControl.cpp:
* rendering/RenderInline.cpp:
* rendering/RenderLayerCompositor.cpp:
* rendering/RenderObject.cpp:
* rendering/RootInlineBox.cpp:
* storage/DatabaseTracker.cpp:
* storage/DatabaseTracker.h:
* storage/SQLTransactionClient.cpp:
* svg/graphics/SVGImage.cpp:
Added now-needed #includes.
2009-12-18 Shu Chang <Chang.Shu@nokia.com>
Reviewed by Darin Adler.
......@@ -28,6 +28,7 @@
#include "AXObjectCache.h"
#include "AccessibilityObject.h"
#include "Chrome.h"
#include "Document.h"
#include "Page.h"
#include "RenderObject.h"
......
......@@ -24,6 +24,7 @@
#include "JSDOMWindowBase.h"
#include "CString.h"
#include "Chrome.h"
#include "Console.h"
#include "DOMWindow.h"
#include "Frame.h"
......
......@@ -22,6 +22,7 @@
#include "AtomicString.h"
#include "Base64.h"
#include "Chrome.h"
#include "DOMWindow.h"
#include "Document.h"
#include "ExceptionCode.h"
......
......@@ -36,6 +36,7 @@
#include "CSSValueKeywords.h"
#include "CString.h"
#include "CachedCSSStyleSheet.h"
#include "Chrome.h"
#include "Comment.h"
#include "Console.h"
#include "CookieJar.h"
......
......@@ -22,6 +22,7 @@
#include "InputElement.h"
#include "BeforeTextInsertedEvent.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
......
......@@ -37,6 +37,7 @@
#include "CString.h"
#include "ChildNodeList.h"
#include "ClassNodeList.h"
#include "ContextMenuController.h"
#include "DOMImplementation.h"
#include "Document.h"
#include "DynamicNodeList.h"
......
......@@ -27,14 +27,8 @@
#include "EventTarget.h"
#include "KURLHash.h"
#include "PlatformString.h"
#include "RegisteredEventListener.h"
#include "TreeShared.h"
#include "FloatPoint.h"
#include <wtf/Assertions.h>
#include <wtf/ListHashSet.h>
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
......@@ -46,6 +40,7 @@ class DynamicNodeList;
class Element;
class Event;
class EventListener;
class FloatPoint;
class Frame;
class IntRect;
class KeyboardEvent;
......
......@@ -22,6 +22,7 @@
#include "SelectElement.h"
#include "CharacterNames.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Element.h"
#include "EventHandler.h"
......
......@@ -32,6 +32,7 @@
#include "CSSMutableStyleDeclaration.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "CreateLinkCommand.h"
#include "DocumentFragment.h"
#include "Editor.h"
......
......@@ -25,6 +25,7 @@
#include "config.h"
#include "HTMLFormControlElement.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
......
......@@ -26,6 +26,7 @@
#include "HTMLFormElement.h"
#include "CSSHelper.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Event.h"
......
......@@ -28,9 +28,10 @@
#if ENABLE(VIDEO)
#include "HTMLMediaElement.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "ClientRect.h"
#include "ClientRectList.h"
#include "ChromeClient.h"
#include "CSSHelper.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
......
......@@ -28,6 +28,7 @@
#include "CharacterNames.h"
#include "CSSPropertyNames.h"
#include "CSSValueKeywords.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Comment.h"
#include "Console.h"
......
......@@ -27,6 +27,7 @@
#include "HTMLTextAreaElement.h"
#include "BeforeTextInsertedEvent.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSValueKeywords.h"
#include "Document.h"
......
......@@ -28,6 +28,7 @@
#if ENABLE(VIDEO)
#include "HTMLVideoElement.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSHelper.h"
#include "CSSPropertyNames.h"
......
......@@ -34,6 +34,7 @@
#include "CString.h"
#include "CachedResource.h"
#include "Chrome.h"
#include "Console.h"
#include "ConsoleMessage.h"
#include "Cookie.h"
......
......@@ -36,6 +36,7 @@
#include "ApplicationCacheHost.h"
#include "Archive.h"
#include "ArchiveFactory.h"
#include "BackForwardList.h"
#include "CString.h"
#include "Cache.h"
#include "CachedPage.h"
......
......@@ -31,6 +31,7 @@
#include "config.h"
#include "HistoryController.h"
#include "BackForwardList.h"
#include "CachedPage.h"
#include "CString.h"
#include "DocumentLoader.h"
......
......@@ -32,6 +32,7 @@
#include "ApplicationCacheHost.h"
#include "ApplicationCacheResource.h"
#include "ApplicationCacheStorage.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "DocumentLoader.h"
#include "DOMApplicationCache.h"
......
......@@ -30,6 +30,7 @@
#include "Console.h"
#include "CString.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "ConsoleMessage.h"
#include "Frame.h"
......
......@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "CachedImage.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Cursor.h"
#include "Document.h"
......
......@@ -36,6 +36,7 @@
#include "CSSProperty.h"
#include "CSSPropertyNames.h"
#include "CachedCSSStyleSheet.h"
#include "Chrome.h"
#include "DOMWindow.h"
#include "DocLoader.h"
#include "DocumentType.h"
......
......@@ -29,18 +29,14 @@
#define Frame_h
#include "AnimationController.h"
#include "Document.h"
#include "DragImage.h"
#include "EditAction.h"
#include "Editor.h"
#include "EventHandler.h"
#include "FrameLoader.h"
#include "FrameTree.h"
#include "Range.h"
#include "ScriptController.h"
#include "ScrollBehavior.h"
#include "SelectionController.h"
#include "TextGranularity.h"
#include "UserScriptTypes.h"
#if PLATFORM(WIN)
......@@ -64,22 +60,8 @@ typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
class CSSMutableStyleDeclaration;
class Editor;
class EventHandler;
class FrameLoader;
class RedirectScheduler;
class FrameLoaderClient;
class FrameTree;
class FrameView;
class HTMLFrameOwnerElement;
class HTMLTableCellElement;
class RegularExpression;
class RenderPart;
class ScriptController;
class SelectionController;
class Settings;
class VisibleSelection;
class Widget;
template <typename T> class Timer;
......
......@@ -29,6 +29,7 @@
#include "AXObjectCache.h"
#include "CSSStyleSelector.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "DocLoader.h"
#include "EventHandler.h"
......
......@@ -23,6 +23,7 @@
#include "config.h"
#include "Navigator.h"
#include "Chrome.h"
#include "CookieJar.h"
#include "ExceptionCode.h"
#include "Frame.h"
......
......@@ -21,14 +21,11 @@
#ifndef Page_h
#define Page_h
#include "BackForwardList.h"
#include "Chrome.h"
#include "ContextMenuController.h"
#include "FrameLoaderTypes.h"
#include "LinkHash.h"
#include "PlatformString.h"
#include <wtf/Forward.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
#include <wtf/Noncopyable.h>
#if PLATFORM(MAC)
#include "SchedulePair.h"
......@@ -44,6 +41,7 @@ namespace JSC {
namespace WebCore {
class BackForwardList;
class Chrome;
class ChromeClient;
class ContextMenuClient;
......@@ -57,6 +55,7 @@ namespace WebCore {
class GeolocationController;
class GeolocationControllerClient;
class HaltablePlugin;
class HistoryItem;
class InspectorClient;
class InspectorController;
class InspectorTimelineAgent;
......@@ -81,6 +80,8 @@ namespace WebCore {
class NotificationPresenter;
#endif
typedef uint64_t LinkHash;
enum FindDirection { FindDirectionForward, FindDirectionBackward };
class Page : public Noncopyable {
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include "PageGroup.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Frame.h"
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include "Settings.h"
#include "BackForwardList.h"
#include "Frame.h"
#include "FrameTree.h"
#include "FrameView.h"
......
......@@ -28,6 +28,7 @@
#include "AXObjectCache.h"
#include "BlockExceptions.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "ClipboardMac.h"
#include "DragController.h"
......
......@@ -26,13 +26,16 @@
#ifndef FrameWin_H
#define FrameWin_H
#include "Frame.h"
#include <wtf/Vector.h>
// Forward declared so we don't need wingdi.h.
typedef struct HBITMAP__* HBITMAP;
namespace WebCore {
class Frame;
class IntRect;
HBITMAP imageFromSelection(Frame* frame, bool forceWhiteText);
void computePageRectsForFrame(Frame*, const IntRect& printRect, float headerHeight, float footerHeight, float userScaleFactor, Vector<IntRect>& pages, int& pageHeight);
......
......@@ -50,6 +50,10 @@ QT_END_NAMESPACE
#include "KURLGooglePrivate.h"
#endif
#if USE(JSC)
#include <runtime/UString.h>
#endif
namespace WebCore {
class TextEncoding;
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include "ScrollbarThemeComposite.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Frame.h"
#include "FrameView.h"
......
......@@ -27,6 +27,7 @@
#include "BinaryPropertyList.h"
#include "StringHash.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <limits>
......
......@@ -31,6 +31,7 @@
#include "GraphicsLayer.h"
#include "StringHash.h"
#include "WebLayer.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
......
......@@ -37,6 +37,7 @@
#include <QuartzCoreInterface/QuartzCoreInterface.h>
#include <wtf/HashMap.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/StdLibExtras.h>
#include <d3d9.h>
#include <d3dx9.h>
......
......@@ -20,6 +20,7 @@
#import "config.h"
#import "PopupMenu.h"
#import "Chrome.h"
#import "ChromeClient.h"
#import "EventHandler.h"
#import "Frame.h"
......
......@@ -31,6 +31,7 @@
#endif
#import "BlockExceptions.h"
#import "Chrome.h"
#import "Cursor.h"
#import "Document.h"
#import "Font.h"
......
......@@ -29,6 +29,7 @@
#include "StringHash.h"
#include "Timer.h"
#include <wtf/HashSet.h>
#include <wtf/RetainPtr.h>
#include <wtf/StdLibExtras.h>
......
......@@ -34,6 +34,7 @@
#include "TextBreakIterator.h"
#include "TextEncoding.h"
#include "ThreadGlobalData.h"
#include <runtime/UString.h>
#include <wtf/dtoa.h>
#include <wtf/Assertions.h>
#include <wtf/Threading.h>
......
......@@ -23,20 +23,14 @@
#ifndef StringImpl_h
#define StringImpl_h
#include <limits.h>
#include <wtf/ASCIICType.h>
#include <wtf/CrossThreadRefCounted.h>
#include <wtf/OwnFastMallocPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/PtrAndFlags.h>
#include <wtf/RefCounted.h>
#include <wtf/Vector.h>
#include <wtf/unicode/Unicode.h>
#if USE(JSC)
#include <runtime/UString.h>
#endif
#if PLATFORM(CF)
typedef const struct __CFString * CFStringRef;
#endif
......@@ -45,6 +39,10 @@ typedef const struct __CFString * CFStringRef;
@class NSString;
#endif
namespace JSC {
class UString;
}
namespace WebCore {
class StringBuffer;
......
......@@ -33,6 +33,7 @@
#include "CString.h"
#include "NotImplemented.h"
#include "PlatformString.h"
#include <wtf/HashMap.h>
#include <windows.h>
#include <winbase.h>
......
......@@ -27,6 +27,7 @@
#include "config.h"
#include "PlatformScreen.h"
#include "HostWindow.h"
#include "IntRect.h"
#include "FloatRect.h"
#include "Frame.h"
......
......@@ -30,6 +30,7 @@
#include "FrameView.h"
#include "GraphicsContext.h"
#include "HTMLNames.h"
#include "HostWindow.h"
#include "Page.h"
#include "PlatformMouseEvent.h"
#include "PlatformScreen.h"
......
......@@ -26,6 +26,7 @@
#include "config.h"
#include "Widget.h"
#include "Chrome.h"
#include "Cursor.h"
#include "Document.h"
#include "Element.h"
......
......@@ -27,6 +27,7 @@
#include "config.h"
#include "PluginView.h"
#include "Chrome.h"
#include "Document.h"
#include "DocumentLoader.h"
#include "Element.h"
......
......@@ -43,6 +43,7 @@
#include "Frame.h"
#include "FrameView.h"
#include "GraphicsContext.h"
#include "HostWindow.h"
#include "Image.h"
#include "HTMLNames.h"
#include "HTMLPlugInElement.h"
......
......@@ -23,6 +23,7 @@
#include "config.h"
#include "InlineTextBox.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "Editor.h"
......
......@@ -26,6 +26,7 @@
#include "RenderBox.h"
#include "CachedImage.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "FrameView.h"
......
......@@ -21,6 +21,7 @@
#include "config.h"
#include "RenderFileUploadControl.h"
#include "Chrome.h"
#include "FileList.h"
#include "Frame.h"
#include "FrameView.h"
......
......@@ -23,6 +23,7 @@
#include "config.h"
#include "RenderInline.h"
#include "Chrome.h"
#include "FloatQuad.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
......
......@@ -29,6 +29,7 @@
#include "RenderLayerCompositor.h"
#include "AnimationController.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "CSSPropertyNames.h"
#include "Frame.h"
......
......@@ -28,6 +28,7 @@
#include "RenderObject.h"
#include "AXObjectCache.h"
#include "Chrome.h"
#include "CSSStyleSelector.h"
#include "FloatQuad.h"
#include "Frame.h"
......
......@@ -21,6 +21,7 @@
#include "RootInlineBox.h"
#include "BidiResolver.h"
#include "Chrome.h"
#include "ChromeClient.h"
#include "Document.h"
#include "EllipsisBox.h"
......
......@@ -31,6 +31,7 @@
#if ENABLE(DATABASE)
#include "Chrome.h"
#include "ChromeClient.h"
#include "Database.h"
#include "DatabaseThread.h"
......
......@@ -37,6 +37,7 @@
#include "DatabaseDetails.h"
#include "SQLiteDatabase.h"
#include "StringHash.h"
#include <wtf/HashMap.h>
#include <wtf/HashSet.h>
#include <wtf/OwnPtr.h>
#endif // !PLATFORM(CHROMIUM)
......
......@@ -33,6 +33,7 @@
#if ENABLE(DATABASE)
#include "Chrome.h"
#include "ChromeClient.h"
#include "Database.h"
#include "DatabaseThread.h"
......