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

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

Issue 138913007: Move RenderBlock::checkForPaginationLogicalHeightChange method to proper parent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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.h ('k') | Source/core/rendering/RenderBlockFlow.h » ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1480 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1491
1492 updateLogicalWidth(); 1492 updateLogicalWidth();
1493 calcColumnWidth(); 1493 calcColumnWidth();
1494 1494
1495 bool hasBorderOrPaddingLogicalWidthChanged = m_hasBorderOrPaddingLogicalWidt hChanged; 1495 bool hasBorderOrPaddingLogicalWidthChanged = m_hasBorderOrPaddingLogicalWidt hChanged;
1496 m_hasBorderOrPaddingLogicalWidthChanged = false; 1496 m_hasBorderOrPaddingLogicalWidthChanged = false;
1497 1497
1498 return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || hasBorderOrPaddingLogicalWidthChanged; 1498 return oldWidth != logicalWidth() || oldColumnWidth != desiredColumnWidth() || hasBorderOrPaddingLogicalWidthChanged;
1499 } 1499 }
1500 1500
1501 void RenderBlock::checkForPaginationLogicalHeightChange(LayoutUnit& pageLogicalH eight, bool& pageLogicalHeightChanged, bool& hasSpecifiedPageLogicalHeight)
1502 {
1503 ColumnInfo* colInfo = columnInfo();
1504 if (hasColumns()) {
1505 if (!pageLogicalHeight) {
1506 LayoutUnit oldLogicalHeight = logicalHeight();
1507 setLogicalHeight(0);
1508 // We need to go ahead and set our explicit page height if one exist s, so that we can
1509 // avoid doing two layout passes.
1510 updateLogicalHeight();
1511 LayoutUnit columnHeight = contentLogicalHeight();
1512 if (columnHeight > 0) {
1513 pageLogicalHeight = columnHeight;
1514 hasSpecifiedPageLogicalHeight = true;
1515 }
1516 setLogicalHeight(oldLogicalHeight);
1517 }
1518 if (colInfo->columnHeight() != pageLogicalHeight && everHadLayout()) {
1519 colInfo->setColumnHeight(pageLogicalHeight);
1520 pageLogicalHeightChanged = true;
1521 }
1522
1523 if (!hasSpecifiedPageLogicalHeight && !pageLogicalHeight)
1524 colInfo->clearForcedBreaks();
1525
1526 colInfo->setPaginationUnit(paginationUnit());
1527 } else if (isRenderFlowThread()) {
1528 pageLogicalHeight = 1; // This is just a hack to always make sure we hav e a page logical height.
1529 pageLogicalHeightChanged = toRenderFlowThread(this)->pageLogicalSizeChan ged();
1530 }
1531 }
1532
1533 void RenderBlock::layoutBlock(bool) 1501 void RenderBlock::layoutBlock(bool)
1534 { 1502 {
1535 ASSERT_NOT_REACHED(); 1503 ASSERT_NOT_REACHED();
1536 clearNeedsLayout(); 1504 clearNeedsLayout();
1537 } 1505 }
1538 1506
1539 void RenderBlock::addOverflowFromChildren() 1507 void RenderBlock::addOverflowFromChildren()
1540 { 1508 {
1541 if (!hasColumns()) { 1509 if (!hasColumns()) {
1542 if (childrenInline()) 1510 if (childrenInline())
(...skipping 4128 matching lines...) Expand 10 before | Expand all | Expand 10 after
5671 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5639 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5672 { 5640 {
5673 showRenderObject(); 5641 showRenderObject();
5674 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5642 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5675 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5643 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5676 } 5644 }
5677 5645
5678 #endif 5646 #endif
5679 5647
5680 } // namespace WebCore 5648 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/RenderBlockFlow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698