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

Unified Diff: Source/core/css/resolver/StyleResolverState.h

Issue 18276003: Avoid N^2 walk placing renderers when building the render tree (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Removing extra parens (whoops) Created 7 years, 5 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/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 0dc9caa627bc6299fd8167533a7c11b134be03e0..b8fce1c06eea82f7852039964551e7588a03e575 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -44,6 +44,7 @@ WTF_MAKE_NONCOPYABLE(StyleResolverState);
public:
StyleResolverState()
: m_element(0)
+ , m_childIndex(0)
, m_styledElement(0)
, m_parentNode(0)
, m_parentStyle(0)
@@ -59,12 +60,12 @@ public:
, m_styleMap(*this, m_elementStyleResources)
{ }
-public:
- void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
+ void initForStyleResolve(Document*, Element*, int childIndex = 0, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
void clear();
Document* document() const { return m_element->document(); }
Element* element() const { return m_element; }
+ int childIndex() const { return m_childIndex; }
Element* styledElement() const { return m_styledElement; }
void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
RenderStyle* style() const { return m_style.get(); }
@@ -141,9 +142,10 @@ public:
bool useSVGZoomRules() const { return m_element && m_element->isSVGElement(); }
private:
- void initElement(Element*);
+ void initElement(Element*, int childIndex);
Element* m_element;
+ int m_childIndex;
RefPtr<RenderStyle> m_style;
Element* m_styledElement;
ContainerNode* m_parentNode;
« no previous file with comments | « Source/core/css/resolver/StyleResolver.cpp ('k') | Source/core/css/resolver/StyleResolverState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698