2011-04-27 Mihai Parparita <mihaip@chromium.org>
authormihaip@chromium.org <mihaip@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2011 07:37:02 +0000 (07:37 +0000)
committermihaip@chromium.org <mihaip@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Apr 2011 07:37:02 +0000 (07:37 +0000)
        Reviewed by Eric Seidel.

        Frame.h shouldn't include Document.h
        https://bugs.webkit.org/show_bug.cgi?id=59560

        Frame can use a forward-declared Document if we move
        Frame::displayStringModifiedByEncoding's implementation out of the
        header.
                                Size  #includes  Size * #includes
        Before: page/Frame.h:   0.746       653           487.138
                dom/Document.h: 0.220      1306           287.320

        After:  page/Frame.h:   0.646       653           421.838
                dom/Document.h: 0.220      1189           261.580

        * WebCore.exp.in:
        * bindings/ScriptControllerBase.cpp:
        * bindings/generic/BindingSecurityBase.cpp:
        * bindings/v8/V8Proxy.cpp:
        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
        * dom/CharacterData.cpp:
        * dom/UserTypingGestureIndicator.cpp:
        * editing/chromium/SelectionControllerChromium.cpp:
        * inspector/InspectorDOMStorageResource.cpp:
        * inspector/InspectorInstrumentation.h:
        * loader/PingLoader.cpp:
        * loader/SubresourceLoader.cpp:
        * loader/appcache/DOMApplicationCache.cpp:
        * loader/cache/CachedResourceRequest.cpp:
        * page/Frame.cpp:
        (WebCore::Frame::displayStringModifiedByEncoding):
        * page/Frame.h:
        * page/Geolocation.cpp:
        * page/Location.cpp:
        * page/Navigator.cpp:
        * page/PageGroupLoadDeferrer.cpp:
        * page/PerformanceTiming.cpp:
        * xml/XSLTProcessorLibxslt.cpp:
2011-04-27  Mihai Parparita  <mihaip@chromium.org>

        Reviewed by Eric Seidel.

        Frame.h shouldn't include Document.h
        https://bugs.webkit.org/show_bug.cgi?id=59560

        Add Document.h #includes for files that were relying on transitive
        #includes via Frame.h.

        * src/LocalFileSystemChromium.cpp:
        * src/StorageEventDispatcherImpl.cpp:
        * src/WebFrameImpl.h:
        * src/WebWorkerBase.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@85030 268f45cc-cd09-0410-ab3c-d52691b4dbfc

28 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/bindings/ScriptControllerBase.cpp
Source/WebCore/bindings/generic/BindingSecurityBase.cpp
Source/WebCore/bindings/v8/V8Proxy.cpp
Source/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
Source/WebCore/dom/CharacterData.cpp
Source/WebCore/dom/UserTypingGestureIndicator.cpp
Source/WebCore/editing/chromium/SelectionControllerChromium.cpp
Source/WebCore/inspector/InspectorDOMStorageResource.cpp
Source/WebCore/inspector/InspectorInstrumentation.h
Source/WebCore/loader/PingLoader.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/appcache/DOMApplicationCache.cpp
Source/WebCore/loader/cache/CachedResourceRequest.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/page/Frame.h
Source/WebCore/page/Geolocation.cpp
Source/WebCore/page/Location.cpp
Source/WebCore/page/Navigator.cpp
Source/WebCore/page/PageGroupLoadDeferrer.cpp
Source/WebCore/page/PerformanceTiming.cpp
Source/WebCore/xml/XSLTProcessorLibxslt.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/LocalFileSystemChromium.cpp
Source/WebKit/chromium/src/StorageEventDispatcherImpl.cpp
Source/WebKit/chromium/src/WebFrameImpl.h
Source/WebKit/chromium/src/WebWorkerBase.cpp

index 7c2496c..b842ec2 100644 (file)
@@ -1,3 +1,44 @@
+2011-04-27  Mihai Parparita  <mihaip@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Frame.h shouldn't include Document.h
+        https://bugs.webkit.org/show_bug.cgi?id=59560
+
+        Frame can use a forward-declared Document if we move
+        Frame::displayStringModifiedByEncoding's implementation out of the
+        header.
+                                Size  #includes  Size * #includes
+        Before: page/Frame.h:   0.746       653           487.138
+                dom/Document.h: 0.220      1306           287.320
+        
+        After:  page/Frame.h:   0.646       653           421.838
+                dom/Document.h: 0.220      1189           261.580
+
+        * WebCore.exp.in:
+        * bindings/ScriptControllerBase.cpp:
+        * bindings/generic/BindingSecurityBase.cpp:
+        * bindings/v8/V8Proxy.cpp:
+        * bindings/v8/custom/V8XMLHttpRequestCustom.cpp:
+        * dom/CharacterData.cpp:
+        * dom/UserTypingGestureIndicator.cpp:
+        * editing/chromium/SelectionControllerChromium.cpp:
+        * inspector/InspectorDOMStorageResource.cpp:
+        * inspector/InspectorInstrumentation.h:
+        * loader/PingLoader.cpp:
+        * loader/SubresourceLoader.cpp:
+        * loader/appcache/DOMApplicationCache.cpp:
+        * loader/cache/CachedResourceRequest.cpp:
+        * page/Frame.cpp:
+        (WebCore::Frame::displayStringModifiedByEncoding):
+        * page/Frame.h:
+        * page/Geolocation.cpp:
+        * page/Location.cpp:
+        * page/Navigator.cpp:
+        * page/PageGroupLoadDeferrer.cpp:
+        * page/PerformanceTiming.cpp:
+        * xml/XSLTProcessorLibxslt.cpp:
+
 2011-04-27  James Robinson  <jamesr@chromium.org>
 
         Reviewed by Eric Seidel.
index e1dc004..70a7165 100644 (file)
@@ -1211,6 +1211,7 @@ __ZNK7WebCore5Frame14selectionImageEb
 __ZNK7WebCore5Frame15contentRendererEv
 __ZNK7WebCore5Frame15layerTreeAsTextEb
 __ZNK7WebCore5Frame18documentTypeStringEv
+__ZNK7WebCore5Frame31displayStringModifiedByEncodingERKN3WTF6StringE
 __ZNK7WebCore5Frame8settingsEv
 __ZNK7WebCore5Frame9domWindowEv
 __ZNK7WebCore5Range11startOffsetERi
index 5e87dbf..4190637 100644 (file)
@@ -22,6 +22,7 @@
 #include "ScriptController.h"
 
 #include "ContentSecurityPolicy.h"
+#include "Document.h"
 #include "DocumentLoader.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
index 1598781..099afa2 100644 (file)
@@ -32,6 +32,7 @@
 #include "BindingSecurityBase.h"
 
 #include "DOMWindow.h"
+#include "Document.h"
 #include "Frame.h"
 #include "SecurityOrigin.h"
 
index c30f861..cdc877e 100644 (file)
@@ -34,6 +34,7 @@
 #include "CSSMutableStyleDeclaration.h"
 #include "CachedMetadata.h"
 #include "DateExtension.h"
+#include "Document.h"
 #include "DocumentLoader.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
index 0548a4d..821a5c5 100644 (file)
@@ -32,6 +32,7 @@
 #include "V8XMLHttpRequest.h"
 
 #include "ArrayBuffer.h"
+#include "Document.h"
 #include "Frame.h"
 #include "InspectorInstrumentation.h"
 #include "V8ArrayBuffer.h"
index b4af02d..e1815d9 100644 (file)
@@ -22,6 +22,7 @@
 #include "config.h"
 #include "CharacterData.h"
 
+#include "Document.h"
 #include "EventNames.h"
 #include "ExceptionCode.h"
 #include "InspectorInstrumentation.h"
index 5120843..cbe341e 100644 (file)
@@ -26,6 +26,7 @@
 #include "config.h"
 #include "UserTypingGestureIndicator.h"
 
+#include "Document.h"
 #include "Frame.h"
 #include "Node.h"
 #include <wtf/StdLibExtras.h>
index f40134b..adabb9c 100644 (file)
@@ -32,6 +32,7 @@
 #include "SelectionController.h"
 
 #include "AXObjectCache.h"
+#include "Document.h"
 #include "Frame.h"
 
 namespace WebCore {
index d618eb5..4ba2789 100644 (file)
@@ -35,6 +35,7 @@
 #include "InspectorDOMStorageResource.h"
 
 #include "DOMWindow.h"
+#include "Document.h"
 #include "EventNames.h"
 #include "Frame.h"
 #include "InspectorFrontend.h"
index a1b2a49..94ec8bf 100644 (file)
@@ -32,6 +32,7 @@
 #define InspectorInstrumentation_h
 
 #include "Console.h"
+#include "Document.h"
 #include "Frame.h"
 #include "Page.h"
 #include "ScriptExecutionContext.h"
@@ -42,7 +43,6 @@ namespace WebCore {
 class CharacterData;
 class DOMWrapperWorld;
 class Database;
-class Document;
 class Element;
 class EventContext;
 class DocumentLoader;
index 00a005e..71d9514 100644 (file)
@@ -32,6 +32,7 @@
 #include "config.h"
 #include "PingLoader.h"
 
+#include "Document.h"
 #include "FormData.h"
 #include "Frame.h"
 #include "FrameLoaderClient.h"
index 6722ae3..0ecca4a 100644 (file)
@@ -29,6 +29,7 @@
 #include "config.h"
 #include "SubresourceLoader.h"
 
+#include "Document.h"
 #include "DocumentLoader.h"
 #include "Frame.h"
 #include "FrameLoader.h"
index b9297b1..080a3ef 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(OFFLINE_WEB_APPLICATIONS)
 
 #include "ApplicationCacheHost.h"
+#include "Document.h"
 #include "DocumentLoader.h"
 #include "Event.h"
 #include "EventException.h"
index 9e7fe8f..383efca 100644 (file)
 #include "config.h"
 #include "CachedResourceRequest.h"
 
-#include "MemoryCache.h"
 #include "CachedImage.h"
 #include "CachedResource.h"
 #include "CachedResourceLoader.h"
+#include "Document.h"
 #include "Frame.h"
 #include "FrameLoader.h"
 #include "Logging.h"
+#include "MemoryCache.h"
 #include "ResourceHandle.h"
 #include "ResourceLoadScheduler.h"
 #include "ResourceRequest.h"
index 5daad24..887d1c2 100644 (file)
@@ -808,6 +808,11 @@ String Frame::documentTypeString() const
     return String();
 }
 
+String Frame::displayStringModifiedByEncoding(const String& str) const
+{
+    return document() ? document()->displayStringModifiedByEncoding(str) : str;
+}
+
 VisiblePosition Frame::visiblePositionForPoint(const IntPoint& framePoint)
 {
     HitTestResult result = eventHandler()->hitTestResultAtPoint(framePoint, true);
index 3532fe4..5cf7399 100644 (file)
@@ -29,7 +29,6 @@
 #define Frame_h
 
 #include "AnimationController.h"
-#include "Document.h"
 #include "DragImage.h"
 #include "Editor.h"
 #include "EventHandler.h"
@@ -62,6 +61,7 @@ typedef struct HBITMAP__* HBITMAP;
 
 namespace WebCore {
 
+    class Document;
     class FrameView;
     class HTMLTableCellElement;
     class RegularExpression;
@@ -174,10 +174,7 @@ namespace WebCore {
 
         String documentTypeString() const;
 
-        String displayStringModifiedByEncoding(const String& str) const
-        {
-            return document() ? document()->displayStringModifiedByEncoding(str) : str;
-        }
+        String displayStringModifiedByEncoding(const String&) const;
 
         DragImageRef nodeImage(Node*);
         DragImageRef dragImageForSelection();
index 2a4635f..fc5b1c6 100644 (file)
@@ -31,6 +31,7 @@
 #if ENABLE(GEOLOCATION)
 
 #include "Chrome.h"
+#include "Document.h"
 #include "Frame.h"
 #include "Page.h"
 #include <wtf/CurrentTime.h>
index 4835a83..9f93da7 100644 (file)
@@ -30,6 +30,7 @@
 #include "Location.h"
 
 #include "DOMWindow.h"
+#include "Document.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
 #include "FrameLoader.h"
index 780b205..c9e8408 100644 (file)
@@ -27,6 +27,7 @@
 #include "CookieJar.h"
 #include "DOMMimeTypeArray.h"
 #include "DOMPluginArray.h"
+#include "Document.h"
 #include "ExceptionCode.h"
 #include "Frame.h"
 #include "FrameLoader.h"
index dfbb244..50b32bc 100644 (file)
@@ -21,6 +21,7 @@
 #include "config.h"
 #include "PageGroupLoadDeferrer.h"
 
+#include "Document.h"
 #include "DocumentParser.h"
 #include "Frame.h"
 #include "Page.h"
index f17e771..509fa46 100644 (file)
@@ -33,6 +33,7 @@
 
 #if ENABLE(WEB_TIMING)
 
+#include "Document.h"
 #include "DocumentLoadTiming.h"
 #include "DocumentLoader.h"
 #include "DocumentTiming.h"
index 37f2bc2..afdcb08 100644 (file)
 
 #include "XSLTProcessor.h"
 
+#include "CachedResourceLoader.h"
 #include "Console.h"
 #include "DOMWindow.h"
-#include "CachedResourceLoader.h"
+#include "Document.h"
 #include "Frame.h"
 #include "ResourceError.h"
 #include "ResourceHandle.h"
index 8d80a64..6f3eade 100644 (file)
@@ -1,3 +1,18 @@
+2011-04-27  Mihai Parparita  <mihaip@chromium.org>
+
+        Reviewed by Eric Seidel.
+
+        Frame.h shouldn't include Document.h
+        https://bugs.webkit.org/show_bug.cgi?id=59560
+        
+        Add Document.h #includes for files that were relying on transitive
+        #includes via Frame.h.
+
+        * src/LocalFileSystemChromium.cpp:
+        * src/StorageEventDispatcherImpl.cpp:
+        * src/WebFrameImpl.h:
+        * src/WebWorkerBase.cpp:
+
 2011-04-26  Jay Civelli  <jcivelli@chromium.org>
 
         Reviewed by Eric Seidel.
index b377bdb..c35b263 100644 (file)
@@ -34,6 +34,7 @@
 #if ENABLE(FILE_SYSTEM)
 
 #include "AsyncFileSystem.h"
+#include "Document.h"
 #include "ErrorCallback.h"
 #include "FileSystemCallback.h"
 #include "FileSystemCallbacks.h"
index 631753b..dd0b3fe 100644 (file)
@@ -34,6 +34,7 @@
 #if ENABLE(DOM_STORAGE)
 
 #include "DOMWindow.h"
+#include "Document.h"
 #include "EventNames.h"
 #include "Frame.h"
 #include "KURL.h"
index f529f29..4bca16c 100644 (file)
@@ -42,6 +42,7 @@
 
 namespace WebCore {
 class GraphicsContext;
+class HTMLInputElement;
 class HistoryItem;
 class KURL;
 class Node;
index 0cd5f41..3f9cf0c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include "CrossThreadTask.h"
 #include "DatabaseTask.h"
+#include "Document.h"
 #include "MessagePortChannel.h"
 #include "PlatformMessagePortChannel.h"