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

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

Issue 15871005: Avoid N^2 walk placing renderers when building the render tree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Again, updating to ToT. Created 7 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
Index: Source/core/css/resolver/StyleResolverState.h
diff --git a/Source/core/css/resolver/StyleResolverState.h b/Source/core/css/resolver/StyleResolverState.h
index 6c3b2fb8edeeea4ec6eccf75f70d242d66887cec..4616504a2602f6dd1b94a594e004b0753904e63b 100644
--- a/Source/core/css/resolver/StyleResolverState.h
+++ b/Source/core/css/resolver/StyleResolverState.h
@@ -50,6 +50,7 @@ WTF_MAKE_NONCOPYABLE(StyleResolverState);
public:
StyleResolverState()
: m_element(0)
+ , m_childIndex(0)
, m_styledElement(0)
, m_parentNode(0)
, m_parentStyle(0)
@@ -67,7 +68,7 @@ public:
, m_backgroundData(BackgroundFillLayer) { }
public:
- void initElement(Element*);
+ void initElement(Element*, int childIndex);
void initForStyleResolve(Document*, Element*, RenderStyle* parentStyle = 0, RenderRegion* regionForStyling = 0);
void clear();
@@ -75,6 +76,7 @@ public:
Document* document() const { return m_element->document(); }
Element* element() const { return m_element; }
+ int childIndex() const { return m_childIndex; }
StyledElement* styledElement() const { return m_styledElement; }
void setStyle(PassRefPtr<RenderStyle> style) { m_style = style; }
RenderStyle* style() const { return m_style.get(); }
@@ -126,6 +128,7 @@ private:
// variables are public. However we should add methods to access
// these variables.
Element* m_element;
+ int m_childIndex;
RefPtr<RenderStyle> m_style;
StyledElement* m_styledElement;
ContainerNode* m_parentNode;

Powered by Google App Engine
This is Rietveld 408576698