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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTableSection.h

Issue 2013693002: [css-tables] Set table and cell widths dirty when section border changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: handle case where row is null Created 4 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
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, 2009, 2013 Apple Inc. All rights reserv ed. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2009, 2013 Apple Inc. All rights reserv ed.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride; 108 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) over ride;
109 109
110 int firstLineBoxBaseline() const override; 110 int firstLineBoxBaseline() const override;
111 111
112 void addCell(LayoutTableCell*, LayoutTableRow*); 112 void addCell(LayoutTableCell*, LayoutTableRow*);
113 113
114 int calcRowLogicalHeight(); 114 int calcRowLogicalHeight();
115 void layoutRows(); 115 void layoutRows();
116 void computeOverflowFromCells(); 116 void computeOverflowFromCells();
117 bool recalcChildOverflowAfterStyleChange(); 117 bool recalcChildOverflowAfterStyleChange();
118 enum WhatToMarkAllCells { MarkDirtyOnly, MarkDirtyAndNeedsLayout };
119 void markAllCellsWidthsDirtyAndOrNeedsLayout(WhatToMarkAllCells);
118 120
119 LayoutTable* table() const { return toLayoutTable(parent()); } 121 LayoutTable* table() const { return toLayoutTable(parent()); }
120 122
121 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells; 123 typedef Vector<LayoutTableCell*, 2> SpanningLayoutTableCells;
122 124
123 // CellStruct represents the cells that occupy an (N, M) position in the 125 // CellStruct represents the cells that occupy an (N, M) position in the
124 // table grid. 126 // table grid.
125 struct CellStruct { 127 struct CellStruct {
126 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 128 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
127 public: 129 public:
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 221
220 CellStruct& cellAt(unsigned row, unsigned effectiveColumn) { return m_grid[ row].row[effectiveColumn]; } 222 CellStruct& cellAt(unsigned row, unsigned effectiveColumn) { return m_grid[ row].row[effectiveColumn]; }
221 const CellStruct& cellAt(unsigned row, unsigned effectiveColumn) const { ret urn m_grid[row].row[effectiveColumn]; } 223 const CellStruct& cellAt(unsigned row, unsigned effectiveColumn) const { ret urn m_grid[row].row[effectiveColumn]; }
222 LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) 224 LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn)
223 { 225 {
224 CellStruct& c = m_grid[row].row[effectiveColumn]; 226 CellStruct& c = m_grid[row].row[effectiveColumn];
225 return c.primaryCell(); 227 return c.primaryCell();
226 } 228 }
227 const LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) const { return const_cast<LayoutTableSection*>(this)->primaryCellAt(row, effect iveColumn); } 229 const LayoutTableCell* primaryCellAt(unsigned row, unsigned effectiveColumn) const { return const_cast<LayoutTableSection*>(this)->primaryCellAt(row, effect iveColumn); }
228 230
231 // Returns null for cells with a rowspan that exceed the last row. Possibly others.
229 LayoutTableRow* rowLayoutObjectAt(unsigned row) { return m_grid[row].rowLayo utObject; } 232 LayoutTableRow* rowLayoutObjectAt(unsigned row) { return m_grid[row].rowLayo utObject; }
230 const LayoutTableRow* rowLayoutObjectAt(unsigned row) const { return m_grid[ row].rowLayoutObject; } 233 const LayoutTableRow* rowLayoutObjectAt(unsigned row) const { return m_grid[ row].rowLayoutObject; }
231 234
232 void appendEffectiveColumn(unsigned pos); 235 void appendEffectiveColumn(unsigned pos);
233 void splitEffectiveColumn(unsigned pos, unsigned first); 236 void splitEffectiveColumn(unsigned pos, unsigned first);
234 237
235 enum BlockBorderSide { BorderBefore, BorderAfter }; 238 enum BlockBorderSide { BorderBefore, BorderAfter };
236 int calcBlockDirectionOuterBorder(BlockBorderSide) const; 239 int calcBlockDirectionOuterBorder(BlockBorderSide) const;
237 enum InlineBorderSide { BorderStart, BorderEnd }; 240 enum InlineBorderSide { BorderStart, BorderEnd };
238 int calcInlineDirectionOuterBorder(InlineBorderSide) const; 241 int calcInlineDirectionOuterBorder(InlineBorderSide) const;
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 bool m_hasMultipleCellLevels; 402 bool m_hasMultipleCellLevels;
400 403
401 LayoutUnit m_offsetForRepeatingHeader; 404 LayoutUnit m_offsetForRepeatingHeader;
402 }; 405 };
403 406
404 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 407 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
405 408
406 } // namespace blink 409 } // namespace blink
407 410
408 #endif // LayoutTableSection_h 411 #endif // LayoutTableSection_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutTableRow.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698