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

Side by Side Diff: Source/core/rendering/RenderTableCell.h

Issue 724483002: Move painting code from RenderTableCell to TableCellPainter. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/paint/TableSectionPainter.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('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, 2009, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved.
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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 virtual int borderBefore() const override; 121 virtual int borderBefore() const override;
122 virtual int borderAfter() const override; 122 virtual int borderAfter() const override;
123 123
124 void collectBorderValues(RenderTable::CollapsedBorderValues&) const; 124 void collectBorderValues(RenderTable::CollapsedBorderValues&) const;
125 static void sortBorderValues(RenderTable::CollapsedBorderValues&); 125 static void sortBorderValues(RenderTable::CollapsedBorderValues&);
126 126
127 virtual void layout() override; 127 virtual void layout() override;
128 128
129 virtual void paint(PaintInfo&, const LayoutPoint&) override; 129 virtual void paint(PaintInfo&, const LayoutPoint&) override;
130 130
131 void paintCollapsedBorders(PaintInfo&, const LayoutPoint&);
132 void paintBackgroundsBehindCell(PaintInfo&, const LayoutPoint&, RenderObject * backgroundObject);
133
134 LayoutUnit cellBaselinePosition() const; 131 LayoutUnit cellBaselinePosition() const;
135 bool isBaselineAligned() const 132 bool isBaselineAligned() const
136 { 133 {
137 EVerticalAlign va = style()->verticalAlign(); 134 EVerticalAlign va = style()->verticalAlign();
138 return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SU PER || va == SUB || va == LENGTH; 135 return va == BASELINE || va == TEXT_BOTTOM || va == TEXT_TOP || va == SU PER || va == SUB || va == LENGTH;
139 } 136 }
140 137
141 void computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope&); 138 void computeIntrinsicPadding(int rowHeight, SubtreeLayoutScope&);
142 void clearIntrinsicPadding() { setIntrinsicPadding(0, 0); } 139 void clearIntrinsicPadding() { setIntrinsicPadding(0, 0); }
143 140
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 void setIntrinsicPadding(int before, int after) { setIntrinsicPaddingBefore( before); setIntrinsicPaddingAfter(after); } 253 void setIntrinsicPadding(int before, int after) { setIntrinsicPaddingBefore( before); setIntrinsicPaddingAfter(after); }
257 254
258 bool hasStartBorderAdjoiningTable() const; 255 bool hasStartBorderAdjoiningTable() const;
259 bool hasEndBorderAdjoiningTable() const; 256 bool hasEndBorderAdjoiningTable() const;
260 257
261 CollapsedBorderValue collapsedStartBorder(IncludeBorderColorOrNot = IncludeB orderColor) const; 258 CollapsedBorderValue collapsedStartBorder(IncludeBorderColorOrNot = IncludeB orderColor) const;
262 CollapsedBorderValue collapsedEndBorder(IncludeBorderColorOrNot = IncludeBor derColor) const; 259 CollapsedBorderValue collapsedEndBorder(IncludeBorderColorOrNot = IncludeBor derColor) const;
263 CollapsedBorderValue collapsedBeforeBorder(IncludeBorderColorOrNot = Include BorderColor) const; 260 CollapsedBorderValue collapsedBeforeBorder(IncludeBorderColorOrNot = Include BorderColor) const;
264 CollapsedBorderValue collapsedAfterBorder(IncludeBorderColorOrNot = IncludeB orderColor) const; 261 CollapsedBorderValue collapsedAfterBorder(IncludeBorderColorOrNot = IncludeB orderColor) const;
265 262
266 CollapsedBorderValue cachedCollapsedLeftBorder(const RenderStyle*) const;
267 CollapsedBorderValue cachedCollapsedRightBorder(const RenderStyle*) const;
268 CollapsedBorderValue cachedCollapsedTopBorder(const RenderStyle*) const;
269 CollapsedBorderValue cachedCollapsedBottomBorder(const RenderStyle*) const;
270
271 CollapsedBorderValue computeCollapsedStartBorder(IncludeBorderColorOrNot = I ncludeBorderColor) const; 263 CollapsedBorderValue computeCollapsedStartBorder(IncludeBorderColorOrNot = I ncludeBorderColor) const;
272 CollapsedBorderValue computeCollapsedEndBorder(IncludeBorderColorOrNot = Inc ludeBorderColor) const; 264 CollapsedBorderValue computeCollapsedEndBorder(IncludeBorderColorOrNot = Inc ludeBorderColor) const;
273 CollapsedBorderValue computeCollapsedBeforeBorder(IncludeBorderColorOrNot = IncludeBorderColor) const; 265 CollapsedBorderValue computeCollapsedBeforeBorder(IncludeBorderColorOrNot = IncludeBorderColor) const;
274 CollapsedBorderValue computeCollapsedAfterBorder(IncludeBorderColorOrNot = I ncludeBorderColor) const; 266 CollapsedBorderValue computeCollapsedAfterBorder(IncludeBorderColorOrNot = I ncludeBorderColor) const;
275 267
276 Length logicalWidthFromColumns(RenderTableCol* firstColForThisCell, Length w idthFromStyle) const; 268 Length logicalWidthFromColumns(RenderTableCol* firstColForThisCell, Length w idthFromStyle) const;
277 269
278 void updateColAndRowSpanFlags(); 270 void updateColAndRowSpanFlags();
279 271
280 unsigned parseRowSpanFromDOM() const; 272 unsigned parseRowSpanFromDOM() const;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 304
313 inline RenderTableCell* RenderTableRow::lastCell() const 305 inline RenderTableCell* RenderTableRow::lastCell() const
314 { 306 {
315 ASSERT(children() == virtualChildren()); 307 ASSERT(children() == virtualChildren());
316 return toRenderTableCell(children()->lastChild()); 308 return toRenderTableCell(children()->lastChild());
317 } 309 }
318 310
319 } // namespace blink 311 } // namespace blink
320 312
321 #endif // RenderTableCell_h 313 #endif // RenderTableCell_h
OLDNEW
« no previous file with comments | « Source/core/paint/TableSectionPainter.cpp ('k') | Source/core/rendering/RenderTableCell.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698