Index: Source/core/rendering/RenderTableCell.h |
diff --git a/Source/core/rendering/RenderTableCell.h b/Source/core/rendering/RenderTableCell.h |
index 0107a54f8875c366b8e1f6e6ecc4717f2b6676e9..689b99bb0e022a4e07afce32fe2b731fbdebed04 100644 |
--- a/Source/core/rendering/RenderTableCell.h |
+++ b/Source/core/rendering/RenderTableCell.h |
@@ -4,7 +4,7 @@ |
* (C) 1998 Waldo Bastian (bastian@kde.org) |
* (C) 1999 Lars Knoll (knoll@kde.org) |
* (C) 1999 Antti Koivisto (koivisto@kde.org) |
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009 Apple Inc. All rights reserved. |
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2009, 2013 Apple Inc. All rights reserved. |
* |
* This library is free software; you can redistribute it and/or |
* modify it under the terms of the GNU Library General Public |
@@ -77,6 +77,9 @@ public: |
RenderTableSection* section() const { return toRenderTableSection(parent()->parent()); } |
RenderTable* table() const { return toRenderTable(parent()->parent()->parent()); } |
+ RenderTableCell* previousCell() const; |
+ RenderTableCell* nextCell() const; |
+ |
unsigned rowIndex() const |
{ |
// This function shouldn't be called on a detached cell. |
@@ -277,6 +280,9 @@ private: |
unsigned parseRowSpanFromDOM() const; |
unsigned parseColSpanFromDOM() const; |
+ void nextSibling() const WTF_DELETED_FUNCTION; |
+ void previousSibling() const WTF_DELETED_FUNCTION; |
+ |
// Note MSVC will only pack members if they have identical types, hence we use unsigned instead of bool here. |
unsigned m_column : 29; |
unsigned m_cellWidthChanged : 1; |
@@ -288,6 +294,28 @@ private: |
DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderTableCell, isTableCell()); |
+inline RenderTableCell* RenderTableCell::previousCell() const |
+{ |
+ return toRenderTableCell(RenderObject::previousSibling()); |
+} |
+ |
+inline RenderTableCell* RenderTableCell::nextCell() const |
+{ |
+ return toRenderTableCell(RenderObject::nextSibling()); |
+} |
+ |
+inline RenderTableCell* RenderTableRow::firstCell() const |
+{ |
+ ASSERT(children() == virtualChildren()); |
+ return toRenderTableCell(children()->firstChild()); |
+} |
+ |
+inline RenderTableCell* RenderTableRow::lastCell() const |
+{ |
+ ASSERT(children() == virtualChildren()); |
+ return toRenderTableCell(children()->lastChild()); |
+} |
+ |
} // namespace WebCore |
#endif // RenderTableCell_h |