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

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

Issue 162613007: Reduce the number of parameters to LayoutStateMaintainer by one (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 284
285 if (updateLogicalWidthAndColumnWidth()) 285 if (updateLogicalWidthAndColumnWidth())
286 relayoutChildren = true; 286 relayoutChildren = true;
287 287
288 rebuildFloatsFromIntruding(); 288 rebuildFloatsFromIntruding();
289 289
290 bool pageLogicalHeightChanged = false; 290 bool pageLogicalHeightChanged = false;
291 bool hasSpecifiedPageLogicalHeight = false; 291 bool hasSpecifiedPageLogicalHeight = false;
292 checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightCh anged, hasSpecifiedPageLogicalHeight); 292 checkForPaginationLogicalHeightChange(pageLogicalHeight, pageLogicalHeightCh anged, hasSpecifiedPageLogicalHeight);
293 293
294 RenderView* renderView = view(); 294 LayoutStateMaintainer statePusher(this, locationOffset(), hasColumns() || ha sTransform() || hasReflection() || style()->isFlippedBlocksWritingMode(), pageLo gicalHeight, pageLogicalHeightChanged, columnInfo());
295 LayoutStateMaintainer statePusher(renderView, this, locationOffset(), hasCol umns() || hasTransform() || hasReflection() || style()->isFlippedBlocksWritingMo de(), pageLogicalHeight, pageLogicalHeightChanged, columnInfo());
296 295
297 // Regions changing widths can force us to relayout our children. 296 // Regions changing widths can force us to relayout our children.
298 RenderFlowThread* flowThread = flowThreadContainingBlock(); 297 RenderFlowThread* flowThread = flowThreadContainingBlock();
299 if (updateRegionsAndShapesLogicalSize(flowThread)) 298 if (updateRegionsAndShapesLogicalSize(flowThread))
300 relayoutChildren = true; 299 relayoutChildren = true;
301 300
302 // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track 301 // We use four values, maxTopPos, maxTopNeg, maxBottomPos, and maxBottomNeg, to track
303 // our current maximal positive and negative margins. These values are used when we 302 // our current maximal positive and negative margins. These values are used when we
304 // are collapsed with adjacent blocks, so for example, if you have block A a nd B 303 // are collapsed with adjacent blocks, so for example, if you have block A a nd B
305 // collapsing together, then you'd take the maximal positive margin from bot h A and B 304 // collapsing together, then you'd take the maximal positive margin from bot h A and B
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway). 405 // Add overflow from children (unless we're multi-column, since in that case all our child overflow is clipped anyway).
407 computeOverflow(oldClientAfterEdge); 406 computeOverflow(oldClientAfterEdge);
408 407
409 statePusher.pop(); 408 statePusher.pop();
410 409
411 fitBorderToLinesIfNeeded(); 410 fitBorderToLinesIfNeeded();
412 411
413 if (frameView()->partialLayout().isStopping()) 412 if (frameView()->partialLayout().isStopping())
414 return true; 413 return true;
415 414
415 RenderView* renderView = view();
416 if (renderView->layoutState()->m_pageLogicalHeight) 416 if (renderView->layoutState()->m_pageLogicalHeight)
417 setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop())); 417 setPageLogicalOffset(renderView->layoutState()->pageLogicalOffset(this, logicalTop()));
418 418
419 updateLayerTransform(); 419 updateLayerTransform();
420 420
421 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if 421 // Update our scroll information if we're overflow:auto/scroll/hidden now th at we know if
422 // we overflow or not. 422 // we overflow or not.
423 updateScrollInfoAfterLayout(); 423 updateScrollInfoAfterLayout();
424 424
425 // Repaint with our new bounds if they are different from our old bounds. 425 // Repaint with our new bounds if they are different from our old bounds.
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2732 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2732 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2733 { 2733 {
2734 if (m_rareData) 2734 if (m_rareData)
2735 return *m_rareData; 2735 return *m_rareData;
2736 2736
2737 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2737 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2738 return *m_rareData; 2738 return *m_rareData;
2739 } 2739 }
2740 2740
2741 } // namespace WebCore 2741 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698