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 |