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

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

Issue 147233002: Remove internal recursion for RenderBlockFlow and RenderMultiColumnBlock layout (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Make the shouldRelayout* methods const and add comment for the while loop 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
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 3505 matching lines...) Expand 10 before | Expand all | Expand 10 after
3516 colLogicalTop += index * (colLogicalHeight + colGap); 3516 colLogicalTop += index * (colLogicalHeight + colGap);
3517 else 3517 else
3518 colLogicalTop += contentLogicalHeight() - colLogicalHeight - index * (colLogicalHeight + colGap); 3518 colLogicalTop += contentLogicalHeight() - colLogicalHeight - index * (colLogicalHeight + colGap);
3519 } 3519 }
3520 3520
3521 if (isHorizontalWritingMode()) 3521 if (isHorizontalWritingMode())
3522 return LayoutRect(colLogicalLeft, colLogicalTop, colLogicalWidth, colLog icalHeight); 3522 return LayoutRect(colLogicalLeft, colLogicalTop, colLogicalWidth, colLog icalHeight);
3523 return LayoutRect(colLogicalTop, colLogicalLeft, colLogicalHeight, colLogica lWidth); 3523 return LayoutRect(colLogicalTop, colLogicalLeft, colLogicalHeight, colLogica lWidth);
3524 } 3524 }
3525 3525
3526 bool RenderBlock::relayoutToAvoidWidows(LayoutStateMaintainer& statePusher)
3527 {
3528 if (!shouldBreakAtLineToAvoidWidow())
3529 return false;
3530
3531 statePusher.pop();
3532 setEverHadLayout(true);
3533 layoutBlock(false);
3534 return true;
3535 }
3536
3537 void RenderBlock::adjustPointToColumnContents(LayoutPoint& point) const 3526 void RenderBlock::adjustPointToColumnContents(LayoutPoint& point) const
3538 { 3527 {
3539 // Just bail if we have no columns. 3528 // Just bail if we have no columns.
3540 if (!hasColumns()) 3529 if (!hasColumns())
3541 return; 3530 return;
3542 3531
3543 ColumnInfo* colInfo = columnInfo(); 3532 ColumnInfo* colInfo = columnInfo();
3544 if (!columnCount(colInfo)) 3533 if (!columnCount(colInfo))
3545 return; 3534 return;
3546 3535
(...skipping 2132 matching lines...) Expand 10 before | Expand all | Expand 10 after
5679 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5668 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5680 { 5669 {
5681 showRenderObject(); 5670 showRenderObject();
5682 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5671 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5683 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5672 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5684 } 5673 }
5685 5674
5686 #endif 5675 #endif
5687 5676
5688 } // namespace WebCore 5677 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698