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

Side by Side Diff: Source/WebCore/rendering/RenderTableSection.cpp

Issue 10807056: Revert 117339 - CSS 2.1 failure: inline-table-001 fails (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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/WebCore/rendering/RenderTable.cpp ('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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 927 matching lines...) Expand 10 before | Expand all | Expand 10 after
938 938
939 LayoutUnit firstLineBaseline = m_grid[0].baseline; 939 LayoutUnit firstLineBaseline = m_grid[0].baseline;
940 if (firstLineBaseline) 940 if (firstLineBaseline)
941 return firstLineBaseline + m_rowPos[0]; 941 return firstLineBaseline + m_rowPos[0];
942 942
943 firstLineBaseline = -1; 943 firstLineBaseline = -1;
944 const Row& firstRow = m_grid[0].row; 944 const Row& firstRow = m_grid[0].row;
945 for (size_t i = 0; i < firstRow.size(); ++i) { 945 for (size_t i = 0; i < firstRow.size(); ++i) {
946 const CellStruct& cs = firstRow.at(i); 946 const CellStruct& cs = firstRow.at(i);
947 const RenderTableCell* cell = cs.primaryCell(); 947 const RenderTableCell* cell = cs.primaryCell();
948 // Only cells with content have a baseline 948 if (cell)
949 if (cell && cell->contentLogicalHeight())
950 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell ->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight()); 949 firstLineBaseline = max(firstLineBaseline, cell->logicalTop() + cell ->paddingBefore() + cell->borderBefore() + cell->contentLogicalHeight());
951 } 950 }
952 951
953 return firstLineBaseline; 952 return firstLineBaseline;
954 } 953 }
955 954
956 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff set) 955 void RenderTableSection::paint(PaintInfo& paintInfo, const LayoutPoint& paintOff set)
957 { 956 {
958 // put this back in when all layout tests can handle it 957 // put this back in when all layout tests can handle it
959 // ASSERT(!needsLayout()); 958 // ASSERT(!needsLayout());
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 if (!cell->styleForCellFlow()->isLeftToRightDirection()) 1490 if (!cell->styleForCellFlow()->isLeftToRightDirection())
1492 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing); 1491 cellLocation.setX(table()->columnPositions()[table()->numEffCols()] - ta ble()->columnPositions()[table()->colToEffCol(cell->col() + cell->colSpan())] + horizontalBorderSpacing);
1493 else 1492 else
1494 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing); 1493 cellLocation.setX(table()->columnPositions()[effectiveColumn] + horizont alBorderSpacing);
1495 1494
1496 cell->setLogicalLocation(cellLocation); 1495 cell->setLogicalLocation(cellLocation);
1497 view()->addLayoutDelta(oldCellLocation - cell->location()); 1496 view()->addLayoutDelta(oldCellLocation - cell->location());
1498 } 1497 }
1499 1498
1500 } // namespace WebCore 1499 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderTable.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698