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

Unified Diff: Source/core/rendering/RenderTableSection.h

Issue 423093002: Oilpan: Prepare to move RenderObject and RenderObjectChildList to Oilpan heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: dispose -> destroy Created 6 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderTableRowTest.cpp ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderTableSection.h
diff --git a/Source/core/rendering/RenderTableSection.h b/Source/core/rendering/RenderTableSection.h
index 8395a7366a5ff82314400cc21d741944acbebb81..12924ff5502b7487b7bff305196b4ec72c925ca2 100644
--- a/Source/core/rendering/RenderTableSection.h
+++ b/Source/core/rendering/RenderTableSection.h
@@ -64,6 +64,7 @@ class RenderTableSection FINAL : public RenderBox {
public:
RenderTableSection(Element*);
virtual ~RenderTableSection();
+ virtual void trace(Visitor*) OVERRIDE;
RenderTableRow* firstRow() const;
RenderTableRow* lastRow() const;
@@ -83,41 +84,47 @@ public:
RenderTable* table() const { return toRenderTable(parent()); }
- typedef Vector<RenderTableCell*, 2> SpanningRenderTableCells;
+ typedef WillBeHeapVector<RawPtrWillBeMember<RenderTableCell>, 2> SpanningRenderTableCells;
struct CellStruct {
- Vector<RenderTableCell*, 1> cells;
+ ALLOW_ONLY_INLINE_ALLOCATION();
+ public:
+ WillBeHeapVector<RawPtrWillBeMember<RenderTableCell>, 1> cells;
bool inColSpan; // true for columns after the first in a colspan
CellStruct()
: inColSpan(false)
{
}
+ void trace(Visitor*);
RenderTableCell* primaryCell()
{
- return hasCells() ? cells[cells.size() - 1] : 0;
+ return hasCells() ? cells[cells.size() - 1].get() : 0;
}
const RenderTableCell* primaryCell() const
{
- return hasCells() ? cells[cells.size() - 1] : 0;
+ return hasCells() ? cells[cells.size() - 1].get() : 0;
}
bool hasCells() const { return cells.size() > 0; }
};
- typedef Vector<CellStruct> Row;
+ typedef WillBeHeapVector<CellStruct> Row;
struct RowStruct {
+ ALLOW_ONLY_INLINE_ALLOCATION();
+ public:
RowStruct()
- : rowRenderer(0)
+ : rowRenderer(nullptr)
, baseline()
{
}
+ void trace(Visitor*);
Row row;
- RenderTableRow* rowRenderer;
+ RawPtrWillBeMember<RenderTableRow> rowRenderer;
LayoutUnit baseline;
Length logicalHeight;
};
@@ -280,7 +287,7 @@ private:
RenderObjectChildList m_children;
- Vector<RowStruct> m_grid;
+ WillBeHeapVector<RowStruct> m_grid;
Vector<int> m_rowPos;
// the current insertion position
@@ -297,18 +304,31 @@ private:
// This HashSet holds the overflowing cells for faster painting.
// If we have more than gMaxAllowedOverflowingCellRatio * total cells, it will be empty
// and m_forceSlowPaintPathWithOverflowingCell will be set to save memory.
- HashSet<RenderTableCell*> m_overflowingCells;
+ WillBeHeapHashSet<RawPtrWillBeMember<RenderTableCell> > m_overflowingCells;
bool m_forceSlowPaintPathWithOverflowingCell;
bool m_hasMultipleCellLevels;
// This map holds the collapsed border values for cells with collapsed borders.
// It is held at RenderTableSection level to spare memory consumption by table cells.
- HashMap<pair<const RenderTableCell*, int>, CollapsedBorderValue > m_cellsCollapsedBorders;
+ WillBeHeapHashMap<pair<RawPtrWillBeMember<const RenderTableCell>, int>, CollapsedBorderValue > m_cellsCollapsedBorders;
};
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableSection, isTableSection());
} // namespace blink
+namespace WTF {
+
+#if ENABLE(OILPAN)
+template<> struct VectorTraits<blink::RenderTableSection::CellStruct> : VectorTraitsBase<blink::RenderTableSection::CellStruct> {
+ static const bool needsDestruction = false;
+};
+template<> struct VectorTraits<blink::RenderTableSection::RowStruct> : VectorTraitsBase<blink::RenderTableSection::RowStruct> {
+ static const bool needsDestruction = false;
+};
+#endif
+
+}
+
#endif // RenderTableSection_h
« no previous file with comments | « Source/core/rendering/RenderTableRowTest.cpp ('k') | Source/core/rendering/RenderTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698