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

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

Issue 195743002: Remove out-of-date FIXME on collapsing margins (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: WIth test Created 6 years, 9 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 | « LayoutTests/fast/block/margin-collapse/clearance-less-than-margin-expected.html ('k') | no next file » | 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 1282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1293 // i.e., clearance = [height of float] - margin-top". 1293 // i.e., clearance = [height of float] - margin-top".
1294 setLogicalHeight(child->logicalTop() + childMargins.negativeMarginBefore ()); 1294 setLogicalHeight(child->logicalTop() + childMargins.negativeMarginBefore ());
1295 } else { 1295 } else {
1296 // Increase our height by the amount we had to clear. 1296 // Increase our height by the amount we had to clear.
1297 setLogicalHeight(logicalHeight() + heightIncrease); 1297 setLogicalHeight(logicalHeight() + heightIncrease);
1298 } 1298 }
1299 1299
1300 if (marginInfo.canCollapseWithMarginBefore()) { 1300 if (marginInfo.canCollapseWithMarginBefore()) {
1301 // We can no longer collapse with the top of the block since a clear 1301 // We can no longer collapse with the top of the block since a clear
1302 // occurred. The empty blocks collapse into the cleared block. 1302 // occurred. The empty blocks collapse into the cleared block.
1303 // FIXME: This isn't quite correct. Need clarification for what to do
1304 // if the height the cleared block is offset by is smaller than the
1305 // margins involved.
1306 setMaxMarginBeforeValues(oldTopPosMargin, oldTopNegMargin); 1303 setMaxMarginBeforeValues(oldTopPosMargin, oldTopNegMargin);
1307 marginInfo.setAtBeforeSideOfBlock(false); 1304 marginInfo.setAtBeforeSideOfBlock(false);
1308 1305
1309 // In case the child discarded the before margin of the block we need to reset the mustDiscardMarginBefore flag to the initial value. 1306 // In case the child discarded the before margin of the block we need to reset the mustDiscardMarginBefore flag to the initial value.
1310 setMustDiscardMarginBefore(style()->marginBeforeCollapse() == MDISCARD); 1307 setMustDiscardMarginBefore(style()->marginBeforeCollapse() == MDISCARD);
1311 } 1308 }
1312 1309
1313 return yPos + heightIncrease; 1310 return yPos + heightIncrease;
1314 } 1311 }
1315 1312
(...skipping 1524 matching lines...) Expand 10 before | Expand all | Expand 10 after
2840 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2837 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2841 { 2838 {
2842 if (m_rareData) 2839 if (m_rareData)
2843 return *m_rareData; 2840 return *m_rareData;
2844 2841
2845 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2842 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2846 return *m_rareData; 2843 return *m_rareData;
2847 } 2844 }
2848 2845
2849 } // namespace WebCore 2846 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/margin-collapse/clearance-less-than-margin-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698