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

Side by Side Diff: Source/core/layout/LayoutBlockFlow.cpp

Issue 1025213002: Begin tracking why layout is invalidated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutBlockFlowLine.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1327 setLogicalHeight(logicalTop); 1327 setLogicalHeight(logicalTop);
1328 if (!previousBlockFlow->avoidsFloats() && (previousBlockFlow->logicalTop () + previousBlockFlow->lowestFloatLogicalBottom()) > logicalTop) 1328 if (!previousBlockFlow->avoidsFloats() && (previousBlockFlow->logicalTop () + previousBlockFlow->lowestFloatLogicalBottom()) > logicalTop)
1329 addOverhangingFloats(previousBlockFlow, false); 1329 addOverhangingFloats(previousBlockFlow, false);
1330 setLogicalHeight(oldLogicalHeight); 1330 setLogicalHeight(oldLogicalHeight);
1331 1331
1332 // If |child|'s previous sibling is a self-collapsing block that cleared a float and margin collapsing resulted in |child| moving up 1332 // If |child|'s previous sibling is a self-collapsing block that cleared a float and margin collapsing resulted in |child| moving up
1333 // into the margin area of the self-collapsing block then the float it c lears is now intruding into |child|. Layout again so that we can look for 1333 // into the margin area of the self-collapsing block then the float it c lears is now intruding into |child|. Layout again so that we can look for
1334 // floats in the parent that overhang |child|'s new logical top. 1334 // floats in the parent that overhang |child|'s new logical top.
1335 bool logicalTopIntrudesIntoFloat = clearanceForSelfCollapsingBlock > 0 & & logicalTop < beforeCollapseLogicalTop; 1335 bool logicalTopIntrudesIntoFloat = clearanceForSelfCollapsingBlock > 0 & & logicalTop < beforeCollapseLogicalTop;
1336 if (logicalTopIntrudesIntoFloat && containsFloats() && !child.avoidsFloa ts() && lowestFloatLogicalBottom() > logicalTop) 1336 if (logicalTopIntrudesIntoFloat && containsFloats() && !child.avoidsFloa ts() && lowestFloatLogicalBottom() > logicalTop)
1337 child.setNeedsLayoutAndFullPaintInvalidation(); 1337 child.setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReaso n::AncestorMarginCollapsing);
1338 } 1338 }
1339 1339
1340 return logicalTop; 1340 return logicalTop;
1341 } 1341 }
1342 1342
1343 void LayoutBlockFlow::adjustPositionedBlock(LayoutBox& child, const MarginInfo& marginInfo) 1343 void LayoutBlockFlow::adjustPositionedBlock(LayoutBox& child, const MarginInfo& marginInfo)
1344 { 1344 {
1345 bool isHorizontal = isHorizontalWritingMode(); 1345 bool isHorizontal = isHorizontalWritingMode();
1346 bool hasStaticBlockPosition = child.style()->hasStaticBlockPosition(isHorizo ntal); 1346 bool hasStaticBlockPosition = child.style()->hasStaticBlockPosition(isHorizo ntal);
1347 1347
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after
3162 } 3162 }
3163 if (isAnonymous()) 3163 if (isAnonymous())
3164 return "LayoutBlockFlow (anonymous)"; 3164 return "LayoutBlockFlow (anonymous)";
3165 if (isRelPositioned()) 3165 if (isRelPositioned())
3166 return "LayoutBlockFlow (relative positioned)"; 3166 return "LayoutBlockFlow (relative positioned)";
3167 return "LayoutBlockFlow"; 3167 return "LayoutBlockFlow";
3168 } 3168 }
3169 3169
3170 3170
3171 } // namespace blink 3171 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutBlock.cpp ('k') | Source/core/layout/LayoutBlockFlowLine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698