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

Side by Side Diff: Source/core/layout/LayoutTableAlgorithmAuto.cpp

Issue 899163003: Move rendering/RenderObject to layout/LayoutObject. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/layout/LayoutTableCaption.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) 2002 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2002 Lars Knoll (knoll@kde.org)
3 * (C) 2002 Dirk Mueller (mueller@kde.org) 3 * (C) 2002 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2008, 2010 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License. 9 * version 2 of the License.
10 * 10 *
(...skipping 30 matching lines...) Expand all
41 { 41 {
42 } 42 }
43 43
44 void LayoutTableAlgorithmAuto::recalcColumn(unsigned effCol) 44 void LayoutTableAlgorithmAuto::recalcColumn(unsigned effCol)
45 { 45 {
46 Layout& columnLayout = m_layoutStruct[effCol]; 46 Layout& columnLayout = m_layoutStruct[effCol];
47 47
48 LayoutTableCell* fixedContributor = 0; 48 LayoutTableCell* fixedContributor = 0;
49 LayoutTableCell* maxContributor = 0; 49 LayoutTableCell* maxContributor = 0;
50 50
51 for (RenderObject* child = m_table->children()->firstChild(); child; child = child->nextSibling()) { 51 for (LayoutObject* child = m_table->children()->firstChild(); child; child = child->nextSibling()) {
52 if (child->isLayoutTableCol()) { 52 if (child->isLayoutTableCol()) {
53 // LayoutTableCols don't have the concept of preferred logical width , but we need to clear their dirty bits 53 // LayoutTableCols don't have the concept of preferred logical width , but we need to clear their dirty bits
54 // so that if we call setPreferredWidthsDirty(true) on a col or one of its descendants, we'll mark it's 54 // so that if we call setPreferredWidthsDirty(true) on a col or one of its descendants, we'll mark it's
55 // ancestors as dirty. 55 // ancestors as dirty.
56 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits(); 56 toLayoutTableCol(child)->clearPreferredLogicalWidthsDirtyBits();
57 } else if (child->isTableSection()) { 57 } else if (child->isTableSection()) {
58 LayoutTableSection* section = toLayoutTableSection(child); 58 LayoutTableSection* section = toLayoutTableSection(child);
59 unsigned numRows = section->numRows(); 59 unsigned numRows = section->numRows();
60 for (unsigned i = 0; i < numRows; i++) { 60 for (unsigned i = 0; i < numRows; i++) {
61 LayoutTableSection::CellStruct current = section->cellAt(i, effC ol); 61 LayoutTableSection::CellStruct current = section->cellAt(i, effC ol);
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 730
731 int pos = 0; 731 int pos = 0;
732 for (size_t i = 0; i < nEffCols; ++i) { 732 for (size_t i = 0; i < nEffCols; ++i) {
733 m_table->setColumnPosition(i, pos); 733 m_table->setColumnPosition(i, pos);
734 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); 734 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( );
735 } 735 }
736 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); 736 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos);
737 } 737 }
738 738
739 } 739 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTable.cpp ('k') | Source/core/layout/LayoutTableCaption.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698