Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 11 matching lines...) Expand all Loading... | |
| 22 #include "core/rendering/RenderView.h" | 22 #include "core/rendering/RenderView.h" |
| 23 | 23 |
| 24 #include "core/dom/Document.h" | 24 #include "core/dom/Document.h" |
| 25 #include "core/dom/Element.h" | 25 #include "core/dom/Element.h" |
| 26 #include "core/frame/LocalFrame.h" | 26 #include "core/frame/LocalFrame.h" |
| 27 #include "core/html/HTMLFrameOwnerElement.h" | 27 #include "core/html/HTMLFrameOwnerElement.h" |
| 28 #include "core/html/HTMLIFrameElement.h" | 28 #include "core/html/HTMLIFrameElement.h" |
| 29 #include "core/page/Page.h" | 29 #include "core/page/Page.h" |
| 30 #include "core/paint/ViewPainter.h" | 30 #include "core/paint/ViewPainter.h" |
| 31 #include "core/rendering/ColumnInfo.h" | 31 #include "core/rendering/ColumnInfo.h" |
| 32 #include "core/rendering/FlowThreadController.h" | |
| 33 #include "core/rendering/HitTestResult.h" | 32 #include "core/rendering/HitTestResult.h" |
| 34 #include "core/rendering/RenderFlowThread.h" | 33 #include "core/rendering/RenderFlowThread.h" |
| 35 #include "core/rendering/RenderGeometryMap.h" | 34 #include "core/rendering/RenderGeometryMap.h" |
| 36 #include "core/rendering/RenderLayer.h" | 35 #include "core/rendering/RenderLayer.h" |
| 37 #include "core/rendering/RenderPart.h" | 36 #include "core/rendering/RenderPart.h" |
| 38 #include "core/rendering/RenderQuote.h" | 37 #include "core/rendering/RenderQuote.h" |
| 39 #include "core/rendering/compositing/CompositedLayerMapping.h" | 38 #include "core/rendering/compositing/CompositedLayerMapping.h" |
| 40 #include "core/rendering/compositing/RenderLayerCompositor.h" | 39 #include "core/rendering/compositing/RenderLayerCompositor.h" |
| 41 #include "core/svg/SVGDocumentExtensions.h" | 40 #include "core/svg/SVGDocumentExtensions.h" |
| 42 #include "platform/TraceEvent.h" | 41 #include "platform/TraceEvent.h" |
| (...skipping 782 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 825 | 824 |
| 826 return m_compositor.get(); | 825 return m_compositor.get(); |
| 827 } | 826 } |
| 828 | 827 |
| 829 void RenderView::setIsInWindow(bool isInWindow) | 828 void RenderView::setIsInWindow(bool isInWindow) |
| 830 { | 829 { |
| 831 if (m_compositor) | 830 if (m_compositor) |
| 832 m_compositor->setIsInWindow(isInWindow); | 831 m_compositor->setIsInWindow(isInWindow); |
| 833 } | 832 } |
| 834 | 833 |
| 835 FlowThreadController* RenderView::flowThreadController() | |
| 836 { | |
| 837 if (!m_flowThreadController) | |
| 838 m_flowThreadController = FlowThreadController::create(); | |
| 839 | |
| 840 return m_flowThreadController.get(); | |
| 841 } | |
| 842 | |
| 843 void RenderView::pushLayoutState(LayoutState& layoutState) | 834 void RenderView::pushLayoutState(LayoutState& layoutState) |
| 844 { | 835 { |
| 845 if (m_flowThreadController) { | 836 if (RenderFlowThread* currentFlowThread = layoutState.flowThread()) |
| 846 RenderFlowThread* currentFlowThread = m_flowThreadController->currentRen derFlowThread(); | 837 currentFlowThread->pushFlowThreadLayoutState(layoutState.renderer()); |
| 847 if (currentFlowThread) | |
| 848 currentFlowThread->pushFlowThreadLayoutState(layoutState.renderer()) ; | |
| 849 } | |
| 850 m_layoutState = &layoutState; | 838 m_layoutState = &layoutState; |
| 851 } | 839 } |
| 852 | 840 |
| 853 void RenderView::popLayoutState() | 841 void RenderView::popLayoutState() |
| 854 { | 842 { |
| 855 ASSERT(m_layoutState); | 843 ASSERT(m_layoutState); |
| 844 RenderFlowThread* currentFlowThread = m_layoutState->flowThread(); | |
|
Julien - ping for review
2014/12/02 16:59:47
We could potentially combine the lines below:
if
mstensho (USE GERRIT)
2014/12/02 19:41:12
That may be right, but never mind: I have another
| |
| 856 m_layoutState = m_layoutState->next(); | 845 m_layoutState = m_layoutState->next(); |
| 857 if (!m_flowThreadController) | 846 if (currentFlowThread) |
|
Julien - ping for review
2014/12/02 16:59:47
Nit: /me prefers early returns
mstensho (USE GERRIT)
2014/12/02 19:41:12
Ditto.
| |
| 858 return; | 847 currentFlowThread->popFlowThreadLayoutState(); |
| 859 | |
| 860 RenderFlowThread* currentFlowThread = m_flowThreadController->currentRenderF lowThread(); | |
| 861 if (!currentFlowThread) | |
| 862 return; | |
| 863 | |
| 864 currentFlowThread->popFlowThreadLayoutState(); | |
| 865 } | 848 } |
| 866 | 849 |
| 867 IntervalArena* RenderView::intervalArena() | 850 IntervalArena* RenderView::intervalArena() |
| 868 { | 851 { |
| 869 if (!m_intervalArena) | 852 if (!m_intervalArena) |
| 870 m_intervalArena = IntervalArena::create(); | 853 m_intervalArena = IntervalArena::create(); |
| 871 return m_intervalArena.get(); | 854 return m_intervalArena.get(); |
| 872 } | 855 } |
| 873 | 856 |
| 874 bool RenderView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const | 857 bool RenderView::backgroundIsKnownToBeOpaqueInRect(const LayoutRect&) const |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 886 return viewWidth(IncludeScrollbars) / scale; | 869 return viewWidth(IncludeScrollbars) / scale; |
| 887 } | 870 } |
| 888 | 871 |
| 889 double RenderView::layoutViewportHeight() const | 872 double RenderView::layoutViewportHeight() const |
| 890 { | 873 { |
| 891 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 874 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 892 return viewHeight(IncludeScrollbars) / scale; | 875 return viewHeight(IncludeScrollbars) / scale; |
| 893 } | 876 } |
| 894 | 877 |
| 895 } // namespace blink | 878 } // namespace blink |
| OLD | NEW |