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

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

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.cpp
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index fdeae92e6993e0db353683d9078c0d55f97c1b85..2f9c0904dfe996f0f305d32be1a3edc4d4988e37 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -45,6 +45,7 @@ void StyleResolverState::cacheBorderAndBackground()
void StyleResolverState::clear()
{
m_element = 0;
+ m_childIndex = 0;
m_styledElement = 0;
m_parentStyle = 0;
m_parentNode = 0;
@@ -54,9 +55,10 @@ void StyleResolverState::clear()
m_pendingSVGDocuments.clear();
}
-void StyleResolverState::initElement(Element* e)
+void StyleResolverState::initElement(Element* e, int childIndex)
{
m_element = e;
+ m_childIndex = childIndex;
m_styledElement = e && e->isStyledElement() ? static_cast<StyledElement*>(e) : 0;
m_elementLinkState = e ? e->document()->visitedLinkState()->determineLinkState(e) : NotInsideLink;
}

Powered by Google App Engine
This is Rietveld 408576698