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

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

Issue 332543002: Rename Repaint to Paint Invalidation Part 4 (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 289
290 void RenderGrid::layoutBlock(bool relayoutChildren) 290 void RenderGrid::layoutBlock(bool relayoutChildren)
291 { 291 {
292 ASSERT(needsLayout()); 292 ASSERT(needsLayout());
293 293
294 if (!relayoutChildren && simplifiedLayout()) 294 if (!relayoutChildren && simplifiedLayout())
295 return; 295 return;
296 296
297 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock. 297 // FIXME: Much of this method is boiler plate that matches RenderBox::layout Block and Render*FlexibleBox::layoutBlock.
298 // It would be nice to refactor some of the duplicate code. 298 // It would be nice to refactor some of the duplicate code.
299 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 299 LayoutRepainter repainter(*this, checkForPaintInvalidationDuringLayout());
300 LayoutStateMaintainer statePusher(*this, locationOffset()); 300 LayoutStateMaintainer statePusher(*this, locationOffset());
301 301
302 LayoutSize previousSize = size(); 302 LayoutSize previousSize = size();
303 303
304 setLogicalHeight(0); 304 setLogicalHeight(0);
305 updateLogicalWidth(); 305 updateLogicalWidth();
306 306
307 layoutGridItems(); 307 layoutGridItems();
308 308
309 LayoutUnit oldClientAfterEdge = clientLogicalBottom(); 309 LayoutUnit oldClientAfterEdge = clientLogicalBottom();
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
1012 1012
1013 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is 1013 // Keep track of children overflowing their grid area as we might need t o paint them even if the grid-area is
1014 // not visible 1014 // not visible
1015 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight 1015 if (child->logicalHeight() > overrideContainingBlockContentLogicalHeight
1016 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h) 1016 || child->logicalWidth() > overrideContainingBlockContentLogicalWidt h)
1017 m_gridItemsOverflowingGridArea.append(child); 1017 m_gridItemsOverflowingGridArea.append(child);
1018 1018
1019 // If the child moved, we have to repaint it as well as any floating/pos itioned 1019 // If the child moved, we have to repaint it as well as any floating/pos itioned
1020 // descendants. An exception is if we need a layout. In this case, we kn ow we're going to 1020 // descendants. An exception is if we need a layout. In this case, we kn ow we're going to
1021 // repaint ourselves (and the child) anyway. 1021 // repaint ourselves (and the child) anyway.
1022 if (!selfNeedsLayout() && child->checkForRepaintDuringLayout()) 1022 if (!selfNeedsLayout() && child->checkForPaintInvalidationDuringLayout() )
1023 child->repaintDuringLayoutIfMoved(oldChildRect); 1023 child->repaintDuringLayoutIfMoved(oldChildRect);
1024 } 1024 }
1025 1025
1026 for (size_t i = 0; i < sizingData.rowTracks.size(); ++i) 1026 for (size_t i = 0; i < sizingData.rowTracks.size(); ++i)
1027 setLogicalHeight(logicalHeight() + sizingData.rowTracks[i].m_usedBreadth ); 1027 setLogicalHeight(logicalHeight() + sizingData.rowTracks[i].m_usedBreadth );
1028 1028
1029 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock. 1029 // Min / max logical height is handled by the call to updateLogicalHeight in layoutBlock.
1030 1030
1031 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight()); 1031 setLogicalHeight(logicalHeight() + borderAndPaddingLogicalHeight());
1032 } 1032 }
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 if (isOutOfFlowPositioned()) 1259 if (isOutOfFlowPositioned())
1260 return "RenderGrid (positioned)"; 1260 return "RenderGrid (positioned)";
1261 if (isAnonymous()) 1261 if (isAnonymous())
1262 return "RenderGrid (generated)"; 1262 return "RenderGrid (generated)";
1263 if (isRelPositioned()) 1263 if (isRelPositioned())
1264 return "RenderGrid (relative positioned)"; 1264 return "RenderGrid (relative positioned)";
1265 return "RenderGrid"; 1265 return "RenderGrid";
1266 } 1266 }
1267 1267
1268 } // namespace WebCore 1268 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderHTMLCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698