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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |