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

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

Issue 179993006: [New multicol] Eliminate the need for RenderMultiColumnBlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review 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
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 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after
3722 3722
3723 LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth(); 3723 LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
3724 m_minPreferredLogicalWidth += borderAndPadding; 3724 m_minPreferredLogicalWidth += borderAndPadding;
3725 m_maxPreferredLogicalWidth += borderAndPadding; 3725 m_maxPreferredLogicalWidth += borderAndPadding;
3726 3726
3727 clearPreferredLogicalWidthsDirty(); 3727 clearPreferredLogicalWidthsDirty();
3728 } 3728 }
3729 3729
3730 void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalW idth, LayoutUnit& maxLogicalWidth) const 3730 void RenderBlock::adjustIntrinsicLogicalWidthsForColumns(LayoutUnit& minLogicalW idth, LayoutUnit& maxLogicalWidth) const
3731 { 3731 {
3732 // FIXME: make this method virtual and move the code to RenderMultiColumnBlo ck once the old
3733 // multicol code is gone.
3734
3735 if (!style()->hasAutoColumnCount() || !style()->hasAutoColumnWidth()) { 3732 if (!style()->hasAutoColumnCount() || !style()->hasAutoColumnWidth()) {
3736 // The min/max intrinsic widths calculated really tell how much space el ements need when 3733 // The min/max intrinsic widths calculated really tell how much space el ements need when
3737 // laid out inside the columns. In order to eventually end up with the d esired column width, 3734 // laid out inside the columns. In order to eventually end up with the d esired column width,
3738 // we need to convert them to values pertaining to the multicol containe r. 3735 // we need to convert them to values pertaining to the multicol containe r.
3739 int columnCount = style()->hasAutoColumnCount() ? 1 : style()->columnCou nt(); 3736 int columnCount = style()->hasAutoColumnCount() ? 1 : style()->columnCou nt();
3740 LayoutUnit columnWidth; 3737 LayoutUnit columnWidth;
3741 LayoutUnit gapExtra = (columnCount - 1) * columnGap(); 3738 LayoutUnit gapExtra = (columnCount - 1) * columnGap();
3742 if (style()->hasAutoColumnWidth()) { 3739 if (style()->hasAutoColumnWidth()) {
3743 minLogicalWidth = minLogicalWidth * columnCount + gapExtra; 3740 minLogicalWidth = minLogicalWidth * columnCount + gapExtra;
3744 } else { 3741 } else {
(...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after
5486 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 5483 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
5487 { 5484 {
5488 showRenderObject(); 5485 showRenderObject();
5489 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 5486 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
5490 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 5487 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
5491 } 5488 }
5492 5489
5493 #endif 5490 #endif
5494 5491
5495 } // namespace WebCore 5492 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698