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

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

Issue 143323014: *** DO NOT LAND *** Attempt to understand Regions complexity Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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/RenderGeometryMap.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('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) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 { 252 {
253 ASSERT(needsLayout()); 253 ASSERT(needsLayout());
254 254
255 if (!relayoutChildren && simplifiedLayout()) 255 if (!relayoutChildren && simplifiedLayout())
256 return; 256 return;
257 257
258 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock. 258 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock.
259 // It would be nice to refactor some of the duplicate code. 259 // It would be nice to refactor some of the duplicate code.
260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
261 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo rm() || hasReflection() || style()->isFlippedBlocksWritingMode()); 261 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo rm() || hasReflection() || style()->isFlippedBlocksWritingMode());
262
263 // Regions changing widths can force us to relayout our children.
264 RenderFlowThread* flowThread = flowThreadContainingBlock();
265 if (logicalWidthChangedInRegions(flowThread))
266 relayoutChildren = true;
267 if (updateRegionsAndShapesLogicalSize(flowThread))
268 relayoutChildren = true;
269
270 LayoutSize previousSize = size(); 262 LayoutSize previousSize = size();
271 263
272 setLogicalHeight(0); 264 setLogicalHeight(0);
273 updateLogicalWidth(); 265 updateLogicalWidth();
274 266
275 layoutGridItems(); 267 layoutGridItems();
276 268
277 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 269 LayoutUnit oldClientAfterEdge = clientLogicalBottom();
278 updateLogicalHeight(); 270 updateLogicalHeight();
279 271
280 if (size() != previousSize) 272 if (size() != previousSize)
281 relayoutChildren = true; 273 relayoutChildren = true;
282 274
283 layoutPositionedObjects(relayoutChildren || isRoot()); 275 layoutPositionedObjects(relayoutChildren || isRoot());
284 276
285 computeRegionRangeForBlock(flowThread);
286
287 computeOverflow(oldClientAfterEdge); 277 computeOverflow(oldClientAfterEdge);
288 statePusher.pop(); 278 statePusher.pop();
289 279
290 updateLayerTransform(); 280 updateLayerTransform();
291 281
292 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if 282 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if
293 // we overflow or not. 283 // we overflow or not.
294 if (hasOverflowClip()) 284 if (hasOverflowClip())
295 layer()->scrollableArea()->updateAfterLayout(); 285 layer()->scrollableArea()->updateAfterLayout();
296 286
(...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after
1153 if (isOutOfFlowPositioned()) 1143 if (isOutOfFlowPositioned())
1154 return "RenderGrid (positioned)"; 1144 return "RenderGrid (positioned)";
1155 if (isAnonymous()) 1145 if (isAnonymous())
1156 return "RenderGrid (generated)"; 1146 return "RenderGrid (generated)";
1157 if (isRelPositioned()) 1147 if (isRelPositioned())
1158 return "RenderGrid (relative positioned)"; 1148 return "RenderGrid (relative positioned)";
1159 return "RenderGrid"; 1149 return "RenderGrid";
1160 } 1150 }
1161 1151
1162 } // namespace WebCore 1152 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderGeometryMap.cpp ('k') | Source/core/rendering/RenderImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698