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

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

Issue 2422953003: Repeating header groups should align properly when captions are present (Closed)
Patch Set: Created 4 years, 2 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) 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 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1464 LayoutTableCell* LayoutTable::cellAfter(const LayoutTableCell* cell) const { 1464 LayoutTableCell* LayoutTable::cellAfter(const LayoutTableCell* cell) const {
1465 recalcSectionsIfNeeded(); 1465 recalcSectionsIfNeeded();
1466 1466
1467 unsigned effCol = absoluteColumnToEffectiveColumn( 1467 unsigned effCol = absoluteColumnToEffectiveColumn(
1468 cell->absoluteColumnIndex() + cell->colSpan()); 1468 cell->absoluteColumnIndex() + cell->colSpan());
1469 if (effCol >= numEffectiveColumns()) 1469 if (effCol >= numEffectiveColumns())
1470 return nullptr; 1470 return nullptr;
1471 return cell->section()->primaryCellAt(cell->rowIndex(), effCol); 1471 return cell->section()->primaryCellAt(cell->rowIndex(), effCol);
1472 } 1472 }
1473 1473
1474 LayoutTableCaption* LayoutTable::topCaption() const {
1475 for (auto& caption : m_captions) {
1476 if (caption->style()->captionSide() == ECaptionSide::Top)
mstensho (USE GERRIT) 2016/10/17 19:21:13 There may be more than one top caption.
1477 return caption;
1478 }
1479 return nullptr;
1480 }
1481
1474 int LayoutTable::baselinePosition(FontBaseline baselineType, 1482 int LayoutTable::baselinePosition(FontBaseline baselineType,
1475 bool firstLine, 1483 bool firstLine,
1476 LineDirectionMode direction, 1484 LineDirectionMode direction,
1477 LinePositionMode linePositionMode) const { 1485 LinePositionMode linePositionMode) const {
1478 ASSERT(linePositionMode == PositionOnContainingLine); 1486 ASSERT(linePositionMode == PositionOnContainingLine);
1479 int baseline = firstLineBoxBaseline(); 1487 int baseline = firstLineBoxBaseline();
1480 if (baseline != -1) { 1488 if (baseline != -1) {
1481 if (isInline()) 1489 if (isInline())
1482 return beforeMarginInLineDirection(direction) + baseline; 1490 return beforeMarginInLineDirection(direction) + baseline;
1483 return baseline; 1491 return baseline;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
1660 } 1668 }
1661 1669
1662 LayoutUnit LayoutTable::paddingRight() const { 1670 LayoutUnit LayoutTable::paddingRight() const {
1663 if (collapseBorders()) 1671 if (collapseBorders())
1664 return LayoutUnit(); 1672 return LayoutUnit();
1665 1673
1666 return LayoutBlock::paddingRight(); 1674 return LayoutBlock::paddingRight();
1667 } 1675 }
1668 1676
1669 } // namespace blink 1677 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698