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

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

Issue 163163002: top and bottom black background line not getting displayed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 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 | « LayoutTests/tables/mozilla/bugs/bug1818-6-expected.txt ('k') | no next file » | 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } else if (child->isTableSection()) { 58 } else if (child->isTableSection()) {
59 RenderTableSection* section = toRenderTableSection(child); 59 RenderTableSection* section = toRenderTableSection(child);
60 unsigned numRows = section->numRows(); 60 unsigned numRows = section->numRows();
61 for (unsigned i = 0; i < numRows; i++) { 61 for (unsigned i = 0; i < numRows; i++) {
62 RenderTableSection::CellStruct current = section->cellAt(i, effC ol); 62 RenderTableSection::CellStruct current = section->cellAt(i, effC ol);
63 RenderTableCell* cell = current.primaryCell(); 63 RenderTableCell* cell = current.primaryCell();
64 64
65 if (current.inColSpan || !cell) 65 if (current.inColSpan || !cell)
66 continue; 66 continue;
67 67
68 bool cellHasContent = cell->children()->firstChild() || cell->st yle()->hasBorder() || cell->style()->hasPadding(); 68 bool cellHasContent = cell->children()->firstChild() || cell->st yle()->hasBorder() || cell->style()->hasPadding() || cell->style()->hasBackgroun d();
69 if (cellHasContent) 69 if (cellHasContent)
70 columnLayout.emptyCellsOnly = false; 70 columnLayout.emptyCellsOnly = false;
71 71
72 // A cell originates in this column. Ensure we have 72 // A cell originates in this column. Ensure we have
73 // a min/max width of at least 1px for this column now. 73 // a min/max width of at least 1px for this column now.
74 columnLayout.minLogicalWidth = max<int>(columnLayout.minLogicalW idth, cellHasContent ? 1 : 0); 74 columnLayout.minLogicalWidth = max<int>(columnLayout.minLogicalW idth, cellHasContent ? 1 : 0);
75 columnLayout.maxLogicalWidth = max<int>(columnLayout.maxLogicalW idth, 1); 75 columnLayout.maxLogicalWidth = max<int>(columnLayout.maxLogicalW idth, 1);
76 76
77 if (cell->colSpan() == 1) { 77 if (cell->colSpan() == 1) {
78 columnLayout.minLogicalWidth = max<int>(cell->minPreferredLo gicalWidth(), columnLayout.minLogicalWidth); 78 columnLayout.minLogicalWidth = max<int>(cell->minPreferredLo gicalWidth(), columnLayout.minLogicalWidth);
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 709
710 int pos = 0; 710 int pos = 0;
711 for (size_t i = 0; i < nEffCols; ++i) { 711 for (size_t i = 0; i < nEffCols; ++i) {
712 m_table->setColumnPosition(i, pos); 712 m_table->setColumnPosition(i, pos);
713 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( ); 713 pos += m_layoutStruct[i].computedLogicalWidth + m_table->hBorderSpacing( );
714 } 714 }
715 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos); 715 m_table->setColumnPosition(m_table->columnPositions().size() - 1, pos);
716 } 716 }
717 717
718 } 718 }
OLDNEW
« no previous file with comments | « LayoutTests/tables/mozilla/bugs/bug1818-6-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698