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 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1291 // i.e., clearance = [height of float] - margin-top". | 1291 // i.e., clearance = [height of float] - margin-top". |
1292 setLogicalHeight(child->logicalTop() + childMargins.negativeMarginBefore ()); | 1292 setLogicalHeight(child->logicalTop() + childMargins.negativeMarginBefore ()); |
1293 } else { | 1293 } else { |
1294 // Increase our height by the amount we had to clear. | 1294 // Increase our height by the amount we had to clear. |
1295 setLogicalHeight(logicalHeight() + heightIncrease); | 1295 setLogicalHeight(logicalHeight() + heightIncrease); |
1296 } | 1296 } |
1297 | 1297 |
1298 if (marginInfo.canCollapseWithMarginBefore()) { | 1298 if (marginInfo.canCollapseWithMarginBefore()) { |
1299 // We can no longer collapse with the top of the block since a clear | 1299 // We can no longer collapse with the top of the block since a clear |
1300 // occurred. The empty blocks collapse into the cleared block. | 1300 // occurred. The empty blocks collapse into the cleared block. |
1301 // FIXME: This isn't quite correct. Need clarification for what to do | |
1302 // if the height the cleared block is offset by is smaller than the | |
1303 // margins involved. | |
Julien - ping for review
2014/03/19 00:56:24
Removing this FIXME is OK but are we matching CSS
| |
1304 setMaxMarginBeforeValues(oldTopPosMargin, oldTopNegMargin); | 1301 setMaxMarginBeforeValues(oldTopPosMargin, oldTopNegMargin); |
1305 marginInfo.setAtBeforeSideOfBlock(false); | 1302 marginInfo.setAtBeforeSideOfBlock(false); |
1306 | 1303 |
1307 // In case the child discarded the before margin of the block we need to reset the mustDiscardMarginBefore flag to the initial value. | 1304 // In case the child discarded the before margin of the block we need to reset the mustDiscardMarginBefore flag to the initial value. |
1308 setMustDiscardMarginBefore(style()->marginBeforeCollapse() == MDISCARD); | 1305 setMustDiscardMarginBefore(style()->marginBeforeCollapse() == MDISCARD); |
1309 } | 1306 } |
1310 | 1307 |
1311 return yPos + heightIncrease; | 1308 return yPos + heightIncrease; |
1312 } | 1309 } |
1313 | 1310 |
(...skipping 1523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2837 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2834 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
2838 { | 2835 { |
2839 if (m_rareData) | 2836 if (m_rareData) |
2840 return *m_rareData; | 2837 return *m_rareData; |
2841 | 2838 |
2842 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); | 2839 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); |
2843 return *m_rareData; | 2840 return *m_rareData; |
2844 } | 2841 } |
2845 | 2842 |
2846 } // namespace WebCore | 2843 } // namespace WebCore |
OLD | NEW |