Cut down the number of source files that depend on Clipboard.h
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Mar 2013 05:55:53 +0000 (05:55 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 3 Mar 2013 05:55:53 +0000 (05:55 +0000)
commit3ac9bf59b89017a12415aeb2324c0925d41fd25d
tree61a82c7719aef866038316b8c4074ce2457a9c0d
parentf1fefc626ec5ad608d6b0e0ee9ab5e5beb212ea2
Cut down the number of source files that depend on Clipboard.h
https://bugs.webkit.org/show_bug.cgi?id=110030

Reviewed by Ryosuke Niwa.

Source/WebCore:

I am doing some work on Clipboard and it's better to recompile 50 files
each time we touch the header instead of 700. Also cut down on includes
of DragState.h.

* WebCore.exp.in: Updated for new MouseEvent::create function.

* dom/ClipboardEvent.cpp: Added include of Clipboard.h since we use it
here and the world no longer includes it everywhere.

* dom/ClipboardEvent.h: Forward declared Clipboard instead of including
Clipboard.h. Also made some overrides private because they can be.

* dom/DataTransferItem.h: Removed unneeded include of Clipboard.h.

* dom/MouseEvent.cpp: Added include of Clipboard.h since we use it
here and the world no longer includes it everywhere.
(WebCore::MouseEvent::create): Made the create function non-inline
since we can't compile it without including Clipboard.h and we don't
want to include Clipboard.h in the header. This is not so commonly
used or so hot that this needs to be inlined.

* dom/MouseEvent.h: Forward declared Clipboard instead of including
Clipboard.h. Made MouseEvent::create a non-inline function and also
used overloading instead of default arguments, since we can't compile
a default argument of type PassRefPtr<Clipboard> without including
Clipboard.h.

* dom/WheelEvent.cpp: Added include of Clipboard.h since we use it
here and the world no longer includes it everywhere.

* dom/WheelEvent.h: Forward declare PlatformWheelEvent since it is used
in this header. Previously we'd get it indirectly from including a header
that included Clipboard.h.

* editing/Editor.cpp: Added include of Clipboard.h since we use it here
and the world no longer includes it everywhere.

* inspector/InspectorDebuggerAgent.cpp: Added include of CachedResource.h.
We used to get this indirectly through Clipboard.h.

* inspector/InspectorFrontendHost.cpp: Added includes of ResourceError.h
and ResourceResponse.h. We used to get these indirectly through Clipboard.h.
Also removed unneeded include of <wtf/RefPtr.h>.

* inspector/NetworkResourcesData.cpp: Added include of CachedResource.h.
We used to get this indirectly through Clipboard.h.

* loader/PingLoader.cpp: Added include of ResourceResponse.h.
We used to get this indirectly through Clipboard.h.

* page/DragController.cpp: Added include of DragState.h.
We used to get this indirectly through EventHandler.h

* page/EventHandler.h: Forward declared DragState and Element instead of
including DragState.h. Also added an include of LayoutPoint.h, which we
used to get indirectly through DragState.h.

Source/WebKit/chromium:

* src/SharedWorkerRepository.cpp: Add include of ResourceResponse.h
here. We used to get this indirectly through Clipboard.h.

Source/WebKit/mac:

* WebView/WebPDFView.mm: Add include of Clipboard.h since we use it
here and the world no longer includes it everywhere.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/dom/ClipboardEvent.cpp
Source/WebCore/dom/ClipboardEvent.h
Source/WebCore/dom/DataTransferItem.h
Source/WebCore/dom/MouseEvent.cpp
Source/WebCore/dom/MouseEvent.h
Source/WebCore/dom/WheelEvent.cpp
Source/WebCore/dom/WheelEvent.h
Source/WebCore/editing/Editor.cpp
Source/WebCore/inspector/InspectorFrontendHost.cpp
Source/WebCore/page/DragController.cpp
Source/WebCore/page/EventHandler.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebPDFView.mm