Index: Source/WebCore/rendering/RenderObject.h |
=================================================================== |
--- Source/WebCore/rendering/RenderObject.h (revision 95468) |
+++ Source/WebCore/rendering/RenderObject.h (working copy) |
@@ -337,6 +337,28 @@ |
static inline bool isAfterContent(const RenderObject* obj) { return obj && obj->isAfterContent(); } |
static inline bool isBeforeOrAfterContent(const RenderObject* obj) { return obj && obj->isBeforeOrAfterContent(); } |
+ inline RenderObject* findBeforeContentRenderer() const |
+ { |
+ RenderObject* renderer = beforePseudoElementRenderer(); |
+ return isBeforeContent(renderer) ? renderer : 0; |
+ } |
+ |
+ inline RenderObject* findAfterContentRenderer() const |
+ { |
+ RenderObject* renderer = afterPseudoElementRenderer(); |
+ return isAfterContent(renderer) ? renderer : 0; |
+ } |
+ |
+ inline RenderObject* anonymousContainer(RenderObject* child) |
+ { |
+ RenderObject* container = child; |
+ while (container->parent() != this) |
+ container = container->parent(); |
+ |
+ ASSERT(container->isAnonymous()); |
+ return container; |
+ } |
+ |
bool childrenInline() const { return m_childrenInline; } |
void setChildrenInline(bool b = true) { m_childrenInline = b; } |
bool hasColumns() const { return m_hasColumns; } |