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

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: Adding a mitigation for the perf regression to Element::recalcStyle. Created 7 years, 6 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/StyleResolverState.h ('k') | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolverState.cpp
diff --git a/Source/core/css/resolver/StyleResolverState.cpp b/Source/core/css/resolver/StyleResolverState.cpp
index 61078a8cad13e79cff0ac412e8a4845acd3fe4f2..4ab3ab0c2b67a854062baf69927bf1e2cdc37a1d 100644
--- a/Source/core/css/resolver/StyleResolverState.cpp
+++ b/Source/core/css/resolver/StyleResolverState.cpp
@@ -44,6 +44,7 @@ void StyleResolverState::cacheBorderAndBackground()
void StyleResolverState::clear()
{
m_element = 0;
+ m_childIndex = 0;
m_styledElement = 0;
m_parentStyle = 0;
m_parentNode = 0;
@@ -53,9 +54,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() ? e : 0;
m_elementLinkState = e ? e->document()->visitedLinkState()->determineLinkState(e) : NotInsideLink;
}
« no previous file with comments | « Source/core/css/resolver/StyleResolverState.h ('k') | Source/core/dom/ContainerNode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698