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

Side by Side 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, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | Source/WebCore/rendering/RenderObjectChildList.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 if (const RenderObjectChildList* children = virtualChildren()) 136 if (const RenderObjectChildList* children = virtualChildren())
137 return children->firstChild(); 137 return children->firstChild();
138 return 0; 138 return 0;
139 } 139 }
140 RenderObject* lastChild() const 140 RenderObject* lastChild() const
141 { 141 {
142 if (const RenderObjectChildList* children = virtualChildren()) 142 if (const RenderObjectChildList* children = virtualChildren())
143 return children->lastChild(); 143 return children->lastChild();
144 return 0; 144 return 0;
145 } 145 }
146 RenderObject* beforePseudoElementRenderer() const
147 {
148 if (const RenderObjectChildList* children = virtualChildren())
149 return children->beforePseudoElementRenderer(this);
150 return 0;
151 }
152 RenderObject* afterPseudoElementRenderer() const
153 {
154 if (const RenderObjectChildList* children = virtualChildren())
155 return children->afterPseudoElementRenderer(this);
156 return 0;
157 }
146 virtual RenderObjectChildList* virtualChildren() { return 0; } 158 virtual RenderObjectChildList* virtualChildren() { return 0; }
147 virtual const RenderObjectChildList* virtualChildren() const { return 0; } 159 virtual const RenderObjectChildList* virtualChildren() const { return 0; }
148 160
149 RenderObject* nextInPreOrder() const; 161 RenderObject* nextInPreOrder() const;
150 RenderObject* nextInPreOrder(RenderObject* stayWithin) const; 162 RenderObject* nextInPreOrder(RenderObject* stayWithin) const;
151 RenderObject* nextInPreOrderAfterChildren() const; 163 RenderObject* nextInPreOrderAfterChildren() const;
152 RenderObject* nextInPreOrderAfterChildren(RenderObject* stayWithin) const; 164 RenderObject* nextInPreOrderAfterChildren(RenderObject* stayWithin) const;
153 RenderObject* previousInPreOrder() const; 165 RenderObject* previousInPreOrder() const;
154 RenderObject* childAt(unsigned) const; 166 RenderObject* childAt(unsigned) const;
155 167
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parent Style = 0, RenderStyle* ownStyle = 0) const; 449 PassRefPtr<RenderStyle> getUncachedPseudoStyle(PseudoId, RenderStyle* parent Style = 0, RenderStyle* ownStyle = 0) const;
438 450
439 virtual void updateDragState(bool dragOn); 451 virtual void updateDragState(bool dragOn);
440 452
441 RenderView* view() const; 453 RenderView* view() const;
442 454
443 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy). 455 // Returns true if this renderer is rooted, and optionally returns the hosti ng view (the root of the hierarchy).
444 bool isRooted(RenderView** = 0); 456 bool isRooted(RenderView** = 0);
445 457
446 Node* node() const { return m_isAnonymous ? 0 : m_node; } 458 Node* node() const { return m_isAnonymous ? 0 : m_node; }
459
460 // Returns the styled node that caused the generation of this renderer.
461 // This is the same as node() except for renderers of :before and :after
462 // pseudo elements for which their parent node is returned.
463 Node* generatingNode() const { return m_node == document() ? 0 : m_node; }
447 void setNode(Node* node) { m_node = node; } 464 void setNode(Node* node) { m_node = node; }
448 465
449 Document* document() const { return m_node->document(); } 466 Document* document() const { return m_node->document(); }
450 Frame* frame() const { return document()->frame(); } 467 Frame* frame() const { return document()->frame(); }
451 468
452 bool hasOutlineAnnotation() const; 469 bool hasOutlineAnnotation() const;
453 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati on(); } 470 bool hasOutline() const { return style()->hasOutline() || hasOutlineAnnotati on(); }
454 471
455 // Returns the object containing this one. Can be different from parent for positioned elements. 472 // Returns the object containing this one. Can be different from parent for positioned elements.
456 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped 473 // If repaintContainer and repaintContainerSkipped are not null, on return * repaintContainerSkipped
(...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after
1042 #ifndef NDEBUG 1059 #ifndef NDEBUG
1043 // Outside the WebCore namespace for ease of invocation from gdb. 1060 // Outside the WebCore namespace for ease of invocation from gdb.
1044 void showTree(const WebCore::RenderObject*); 1061 void showTree(const WebCore::RenderObject*);
1045 void showRenderTree(const WebCore::RenderObject* object1); 1062 void showRenderTree(const WebCore::RenderObject* object1);
1046 // We don't make object2 an optional parameter so that showRenderTree 1063 // We don't make object2 an optional parameter so that showRenderTree
1047 // can be called from gdb easily. 1064 // can be called from gdb easily.
1048 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2); 1065 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO bject* object2);
1049 #endif 1066 #endif
1050 1067
1051 #endif // RenderObject_h 1068 #endif // RenderObject_h
OLDNEW
« 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