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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTable.cpp

Issue 2630723002: Fix blink_perf.paint regression about tables (Closed)
Patch Set: Nits Created 3 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableSection.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) 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, 2007, 2008, 2009, 2010, 2013 Apple Inc. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc.
8 * All rights reserved. 8 * All rights reserved.
9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 9 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
10 * 10 *
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 LayoutTableCell* LayoutTable::cellBefore(const LayoutTableCell* cell) const { 1479 LayoutTableCell* LayoutTable::cellBefore(const LayoutTableCell* cell) const {
1480 recalcSectionsIfNeeded(); 1480 recalcSectionsIfNeeded();
1481 1481
1482 LayoutTableSection* section = cell->section(); 1482 LayoutTableSection* section = cell->section();
1483 unsigned effCol = 1483 unsigned effCol =
1484 absoluteColumnToEffectiveColumn(cell->absoluteColumnIndex()); 1484 absoluteColumnToEffectiveColumn(cell->absoluteColumnIndex());
1485 if (!effCol) 1485 if (!effCol)
1486 return nullptr; 1486 return nullptr;
1487 1487
1488 // If we hit a colspan back up to a real cell. 1488 // If we hit a colspan back up to a real cell.
1489 LayoutTableSection::CellStruct& prevCell = 1489 return section->primaryCellAt(cell->rowIndex(), effCol - 1);
1490 section->cellAt(cell->rowIndex(), effCol - 1);
1491 return prevCell.primaryCell();
1492 } 1490 }
1493 1491
1494 LayoutTableCell* LayoutTable::cellAfter(const LayoutTableCell* cell) const { 1492 LayoutTableCell* LayoutTable::cellAfter(const LayoutTableCell* cell) const {
1495 recalcSectionsIfNeeded(); 1493 recalcSectionsIfNeeded();
1496 1494
1497 unsigned effCol = absoluteColumnToEffectiveColumn( 1495 unsigned effCol = absoluteColumnToEffectiveColumn(
1498 cell->absoluteColumnIndex() + cell->colSpan()); 1496 cell->absoluteColumnIndex() + cell->colSpan());
1499 return cell->section()->primaryCellAt(cell->rowIndex(), effCol); 1497 return cell->section()->primaryCellAt(cell->rowIndex(), effCol);
1500 } 1498 }
1501 1499
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1688 } 1686 }
1689 1687
1690 LayoutUnit LayoutTable::paddingRight() const { 1688 LayoutUnit LayoutTable::paddingRight() const {
1691 if (collapseBorders()) 1689 if (collapseBorders())
1692 return LayoutUnit(); 1690 return LayoutUnit();
1693 1691
1694 return LayoutBlock::paddingRight(); 1692 return LayoutBlock::paddingRight();
1695 } 1693 }
1696 1694
1697 } // namespace blink 1695 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutTableSection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698