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

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

Issue 203463008: Revert "Get rid of unnecessary layouts on body elements with quirky children" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 | « PerformanceTests/Layout/resources/body_relayout.js ('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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1319 setHasMarginAfterQuirk(true); 1319 setHasMarginAfterQuirk(true);
1320 } 1320 }
1321 } 1321 }
1322 } 1322 }
1323 1323
1324 void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox* child, LayoutUnit& positiveMarginBefore, LayoutUnit& negativeMarginBefore, bool& discardMarginBefo re) const 1324 void RenderBlockFlow::marginBeforeEstimateForChild(RenderBox* child, LayoutUnit& positiveMarginBefore, LayoutUnit& negativeMarginBefore, bool& discardMarginBefo re) const
1325 { 1325 {
1326 // Give up if in quirks mode and we're a body/table cell and the top margin of the child box is quirky. 1326 // Give up if in quirks mode and we're a body/table cell and the top margin of the child box is quirky.
1327 // Give up if the child specified -webkit-margin-collapse: separate that pre vents collapsing. 1327 // Give up if the child specified -webkit-margin-collapse: separate that pre vents collapsing.
1328 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. 1328 // FIXME: Use writing mode independent accessor for marginBeforeCollapse.
1329 if ((document().inQuirksMode() && hasMarginBeforeQuirk(child) && (isTableCel l() || isBody())) || child->style()->marginBeforeCollapse() == MSEPARATE) 1329 if ((document().inQuirksMode() && hasMarginAfterQuirk(child) && (isTableCell () || isBody())) || child->style()->marginBeforeCollapse() == MSEPARATE)
1330 return; 1330 return;
1331 1331
1332 // The margins are discarded by a child that specified -webkit-margin-collap se: discard. 1332 // The margins are discarded by a child that specified -webkit-margin-collap se: discard.
1333 // FIXME: Use writing mode independent accessor for marginBeforeCollapse. 1333 // FIXME: Use writing mode independent accessor for marginBeforeCollapse.
1334 if (child->style()->marginBeforeCollapse() == MDISCARD) { 1334 if (child->style()->marginBeforeCollapse() == MDISCARD) {
1335 positiveMarginBefore = 0; 1335 positiveMarginBefore = 0;
1336 negativeMarginBefore = 0; 1336 negativeMarginBefore = 0;
1337 discardMarginBefore = true; 1337 discardMarginBefore = true;
1338 return; 1338 return;
1339 } 1339 }
(...skipping 1482 matching lines...) Expand 10 before | Expand all | Expand 10 after
2822 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2822 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2823 { 2823 {
2824 if (m_rareData) 2824 if (m_rareData)
2825 return *m_rareData; 2825 return *m_rareData;
2826 2826
2827 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2827 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2828 return *m_rareData; 2828 return *m_rareData;
2829 } 2829 }
2830 2830
2831 } // namespace WebCore 2831 } // namespace WebCore
OLDNEW
« no previous file with comments | « PerformanceTests/Layout/resources/body_relayout.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698