Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 775753002: Remove RenderFlowThread::offsetFromLogicalTopOfFirstRegion(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: code review Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv ed.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 824
825 return m_compositor.get(); 825 return m_compositor.get();
826 } 826 }
827 827
828 void RenderView::setIsInWindow(bool isInWindow) 828 void RenderView::setIsInWindow(bool isInWindow)
829 { 829 {
830 if (m_compositor) 830 if (m_compositor)
831 m_compositor->setIsInWindow(isInWindow); 831 m_compositor->setIsInWindow(isInWindow);
832 } 832 }
833 833
834 void RenderView::pushLayoutState(LayoutState& layoutState)
835 {
836 if (RenderFlowThread* currentFlowThread = layoutState.flowThread())
837 currentFlowThread->pushFlowThreadLayoutState(layoutState.renderer());
838 m_layoutState = &layoutState;
839 }
840
841 void RenderView::popLayoutState()
842 {
843 ASSERT(m_layoutState);
844 RenderFlowThread* currentFlowThread = m_layoutState->flowThread();
845 m_layoutState = m_layoutState->next();
846 if (currentFlowThread)
847 currentFlowThread->popFlowThreadLayoutState();
848 }
849
850 IntervalArena* RenderView::intervalArena() 834 IntervalArena* RenderView::intervalArena()
851 { 835 {
852 if (!m_intervalArena) 836 if (!m_intervalArena)
853 m_intervalArena = IntervalArena::create(); 837 m_intervalArena = IntervalArena::create();
854 return m_intervalArena.get(); 838 return m_intervalArena.get();
855 } 839 }
856 840
857 bool RenderView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const 841 bool RenderView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const
858 { 842 {
859 // FIXME: Remove this main frame check. Same concept applies to subframes to o. 843 // FIXME: Remove this main frame check. Same concept applies to subframes to o.
860 if (!frame()->isMainFrame()) 844 if (!frame()->isMainFrame())
861 return false; 845 return false;
862 846
863 return m_frameView->hasOpaqueBackground(); 847 return m_frameView->hasOpaqueBackground();
864 } 848 }
865 849
866 double RenderView::layoutViewportWidth() const 850 double RenderView::layoutViewportWidth() const
867 { 851 {
868 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 852 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
869 return viewWidth(IncludeScrollbars) / scale; 853 return viewWidth(IncludeScrollbars) / scale;
870 } 854 }
871 855
872 double RenderView::layoutViewportHeight() const 856 double RenderView::layoutViewportHeight() const
873 { 857 {
874 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; 858 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1;
875 return viewHeight(IncludeScrollbars) / scale; 859 return viewHeight(IncludeScrollbars) / scale;
876 } 860 }
877 861
878 } // namespace blink 862 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698