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

Unified Diff: Source/WebCore/rendering/RenderObject.h

Issue 6596056: Merge 77191 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/648/
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObject.h
===================================================================
--- Source/WebCore/rendering/RenderObject.h (revision 79928)
+++ Source/WebCore/rendering/RenderObject.h (working copy)
@@ -143,6 +143,18 @@
return children->lastChild();
return 0;
}
+ RenderObject* beforePseudoElementRenderer() const
+ {
+ if (const RenderObjectChildList* children = virtualChildren())
+ return children->beforePseudoElementRenderer(this);
+ return 0;
+ }
+ RenderObject* afterPseudoElementRenderer() const
+ {
+ if (const RenderObjectChildList* children = virtualChildren())
+ return children->afterPseudoElementRenderer(this);
+ return 0;
+ }
virtual RenderObjectChildList* virtualChildren() { return 0; }
virtual const RenderObjectChildList* virtualChildren() const { return 0; }
@@ -444,6 +456,11 @@
bool isRooted(RenderView** = 0);
Node* node() const { return m_isAnonymous ? 0 : m_node; }
+
+ // Returns the styled node that caused the generation of this renderer.
+ // This is the same as node() except for renderers of :before and :after
+ // pseudo elements for which their parent node is returned.
+ Node* generatingNode() const { return m_node == document() ? 0 : m_node; }
void setNode(Node* node) { m_node = node; }
Document* document() const { return m_node->document(); }
« no previous file with comments | « no previous file | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698