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

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

Issue 295513003: add 'slow' prefix to RenderObject's firstChild() / lastChild() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « Source/core/rendering/RenderListItem.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderObject.h
diff --git a/Source/core/rendering/RenderObject.h b/Source/core/rendering/RenderObject.h
index 3f6f76e6eca7bb84f71780ea28b945228ef905f7..83a96106c1aea6c0db23c03709a674db9cf26431 100644
--- a/Source/core/rendering/RenderObject.h
+++ b/Source/core/rendering/RenderObject.h
@@ -170,18 +170,13 @@ public:
RenderObject* previousSibling() const { return m_previous; }
RenderObject* nextSibling() const { return m_next; }
- // FIXME: These should be renamed slowFirstChild, slowLastChild, etc.
- // to discourage their use. The virtualChildren() call inside these
- // can be slow for hot code paths.
- // Currently, some subclasses like RenderBlock, override these NON-virtual
- // functions to make these fast when we already have a more specific pointer type.
- RenderObject* firstChild() const
+ RenderObject* slowFirstChild() const
{
if (const RenderObjectChildList* children = virtualChildren())
return children->firstChild();
return 0;
}
- RenderObject* lastChild() const
+ RenderObject* slowLastChild() const
{
if (const RenderObjectChildList* children = virtualChildren())
return children->lastChild();
« no previous file with comments | « Source/core/rendering/RenderListItem.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698