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

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

Issue 335963002: Change LayoutState to be stack-allocated (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix push function to match old behavior... Created 6 years, 6 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
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 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
342 relayoutChildren = true; 342 relayoutChildren = true;
343 343
344 rebuildFloatsFromIntruding(); 344 rebuildFloatsFromIntruding();
345 345
346 bool pageLogicalHeightChanged = false; 346 bool pageLogicalHeightChanged = false;
347 bool hasSpecifiedPageLogicalHeight = false; 347 bool hasSpecifiedPageLogicalHeight = false;
348 checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightCh anged, hasSpecifiedPageLogicalHeight); 348 checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightCh anged, hasSpecifiedPageLogicalHeight);
349 if (pageLogicalHeightChanged) 349 if (pageLogicalHeightChanged)
350 relayoutChildren = true; 350 relayoutChildren = true;
351 351
352 LayoutStateMaintainer statePusher(*this, locationOffset(), pageLogicalHeight , pageLogicalHeightChanged, columnInfo()); 352 LayoutState state(*this, locationOffset(), pageLogicalHeight, pageLogicalHei ghtChanged, columnInfo());
353 353
354 // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track 354 // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
355 // our current maximal positive and negative margins. These values are used when we 355 // our current maximal positive and negative margins. These values are used when we
356 // are collapsed with adjacent blocks, so for example, if you have block A a nd B 356 // are collapsed with adjacent blocks, so for example, if you have block A a nd B
357 // collapsing together, then you'd take the maximal positive margin from bot h A and B 357 // collapsing together, then you'd take the maximal positive margin from bot h A and B
358 // and subtract it from the maximal negative margin from both A and B to get the 358 // and subtract it from the maximal negative margin from both A and B to get the
359 // true collapsed margin. This algorithm is recursive, so when we finish lay out() 359 // true collapsed margin. This algorithm is recursive, so when we finish lay out()
360 // our block knows its current maximal positive/negative values. 360 // our block knows its current maximal positive/negative values.
361 // 361 //
362 // Start out by setting our margin values to our current margins. Table cell s have 362 // Start out by setting our margin values to our current margins. Table cell s have
(...skipping 2440 matching lines...) Expand 10 before | Expand all | Expand 10 after
2803 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2803 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2804 { 2804 {
2805 if (m_rareData) 2805 if (m_rareData)
2806 return *m_rareData; 2806 return *m_rareData;
2807 2807
2808 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2808 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2809 return *m_rareData; 2809 return *m_rareData;
2810 } 2810 }
2811 2811
2812 } // namespace WebCore 2812 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698