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

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

Issue 264963004: Mark when we may have been invalidated to early out on repaintTreeAfterLayout. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: With expectations. Created 6 years, 7 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 size_t seenInFlowPositionedChildren = 0; 1103 size_t seenInFlowPositionedChildren = 0;
1104 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow(); 1104 bool shouldFlipMainAxis = !isColumnFlow() && !isLeftToRightFlow();
1105 for (size_t i = 0; i < children.size(); ++i) { 1105 for (size_t i = 0; i < children.size(); ++i) {
1106 RenderBox* child = children[i]; 1106 RenderBox* child = children[i];
1107 1107
1108 if (child->isOutOfFlowPositioned()) { 1108 if (child->isOutOfFlowPositioned()) {
1109 prepareChildForPositionedLayout(child, mainAxisOffset, crossAxisOffs et, FlipForRowReverse); 1109 prepareChildForPositionedLayout(child, mainAxisOffset, crossAxisOffs et, FlipForRowReverse);
1110 continue; 1110 continue;
1111 } 1111 }
1112 1112
1113 // FIXME Investigate if this can be removed based on other flags. crbug. com/370010
1114 child->setMayNeedInvalidation(true);
1115
1113 LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPadding ExtentForChild(child); 1116 LayoutUnit childPreferredSize = childSizes[i] + mainAxisBorderAndPadding ExtentForChild(child);
1114 setLogicalOverrideSize(child, childPreferredSize); 1117 setLogicalOverrideSize(child, childPreferredSize);
1115 if (childPreferredSize != mainAxisExtentForChild(child)) { 1118 if (childPreferredSize != mainAxisExtentForChild(child)) {
1116 child->setChildNeedsLayout(MarkOnlyThis); 1119 child->setChildNeedsLayout(MarkOnlyThis);
1117 } else { 1120 } else {
1118 // To avoid double applying margin changes in updateAutoMarginsInCro ssAxis, we reset the margins here. 1121 // To avoid double applying margin changes in updateAutoMarginsInCro ssAxis, we reset the margins here.
1119 resetAutoMarginsAndLogicalTopInCrossAxis(child); 1122 resetAutoMarginsAndLogicalTopInCrossAxis(child);
1120 } 1123 }
1121 // We may have already forced relayout for orthogonal flowing children i n preferredMainAxisContentExtentForChild. 1124 // We may have already forced relayout for orthogonal flowing children i n preferredMainAxisContentExtentForChild.
1122 bool forceChildRelayout = relayoutChildren && !childPreferredMainAxisCon tentExtentRequiresLayout(child, hasInfiniteLineLength); 1125 bool forceChildRelayout = relayoutChildren && !childPreferredMainAxisCon tentExtentRequiresLayout(child, hasInfiniteLineLength);
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 ASSERT(child); 1411 ASSERT(child);
1409 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; 1412 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent;
1410 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; 1413 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge;
1411 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; 1414 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent;
1412 adjustAlignmentForChild(child, newOffset - originalOffset); 1415 adjustAlignmentForChild(child, newOffset - originalOffset);
1413 } 1416 }
1414 } 1417 }
1415 } 1418 }
1416 1419
1417 } 1420 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderDeprecatedFlexibleBox.cpp ('k') | Source/core/rendering/RenderObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698