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

Side by Side Diff: sky/engine/core/rendering/RenderView.cpp

Issue 1068683002: Delete RenderBlockFlow. (Closed) Base URL: https://github.com/domokit/mojo.git@block
Patch Set: Remove unused float-related code instead of moving it. Created 5 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
« no previous file with comments | « sky/engine/core/rendering/RenderView.h ('k') | sky/engine/core/rendering/RootInlineBox.h » ('j') | 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 19 matching lines...) Expand all
30 #include "sky/engine/core/rendering/RenderGeometryMap.h" 30 #include "sky/engine/core/rendering/RenderGeometryMap.h"
31 #include "sky/engine/core/rendering/RenderLayer.h" 31 #include "sky/engine/core/rendering/RenderLayer.h"
32 #include "sky/engine/platform/TraceEvent.h" 32 #include "sky/engine/platform/TraceEvent.h"
33 #include "sky/engine/platform/geometry/FloatQuad.h" 33 #include "sky/engine/platform/geometry/FloatQuad.h"
34 #include "sky/engine/platform/geometry/TransformState.h" 34 #include "sky/engine/platform/geometry/TransformState.h"
35 #include "sky/engine/platform/graphics/GraphicsContext.h" 35 #include "sky/engine/platform/graphics/GraphicsContext.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 RenderView::RenderView(Document* document) 39 RenderView::RenderView(Document* document)
40 : RenderBlockFlow(document) 40 : RenderFlexibleBox(document)
41 , m_frameView(document->view()) 41 , m_frameView(document->view())
42 , m_selectionStart(nullptr) 42 , m_selectionStart(nullptr)
43 , m_selectionEnd(nullptr) 43 , m_selectionEnd(nullptr)
44 , m_selectionStartPos(-1) 44 , m_selectionStartPos(-1)
45 , m_selectionEndPos(-1) 45 , m_selectionEndPos(-1)
46 , m_renderCounterCount(0) 46 , m_renderCounterCount(0)
47 , m_hitTestCount(0) 47 , m_hitTestCount(0)
48 { 48 {
49 // init RenderObject attributes 49 // init RenderObject attributes
50 setInline(false); 50 setInline(false);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 { 109 {
110 computedValues.m_extent = m_frameView ? LayoutUnit(viewLogicalHeight()) : lo gicalHeight; 110 computedValues.m_extent = m_frameView ? LayoutUnit(viewLogicalHeight()) : lo gicalHeight;
111 } 111 }
112 112
113 void RenderView::updateLogicalWidth() 113 void RenderView::updateLogicalWidth()
114 { 114 {
115 if (m_frameView) 115 if (m_frameView)
116 setLogicalWidth(viewLogicalWidth()); 116 setLogicalWidth(viewLogicalWidth());
117 } 117 }
118 118
119 LayoutUnit RenderView::availableLogicalHeight(AvailableLogicalHeightType heightT ype) const
120 {
121 return RenderBlockFlow::availableLogicalHeight(heightType);
122 }
123
124 bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const 119 bool RenderView::isChildAllowed(RenderObject* child, RenderStyle*) const
125 { 120 {
126 return child->isBox(); 121 return child->isBox();
127 } 122 }
128 123
129 void RenderView::layout() 124 void RenderView::layout()
130 { 125 {
131 SubtreeLayoutScope layoutScope(*this); 126 SubtreeLayoutScope layoutScope(*this);
132 127
133 bool relayoutChildren = (!m_frameView || width() != viewWidth() || height() != viewHeight()); 128 bool relayoutChildren = (!m_frameView || width() != viewWidth() || height() != viewHeight());
134 if (relayoutChildren) { 129 if (relayoutChildren) {
135 layoutScope.setChildNeedsLayout(this); 130 layoutScope.setChildNeedsLayout(this);
136 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) { 131 for (RenderObject* child = firstChild(); child; child = child->nextSibli ng()) {
137 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight( )) 132 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight( ))
138 || child->style()->logicalHeight().isPercent() 133 || child->style()->logicalHeight().isPercent()
139 || child->style()->logicalMinHeight().isPercent() 134 || child->style()->logicalMinHeight().isPercent()
140 || child->style()->logicalMaxHeight().isPercent()) 135 || child->style()->logicalMaxHeight().isPercent())
141 layoutScope.setChildNeedsLayout(child); 136 layoutScope.setChildNeedsLayout(child);
142 } 137 }
143 } 138 }
144 139
145 if (!needsLayout()) 140 if (!needsLayout())
146 return; 141 return;
147 142
148 RenderBlockFlow::layout(); 143 RenderFlexibleBox::layout();
149 clearNeedsLayout(); 144 clearNeedsLayout();
150 } 145 }
151 146
152 void RenderView::mapLocalToContainer(const RenderBox* paintInvalidationContainer , TransformState& transformState, MapCoordinatesFlags mode) const 147 void RenderView::mapLocalToContainer(const RenderBox* paintInvalidationContainer , TransformState& transformState, MapCoordinatesFlags mode) const
153 { 148 {
154 if (!paintInvalidationContainer && mode & UseTransforms && shouldUseTransfor mFromContainer(0)) { 149 if (!paintInvalidationContainer && mode & UseTransforms && shouldUseTransfor mFromContainer(0)) {
155 TransformationMatrix t; 150 TransformationMatrix t;
156 getTransformFromContainer(0, LayoutSize(), t); 151 getTransformFromContainer(0, LayoutSize(), t);
157 transformState.applyTransform(t); 152 transformState.applyTransform(t);
158 } 153 }
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 m_iframes.remove(iframe); 398 m_iframes.remove(iframe);
404 } 399 }
405 400
406 void RenderView::updateIFramesAfterLayout() 401 void RenderView::updateIFramesAfterLayout()
407 { 402 {
408 for (auto& iframe: m_iframes) 403 for (auto& iframe: m_iframes)
409 iframe->updateWidgetBounds(); 404 iframe->updateWidgetBounds();
410 } 405 }
411 406
412 } // namespace blink 407 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderView.h ('k') | sky/engine/core/rendering/RootInlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698