Commit 63d8cf42 authored by thakis@chromium.org's avatar thakis@chromium.org

Include Frame.h in fewer translation units.

Merges parts of Andreas Kling's http://trac.webkit.org/changeset/155217

"Out-of-line the three methods on FrameView that were operating on
Frames.  Most of the call sites were in FrameView.cpp so they will still
get inlined."

On my system, this reduces the number of build steps that run after
touching Frame.h from 528 to 442 and reduces compilation time after
touching Frame.h from 8.5 minutes to 7 minutes.

BUG=none

Review URL: https://codereview.chromium.org/23819041

git-svn-id: svn://svn.chromium.org/blink/trunk@157458 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 8f432e77
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include "core/dom/UserGestureIndicator.h" #include "core/dom/UserGestureIndicator.h"
#include "core/editing/VisibleUnits.h" #include "core/editing/VisibleUnits.h"
#include "core/editing/htmlediting.h" #include "core/editing/htmlediting.h"
#include "core/page/Frame.h"
#include "core/platform/LocalizedStrings.h" #include "core/platform/LocalizedStrings.h"
#include "core/rendering/RenderListItem.h" #include "core/rendering/RenderListItem.h"
#include "core/rendering/RenderTheme.h" #include "core/rendering/RenderTheme.h"
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#include "core/html/HTMLTextAreaElement.h" #include "core/html/HTMLTextAreaElement.h"
#include "core/html/shadow/ShadowElementNames.h" #include "core/html/shadow/ShadowElementNames.h"
#include "core/loader/ProgressTracker.h" #include "core/loader/ProgressTracker.h"
#include "core/page/Frame.h"
#include "core/page/Page.h" #include "core/page/Page.h"
#include "core/platform/LocalizedStrings.h" #include "core/platform/LocalizedStrings.h"
#include "core/rendering/HitTestResult.h" #include "core/rendering/HitTestResult.h"
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "core/accessibility/AXObjectCache.h" #include "core/accessibility/AXObjectCache.h"
#include "core/accessibility/AccessibilityScrollbar.h" #include "core/accessibility/AccessibilityScrollbar.h"
#include "core/html/HTMLFrameOwnerElement.h" #include "core/html/HTMLFrameOwnerElement.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
namespace WebCore { namespace WebCore {
......
...@@ -445,6 +445,21 @@ bool FrameView::scheduleAnimation() ...@@ -445,6 +445,21 @@ bool FrameView::scheduleAnimation()
return false; return false;
} }
RenderView* FrameView::renderView() const
{
return frame().contentRenderer();
}
int FrameView::mapFromLayoutToCSSUnits(LayoutUnit value) const
{
return value / frame().pageZoomFactor();
}
LayoutUnit FrameView::mapFromCSSToLayoutUnits(int value) const
{
return value * frame().pageZoomFactor();
}
void FrameView::setMarginWidth(LayoutUnit w) void FrameView::setMarginWidth(LayoutUnit w)
{ {
// make it update the rendering area when set // make it update the rendering area when set
......
...@@ -26,7 +26,6 @@ ...@@ -26,7 +26,6 @@
#define FrameView_h #define FrameView_h
#include "core/page/AdjustViewSizeOrNot.h" #include "core/page/AdjustViewSizeOrNot.h"
#include "core/page/Frame.h"
#include "core/platform/ScrollView.h" #include "core/platform/ScrollView.h"
#include "core/platform/graphics/Color.h" #include "core/platform/graphics/Color.h"
#include "core/platform/graphics/LayoutRect.h" #include "core/platform/graphics/LayoutRect.h"
...@@ -42,6 +41,7 @@ namespace WebCore { ...@@ -42,6 +41,7 @@ namespace WebCore {
class Element; class Element;
class Event; class Event;
class FloatSize; class FloatSize;
class Frame;
class FrameActionScheduler; class FrameActionScheduler;
class KURL; class KURL;
class Node; class Node;
...@@ -76,10 +76,10 @@ public: ...@@ -76,10 +76,10 @@ public:
Frame& frame() const { return *m_frame; } Frame& frame() const { return *m_frame; }
RenderView* renderView() const { return m_frame->contentRenderer(); } RenderView* renderView() const;
int mapFromLayoutToCSSUnits(LayoutUnit); int mapFromLayoutToCSSUnits(LayoutUnit) const;
LayoutUnit mapFromCSSToLayoutUnits(int); LayoutUnit mapFromCSSToLayoutUnits(int) const;
LayoutUnit marginWidth() const { return m_margins.width(); } // -1 means default LayoutUnit marginWidth() const { return m_margins.width(); } // -1 means default
LayoutUnit marginHeight() const { return m_margins.height(); } // -1 means default LayoutUnit marginHeight() const { return m_margins.height(); } // -1 means default
...@@ -561,16 +561,6 @@ inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size) ...@@ -561,16 +561,6 @@ inline void FrameView::incrementVisuallyNonEmptyPixelCount(const IntSize& size)
setIsVisuallyNonEmpty(); setIsVisuallyNonEmpty();
} }
inline int FrameView::mapFromLayoutToCSSUnits(LayoutUnit value)
{
return value / m_frame->pageZoomFactor();
}
inline LayoutUnit FrameView::mapFromCSSToLayoutUnits(int value)
{
return value * m_frame->pageZoomFactor();
}
inline FrameView* toFrameView(Widget* widget) inline FrameView* toFrameView(Widget* widget)
{ {
ASSERT(!widget || widget->isFrameView()); ASSERT(!widget || widget->isFrameView());
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "core/dom/Text.h" #include "core/dom/Text.h"
#include "core/editing/Editor.h" #include "core/editing/Editor.h"
#include "core/html/HTMLFrameOwnerElement.h" #include "core/html/HTMLFrameOwnerElement.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/platform/graphics/FloatPoint.h" #include "core/platform/graphics/FloatPoint.h"
#include "core/platform/graphics/FloatQuad.h" #include "core/platform/graphics/FloatQuad.h"
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include "config.h" #include "config.h"
#include "core/rendering/RenderLayerModelObject.h" #include "core/rendering/RenderLayerModelObject.h"
#include "core/page/Frame.h"
#include "core/rendering/RenderLayer.h" #include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h" #include "core/rendering/RenderView.h"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include "core/rendering/svg/RenderSVGResource.h" #include "core/rendering/svg/RenderSVGResource.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/rendering/svg/RenderSVGResourceClipper.h" #include "core/rendering/svg/RenderSVGResourceClipper.h"
#include "core/rendering/svg/RenderSVGResourceFilter.h" #include "core/rendering/svg/RenderSVGResourceFilter.h"
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "RuntimeEnabledFeatures.h" #include "RuntimeEnabledFeatures.h"
#include "SVGNames.h" #include "SVGNames.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h" #include "core/platform/graphics/GraphicsContextStateSaver.h"
#include "core/rendering/HitTestResult.h" #include "core/rendering/HitTestResult.h"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "core/dom/shadow/ComposedTreeWalker.h" #include "core/dom/shadow/ComposedTreeWalker.h"
#include "core/loader/DocumentLoader.h" #include "core/loader/DocumentLoader.h"
#include "core/page/Chrome.h" #include "core/page/Chrome.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/page/Settings.h" #include "core/page/Settings.h"
#include "core/platform/graphics/GraphicsContextStateSaver.h" #include "core/platform/graphics/GraphicsContextStateSaver.h"
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#include "WebMenuItemInfo.h" #include "WebMenuItemInfo.h"
#include "WebPopupMenuInfo.h" #include "WebPopupMenuInfo.h"
#include "WebViewClient.h" #include "WebViewClient.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/platform/PopupMenuClient.h" #include "core/platform/PopupMenuClient.h"
#include "core/platform/graphics/FloatQuad.h" #include "core/platform/graphics/FloatQuad.h"
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include "core/page/DOMWindowPagePopup.h" #include "core/page/DOMWindowPagePopup.h"
#include "core/page/EventHandler.h" #include "core/page/EventHandler.h"
#include "core/page/FocusController.h" #include "core/page/FocusController.h"
#include "core/page/Frame.h"
#include "core/page/FrameView.h" #include "core/page/FrameView.h"
#include "core/page/Page.h" #include "core/page/Page.h"
#include "core/page/PagePopupClient.h" #include "core/page/PagePopupClient.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment