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

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

Issue 13937017: Implement lazy block layout prototype behind a runtime flag. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months 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 | Annotate | Revision Log
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 21 matching lines...) Expand all
32 #include "core/platform/graphics/FloatQuad.h" 32 #include "core/platform/graphics/FloatQuad.h"
33 #include "core/platform/graphics/GraphicsContext.h" 33 #include "core/platform/graphics/GraphicsContext.h"
34 #include "core/platform/graphics/transforms/TransformState.h" 34 #include "core/platform/graphics/transforms/TransformState.h"
35 #include "core/rendering/ColumnInfo.h" 35 #include "core/rendering/ColumnInfo.h"
36 #include "core/rendering/FlowThreadController.h" 36 #include "core/rendering/FlowThreadController.h"
37 #include "core/rendering/HitTestResult.h" 37 #include "core/rendering/HitTestResult.h"
38 #include "core/rendering/RenderGeometryMap.h" 38 #include "core/rendering/RenderGeometryMap.h"
39 #include "core/rendering/RenderLayer.h" 39 #include "core/rendering/RenderLayer.h"
40 #include "core/rendering/RenderLayerBacking.h" 40 #include "core/rendering/RenderLayerBacking.h"
41 #include "core/rendering/RenderLayerCompositor.h" 41 #include "core/rendering/RenderLayerCompositor.h"
42 #include "core/rendering/RenderLazyBlock.h"
42 #include "core/rendering/RenderNamedFlowThread.h" 43 #include "core/rendering/RenderNamedFlowThread.h"
43 #include "core/rendering/RenderSelectionInfo.h" 44 #include "core/rendering/RenderSelectionInfo.h"
44 #include "core/rendering/RenderWidget.h" 45 #include "core/rendering/RenderWidget.h"
45 #include "core/rendering/RenderWidgetProtector.h" 46 #include "core/rendering/RenderWidgetProtector.h"
46 #include "core/rendering/style/StyleInheritedData.h" 47 #include "core/rendering/style/StyleInheritedData.h"
47 48
48 #if USE(3D_GRAPHICS) 49 #if USE(3D_GRAPHICS)
49 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h" 50 #include "core/platform/graphics/filters/custom/CustomFilterGlobalContext.h"
50 #endif 51 #endif
51 52
52 namespace WebCore { 53 namespace WebCore {
53 54
54 RenderView::RenderView(Document* document) 55 RenderView::RenderView(Document* document)
55 : RenderBlock(document) 56 : RenderBlock(document)
56 , m_frameView(document->view()) 57 , m_frameView(document->view())
57 , m_selectionStart(0) 58 , m_selectionStart(0)
58 , m_selectionEnd(0) 59 , m_selectionEnd(0)
59 , m_selectionStartPos(-1) 60 , m_selectionStartPos(-1)
60 , m_selectionEndPos(-1) 61 , m_selectionEndPos(-1)
61 , m_maximalOutlineSize(0) 62 , m_maximalOutlineSize(0)
62 , m_pageLogicalHeight(0) 63 , m_pageLogicalHeight(0)
63 , m_pageLogicalHeightChanged(false) 64 , m_pageLogicalHeightChanged(false)
64 , m_layoutState(0) 65 , m_layoutState(0)
65 , m_layoutStateDisableCount(0) 66 , m_layoutStateDisableCount(0)
67 , m_firstLazyBlock(0)
66 , m_renderQuoteHead(0) 68 , m_renderQuoteHead(0)
67 , m_renderCounterCount(0) 69 , m_renderCounterCount(0)
68 { 70 {
69 // init RenderObject attributes 71 // init RenderObject attributes
70 setInline(false); 72 setInline(false);
71 73
72 m_minPreferredLogicalWidth = 0; 74 m_minPreferredLogicalWidth = 0;
73 m_maxPreferredLogicalWidth = 0; 75 m_maxPreferredLogicalWidth = 0;
74 76
75 setPreferredLogicalWidthsDirty(true, MarkOnlyThis); 77 setPreferredLogicalWidthsDirty(true, MarkOnlyThis);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 if (hasColumns()) 110 if (hasColumns())
109 return columnInfo()->columnHeight(); 111 return columnInfo()->columnHeight();
110 return RenderBlock::availableLogicalHeight(heightType); 112 return RenderBlock::availableLogicalHeight(heightType);
111 } 113 }
112 114
113 bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const 115 bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const
114 { 116 {
115 return child->isBox(); 117 return child->isBox();
116 } 118 }
117 119
120 void RenderView::markLazyBlocksForLayout()
121 {
122 for (RenderLazyBlock* block = m_firstLazyBlock; block; block = block->next() )
123 block->setNeedsLayout(true);
124 }
125
118 void RenderView::layoutContent(const LayoutState& state) 126 void RenderView::layoutContent(const LayoutState& state)
119 { 127 {
120 UNUSED_PARAM(state); 128 UNUSED_PARAM(state);
121 ASSERT(needsLayout()); 129 ASSERT(needsLayout());
122 130
123 RenderBlock::layout(); 131 RenderBlock::layout();
124 if (hasRenderNamedFlowThreads()) 132 if (hasRenderNamedFlowThreads())
125 flowThreadController()->layoutRenderNamedFlowThreads(); 133 flowThreadController()->layoutRenderNamedFlowThreads();
126 #ifndef NDEBUG 134 #ifndef NDEBUG
127 checkLayoutState(state); 135 checkLayoutState(state);
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 #endif 1174 #endif
1167 1175
1168 if (layoutState) 1176 if (layoutState)
1169 layoutState->m_isPaginated = m_fragmenting; 1177 layoutState->m_isPaginated = m_fragmenting;
1170 1178
1171 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1179 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1172 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1180 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1173 } 1181 }
1174 1182
1175 } // namespace WebCore 1183 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698