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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/svg/graphics/SVGImage.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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 SubtreeLayoutScope layoutScope(*this); 194 SubtreeLayoutScope layoutScope(*this);
195 195
196 // Use calcWidth/Height to get the new width/height, since this will take th e full page zoom factor into account. 196 // Use calcWidth/Height to get the new width/height, since this will take th e full page zoom factor into account.
197 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView || size( ).width() != viewWidth() || size().height() != viewHeight()); 197 bool relayoutChildren = !shouldUsePrintingLayout() && (!m_frameView || size( ).width() != viewWidth() || size().height() != viewHeight());
198 if (relayoutChildren) { 198 if (relayoutChildren) {
199 layoutScope.setChildNeedsLayout(this); 199 layoutScope.setChildNeedsLayout(this);
200 for (LayoutObject* child = firstChild(); child; child = child->nextSibli ng()) { 200 for (LayoutObject* child = firstChild(); child; child = child->nextSibli ng()) {
201 if (child->isSVGRoot()) 201 if (child->isSVGRoot())
202 continue; 202 continue;
203 203
204 if ((child->isBox() && toRenderBox(child)->hasRelativeLogicalHeight( )) 204 if ((child->isBox() && toLayoutBox(child)->hasRelativeLogicalHeight( ))
205 || child->style()->logicalHeight().isPercent() 205 || child->style()->logicalHeight().isPercent()
206 || child->style()->logicalMinHeight().isPercent() 206 || child->style()->logicalMinHeight().isPercent()
207 || child->style()->logicalMaxHeight().isPercent()) 207 || child->style()->logicalMaxHeight().isPercent())
208 layoutScope.setChildNeedsLayout(child); 208 layoutScope.setChildNeedsLayout(child);
209 } 209 }
210 210
211 if (document().svgExtensions()) 211 if (document().svgExtensions())
212 document().accessSVGExtensions().invalidateSVGRootsWithRelativeLengt hDescendents(&layoutScope); 212 document().accessSVGExtensions().invalidateSVGRootsWithRelativeLengt hDescendents(&layoutScope);
213 } 213 }
214 214
(...skipping 29 matching lines...) Expand all
244 mode &= ~IsFixed; 244 mode &= ~IsFixed;
245 } 245 }
246 246
247 if (paintInvalidationContainer == this) 247 if (paintInvalidationContainer == this)
248 return; 248 return;
249 249
250 if (mode & TraverseDocumentBoundaries) { 250 if (mode & TraverseDocumentBoundaries) {
251 if (LayoutObject* parentDocRenderer = frame()->ownerRenderer()) { 251 if (LayoutObject* parentDocRenderer = frame()->ownerRenderer()) {
252 transformState.move(-frame()->view()->scrollOffset()); 252 transformState.move(-frame()->view()->scrollOffset());
253 if (parentDocRenderer->isBox()) 253 if (parentDocRenderer->isBox())
254 transformState.move(toRenderBox(parentDocRenderer)->contentBoxOf fset()); 254 transformState.move(toLayoutBox(parentDocRenderer)->contentBoxOf fset());
255 parentDocRenderer->mapLocalToContainer(paintInvalidationContainer, t ransformState, mode, wasFixed, paintInvalidationState); 255 parentDocRenderer->mapLocalToContainer(paintInvalidationContainer, t ransformState, mode, wasFixed, paintInvalidationState);
256 return; 256 return;
257 } 257 }
258 } 258 }
259 } 259 }
260 260
261 const LayoutObject* RenderView::pushMappingToContainer(const LayoutBoxModelObjec t* ancestorToStopAt, LayoutGeometryMap& geometryMap) const 261 const LayoutObject* RenderView::pushMappingToContainer(const LayoutBoxModelObjec t* ancestorToStopAt, LayoutGeometryMap& geometryMap) const
262 { 262 {
263 LayoutSize offsetForFixedPosition; 263 LayoutSize offsetForFixedPosition;
264 LayoutSize offset; 264 LayoutSize offset;
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 rect = layer()->transform()->mapRect(rect); 388 rect = layer()->transform()->mapRect(rect);
389 389
390 ASSERT(paintInvalidationContainer); 390 ASSERT(paintInvalidationContainer);
391 if (paintInvalidationContainer == this) 391 if (paintInvalidationContainer == this)
392 return; 392 return;
393 393
394 Element* owner = document().ownerElement(); 394 Element* owner = document().ownerElement();
395 if (!owner) 395 if (!owner)
396 return; 396 return;
397 397
398 if (RenderBox* obj = owner->renderBox()) { 398 if (LayoutBox* obj = owner->layoutBox()) {
399 // Intersect the viewport with the paint invalidation rect. 399 // Intersect the viewport with the paint invalidation rect.
400 LayoutRect viewRectangle = viewRect(); 400 LayoutRect viewRectangle = viewRect();
401 rect.intersect(viewRectangle); 401 rect.intersect(viewRectangle);
402 402
403 // Adjust for scroll offset of the view. 403 // Adjust for scroll offset of the view.
404 rect.moveBy(-viewRectangle.location()); 404 rect.moveBy(-viewRectangle.location());
405 405
406 // Adjust for frame border. 406 // Adjust for frame border.
407 rect.move(obj->contentBoxOffset()); 407 rect.move(obj->contentBoxOffset());
408 obj->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0); 408 obj->mapRectToPaintInvalidationBacking(paintInvalidationContainer, rect, 0);
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 847
848 LayoutObject* RenderView::backgroundRenderer() const 848 LayoutObject* RenderView::backgroundRenderer() const
849 { 849 {
850 if (Element* documentElement = document().documentElement()) { 850 if (Element* documentElement = document().documentElement()) {
851 if (LayoutObject* rootObject = documentElement->renderer()) 851 if (LayoutObject* rootObject = documentElement->renderer())
852 return rootObject->rendererForRootBackground(); 852 return rootObject->rendererForRootBackground();
853 } 853 }
854 return 0; 854 return 0;
855 } 855 }
856 856
857 LayoutRect RenderView::backgroundRect(RenderBox* backgroundRenderer) const 857 LayoutRect RenderView::backgroundRect(LayoutBox* backgroundRenderer) const
858 { 858 {
859 if (!hasColumns()) 859 if (!hasColumns())
860 return unscaledDocumentRect(); 860 return unscaledDocumentRect();
861 861
862 ColumnInfo* columnInfo = this->columnInfo(); 862 ColumnInfo* columnInfo = this->columnInfo();
863 LayoutRect backgroundRect(0, 0, columnInfo->desiredColumnWidth(), columnInfo ->columnHeight() * columnInfo->columnCount()); 863 LayoutRect backgroundRect(0, 0, columnInfo->desiredColumnWidth(), columnInfo ->columnHeight() * columnInfo->columnCount());
864 if (!isHorizontalWritingMode()) 864 if (!isHorizontalWritingMode())
865 backgroundRect = backgroundRect.transposedRect(); 865 backgroundRect = backgroundRect.transposedRect();
866 backgroundRenderer->flipForWritingMode(backgroundRect); 866 backgroundRenderer->flipForWritingMode(backgroundRect);
867 867
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 } 983 }
984 984
985 void RenderView::invalidateDisplayItemClients(DisplayItemList* displayItemList) const 985 void RenderView::invalidateDisplayItemClients(DisplayItemList* displayItemList) const
986 { 986 {
987 RenderBlockFlow::invalidateDisplayItemClients(displayItemList); 987 RenderBlockFlow::invalidateDisplayItemClients(displayItemList);
988 if (m_frameView) 988 if (m_frameView)
989 displayItemList->invalidate(m_frameView->displayItemClient()); 989 displayItemList->invalidate(m_frameView->displayItemClient());
990 } 990 }
991 991
992 } // namespace blink 992 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderView.h ('k') | Source/core/svg/graphics/SVGImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698