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

Unified Diff: Source/core/dom/Element.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: 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/dom/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/Element.h
diff --git a/Source/core/dom/Element.h b/Source/core/dom/Element.h
index 521ff69970b4afc6536379ca8139f1a627f4ca24..99ef8a6dd3543671f00944603a6a5c66c132c6e2 100644
--- a/Source/core/dom/Element.h
+++ b/Source/core/dom/Element.h
@@ -432,7 +432,7 @@ public:
virtual void detach(const AttachContext& = AttachContext()) OVERRIDE;
virtual RenderObject* createRenderer(RenderStyle*);
virtual bool rendererIsNeeded(const NodeRenderingContext&);
- void recalcStyle(StyleChange = NoChange);
+ void recalcStyle(StyleChange = NoChange, int childIndex = 0);
void didAffectSelector(AffectedSelectorMask);
ElementShadow* shadow() const;
@@ -601,8 +601,8 @@ public:
bool isSpellCheckingEnabled() const;
- PassRefPtr<RenderStyle> styleForRenderer();
- PassRefPtr<RenderStyle> originalStyleForRenderer();
+ PassRefPtr<RenderStyle> styleForRenderer(int childIndex = 0);
+ PassRefPtr<RenderStyle> originalStyleForRenderer(int childIndex = 0);
RenderRegion* renderRegion() const;
const AtomicString& webkitRegionOverset() const;
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698