OLD | NEW |
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 1309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1320 setLogicalHeight(logicalTop); | 1320 setLogicalHeight(logicalTop); |
1321 if (!previousBlockFlow->avoidsFloats() && (previousBlockFlow->logicalTop
() + previousBlockFlow->lowestFloatLogicalBottom()) > logicalTop) | 1321 if (!previousBlockFlow->avoidsFloats() && (previousBlockFlow->logicalTop
() + previousBlockFlow->lowestFloatLogicalBottom()) > logicalTop) |
1322 addOverhangingFloats(previousBlockFlow, false); | 1322 addOverhangingFloats(previousBlockFlow, false); |
1323 setLogicalHeight(oldLogicalHeight); | 1323 setLogicalHeight(oldLogicalHeight); |
1324 | 1324 |
1325 // If |child|'s previous sibling is a self-collapsing block that cleared
a float and margin collapsing resulted in |child| moving up | 1325 // If |child|'s previous sibling is a self-collapsing block that cleared
a float and margin collapsing resulted in |child| moving up |
1326 // 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 | 1326 // 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 |
1327 // floats in the parent that overhang |child|'s new logical top. | 1327 // floats in the parent that overhang |child|'s new logical top. |
1328 bool logicalTopIntrudesIntoFloat = clearanceForSelfCollapsingBlock > 0 &
& logicalTop < beforeCollapseLogicalTop; | 1328 bool logicalTopIntrudesIntoFloat = clearanceForSelfCollapsingBlock > 0 &
& logicalTop < beforeCollapseLogicalTop; |
1329 if (logicalTopIntrudesIntoFloat && containsFloats() && !child.avoidsFloa
ts() && lowestFloatLogicalBottom() > logicalTop) | 1329 if (logicalTopIntrudesIntoFloat && containsFloats() && !child.avoidsFloa
ts() && lowestFloatLogicalBottom() > logicalTop) |
1330 child.setNeedsLayoutAndFullPaintInvalidation(); | 1330 child.setNeedsLayoutAndFullPaintInvalidation(LayoutInvalidationReaso
n::AncestorMarginCollapsing); |
1331 } | 1331 } |
1332 | 1332 |
1333 return logicalTop; | 1333 return logicalTop; |
1334 } | 1334 } |
1335 | 1335 |
1336 void LayoutBlockFlow::adjustPositionedBlock(LayoutBox& child, const MarginInfo&
marginInfo) | 1336 void LayoutBlockFlow::adjustPositionedBlock(LayoutBox& child, const MarginInfo&
marginInfo) |
1337 { | 1337 { |
1338 bool isHorizontal = isHorizontalWritingMode(); | 1338 bool isHorizontal = isHorizontalWritingMode(); |
1339 bool hasStaticBlockPosition = child.style()->hasStaticBlockPosition(isHorizo
ntal); | 1339 bool hasStaticBlockPosition = child.style()->hasStaticBlockPosition(isHorizo
ntal); |
1340 | 1340 |
(...skipping 1814 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 } | 3155 } |
3156 if (isAnonymous()) | 3156 if (isAnonymous()) |
3157 return "LayoutBlockFlow (anonymous)"; | 3157 return "LayoutBlockFlow (anonymous)"; |
3158 if (isRelPositioned()) | 3158 if (isRelPositioned()) |
3159 return "LayoutBlockFlow (relative positioned)"; | 3159 return "LayoutBlockFlow (relative positioned)"; |
3160 return "LayoutBlockFlow"; | 3160 return "LayoutBlockFlow"; |
3161 } | 3161 } |
3162 | 3162 |
3163 | 3163 |
3164 } // namespace blink | 3164 } // namespace blink |
OLD | NEW |