Commit 7b131b9d authored by akling@apple.com's avatar akling@apple.com

Merge Document::viewportSize() logic into RenderView::viewportSize().

<https://webkit.org/b/120254>

Reviewed by Darin Adler.

RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.

* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154556 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d8ed2323
2013-08-24 Andreas Kling <akling@apple.com>
Merge Document::viewportSize() logic into RenderView::viewportSize().
<https://webkit.org/b/120254>
Reviewed by Darin Adler.
RenderView can just ask FrameView (the viewport) about its size directly, no need for
a weirdly-placed method on Document.
* dom/Document.cpp:
* rendering/RenderView.cpp:
(WebCore::RenderView::viewportSize):
* rendering/RenderView.h:
2013-08-24 Andreas Kling <akling@apple.com>
RenderObject::frame() should return a reference.
......@@ -5631,13 +5631,6 @@ DocumentLoader* Document::loader() const
return loader;
}
IntSize Document::viewportSize() const
{
if (!view())
return IntSize();
return view()->visibleContentRect(ScrollableArea::IncludeScrollbars).size();
}
#if ENABLE(CSS_DEVICE_ADAPTATION)
IntSize Document::initialViewportSize() const
{
......
......@@ -1121,8 +1121,6 @@ public:
void suspendScheduledTasks(ActiveDOMObject::ReasonForSuspension);
void resumeScheduledTasks(ActiveDOMObject::ReasonForSuspension);
IntSize viewportSize() const;
#if ENABLE(CSS_DEVICE_ADAPTATION)
IntSize initialViewportSize() const;
#endif
......
......@@ -1086,6 +1086,11 @@ bool RenderView::shouldDisableLayoutStateForSubtree(RenderObject* renderer) cons
return false;
}
IntSize RenderView::viewportSize() const
{
return frameView().visibleContentRect(ScrollableArea::IncludeScrollbars).size();
}
void RenderView::updateHitTestResult(HitTestResult& result, const LayoutPoint& point)
{
if (result.innerNode())
......
......@@ -214,7 +214,7 @@ public:
IntervalArena* intervalArena();
IntSize viewportSize() const { return document()->viewportSize(); }
IntSize viewportSize() const;
void setRenderQuoteHead(RenderQuote* head) { m_renderQuoteHead = head; }
RenderQuote* renderQuoteHead() const { return m_renderQuoteHead; }
......
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