| 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 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 setHasMarginAfterQuirk(true); | 1343 setHasMarginAfterQuirk(true); |
| 1344 } | 1344 } |
| 1345 } | 1345 } |
| 1346 } | 1346 } |
| 1347 | 1347 |
| 1348 void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox* child, LayoutUnit&
positiveMarginBefore, LayoutUnit& negativeMarginBefore, bool& discardMarginBefo
re) const | 1348 void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox* child, LayoutUnit&
positiveMarginBefore, LayoutUnit& negativeMarginBefore, bool& discardMarginBefo
re) const |
| 1349 { | 1349 { |
| 1350 // Give up if in quirks mode and we're a body/table cell and the top margin
of the child box is quirky. | 1350 // Give up if in quirks mode and we're a body/table cell and the top margin
of the child box is quirky. |
| 1351 // Give up if the child specified -webkit-margin-collapse: separate that pre
vents collapsing. | 1351 // Give up if the child specified -webkit-margin-collapse: separate that pre
vents collapsing. |
| 1352 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. | 1352 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. |
| 1353 if ((document().inQuirksMode() && hasMarginAfterQuirk(child) && (isTableCell
() || isBody())) || child->style()->marginBeforeCollapse() == MSEPARATE) | 1353 if ((document().inQuirksMode() && hasMarginBeforeQuirk(child) && (isTableCel
l() || isBody())) || child->style()->marginBeforeCollapse() == MSEPARATE) |
| 1354 return; | 1354 return; |
| 1355 | 1355 |
| 1356 // The margins are discarded by a child that specified -webkit-margin-collap
se: discard. | 1356 // The margins are discarded by a child that specified -webkit-margin-collap
se: discard. |
| 1357 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. | 1357 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. |
| 1358 if (child->style()->marginBeforeCollapse() == MDISCARD) { | 1358 if (child->style()->marginBeforeCollapse() == MDISCARD) { |
| 1359 positiveMarginBefore = 0; | 1359 positiveMarginBefore = 0; |
| 1360 negativeMarginBefore = 0; | 1360 negativeMarginBefore = 0; |
| 1361 discardMarginBefore = true; | 1361 discardMarginBefore = true; |
| 1362 return; | 1362 return; |
| 1363 } | 1363 } |
| (...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2846 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2846 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
| 2847 { | 2847 { |
| 2848 if (m_rareData) | 2848 if (m_rareData) |
| 2849 return *m_rareData; | 2849 return *m_rareData; |
| 2850 | 2850 |
| 2851 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); | 2851 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); |
| 2852 return *m_rareData; | 2852 return *m_rareData; |
| 2853 } | 2853 } |
| 2854 | 2854 |
| 2855 } // namespace WebCore | 2855 } // namespace WebCore |
| OLD | NEW |