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

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

Issue 926193003: Move rendering/RenderBox to layout/LayoutBox. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/LayoutTableRow.cpp ('k') | Source/core/layout/LayoutTableSection.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, 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void increaseEnd() { ++m_end; } 56 void increaseEnd() { ++m_end; }
57 57
58 private: 58 private:
59 unsigned m_start; 59 unsigned m_start;
60 unsigned m_end; 60 unsigned m_end;
61 }; 61 };
62 62
63 class LayoutTableCell; 63 class LayoutTableCell;
64 class LayoutTableRow; 64 class LayoutTableRow;
65 65
66 class LayoutTableSection final : public RenderBox { 66 class LayoutTableSection final : public LayoutBox {
67 public: 67 public:
68 LayoutTableSection(Element*); 68 LayoutTableSection(Element*);
69 virtual ~LayoutTableSection(); 69 virtual ~LayoutTableSection();
70 70
71 LayoutTableRow* firstRow() const; 71 LayoutTableRow* firstRow() const;
72 LayoutTableRow* lastRow() const; 72 LayoutTableRow* lastRow() const;
73 73
74 const LayoutObjectChildList* children() const { return &m_children; } 74 const LayoutObjectChildList* children() const { return &m_children; }
75 LayoutObjectChildList* children() { return &m_children; } 75 LayoutObjectChildList* children() { return &m_children; }
76 76
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 void removeCachedCollapsedBorders(const LayoutTableCell*); 209 void removeCachedCollapsedBorders(const LayoutTableCell*);
210 void setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, C ollapsedBorderValue); 210 void setCachedCollapsedBorder(const LayoutTableCell*, CollapsedBorderSide, C ollapsedBorderValue);
211 CollapsedBorderValue& cachedCollapsedBorder(const LayoutTableCell*, Collapse dBorderSide); 211 CollapsedBorderValue& cachedCollapsedBorder(const LayoutTableCell*, Collapse dBorderSide);
212 212
213 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo gical height. 213 // distributeExtraLogicalHeightToRows methods return the *consumed* extra lo gical height.
214 // FIXME: We may want to introduce a structure holding the in-flux layout in formation. 214 // FIXME: We may want to introduce a structure holding the in-flux layout in formation.
215 int distributeExtraLogicalHeightToRows(int extraLogicalHeight); 215 int distributeExtraLogicalHeightToRows(int extraLogicalHeight);
216 216
217 static LayoutTableSection* createAnonymousWithParentRenderer(const LayoutObj ect*); 217 static LayoutTableSection* createAnonymousWithParentRenderer(const LayoutObj ect*);
218 virtual RenderBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override 218 virtual LayoutBox* createAnonymousBoxWithSameTypeAs(const LayoutObject* pare nt) const override
219 { 219 {
220 return createAnonymousWithParentRenderer(parent); 220 return createAnonymousWithParentRenderer(parent);
221 } 221 }
222 222
223 virtual void paint(const PaintInfo&, const LayoutPoint&) override; 223 virtual void paint(const PaintInfo&, const LayoutPoint&) override;
224 224
225 // Flip the rect so it aligns with the coordinates used by the rowPos and co lumnPos vectors. 225 // Flip the rect so it aligns with the coordinates used by the rowPos and co lumnPos vectors.
226 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const; 226 LayoutRect logicalRectForWritingModeAndDirection(const LayoutRect&) const;
227 227
228 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const; 228 CellSpan dirtiedRows(const LayoutRect& paintInvalidationRect) const;
229 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const; 229 CellSpan dirtiedColumns(const LayoutRect& paintInvalidationRect) const;
230 HashSet<LayoutTableCell*>& overflowingCells() { return m_overflowingCells; } 230 HashSet<LayoutTableCell*>& overflowingCells() { return m_overflowingCells; }
231 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; } 231 bool hasMultipleCellLevels() { return m_hasMultipleCellLevels; }
232 232
233 protected: 233 protected:
234 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride; 234 virtual void styleDidChange(StyleDifference, const LayoutStyle* oldStyle) ov erride;
235 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override; 235 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAct ion) override;
236 236
237 private: 237 private:
238 virtual LayoutObjectChildList* virtualChildren() override { return children( ); } 238 virtual LayoutObjectChildList* virtualChildren() override { return children( ); }
239 virtual const LayoutObjectChildList* virtualChildren() const override { retu rn children(); } 239 virtual const LayoutObjectChildList* virtualChildren() const override { retu rn children(); }
240 240
241 virtual const char* renderName() const override { return (isAnonymous() || i sPseudoElement()) ? "LayoutTableSection (anonymous)" : "LayoutTableSection"; } 241 virtual const char* renderName() const override { return (isAnonymous() || i sPseudoElement()) ? "LayoutTableSection (anonymous)" : "LayoutTableSection"; }
242 242
243 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableSection || RenderBox::isOfType(type); } 243 virtual bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectTableSection || LayoutBox::isOfType(type); }
244 244
245 virtual void willBeRemovedFromTree() override; 245 virtual void willBeRemovedFromTree() override;
246 246
247 virtual void layout() override; 247 virtual void layout() override;
248 248
249 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override; 249 virtual void paintObject(const PaintInfo&, const LayoutPoint&) override;
250 250
251 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override; 251 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0) override;
252 252
253 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowRenderer ? table()->vBorderSpacing() : 0; } 253 int borderSpacingForRow(unsigned row) const { return m_grid[row].rowRenderer ? table()->vBorderSpacing() : 0; }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 // This map holds the collapsed border values for cells with collapsed borde rs. 312 // This map holds the collapsed border values for cells with collapsed borde rs.
313 // It is held at LayoutTableSection level to spare memory consumption by tab le cells. 313 // It is held at LayoutTableSection level to spare memory consumption by tab le cells.
314 HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue> m_cellsColl apsedBorders; 314 HashMap<pair<const LayoutTableCell*, int>, CollapsedBorderValue> m_cellsColl apsedBorders;
315 }; 315 };
316 316
317 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection()); 317 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTableSection, isTableSection());
318 318
319 } // namespace blink 319 } // namespace blink
320 320
321 #endif // LayoutTableSection_h 321 #endif // LayoutTableSection_h
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutTableRow.cpp ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698