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

Unified Diff: Source/core/html/HTMLInputElement.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/html/HTMLInputElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLInputElement.cpp
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp
index de999dda4948a273599990e3c4940783a158fd50..545c855e60b4e37fc57dbf2a023131597505b31a 100644
--- a/Source/core/html/HTMLInputElement.cpp
+++ b/Source/core/html/HTMLInputElement.cpp
@@ -1462,11 +1462,16 @@ void HTMLInputElement::didChangeForm()
addToRadioButtonGroup();
}
+void HTMLInputElement::addToRadioButtonGroupCallback(Element* element)
+{
+ toHTMLInputElement(element)->addToRadioButtonGroup();
+}
+
Node::InsertionNotificationRequest HTMLInputElement::insertedInto(ContainerNode* insertionPoint)
{
HTMLTextFormControlElement::insertedInto(insertionPoint);
- if (insertionPoint->inDocument() && !form())
- addToRadioButtonGroup();
+ if (insertionPoint->inDocument() && !form() && checkedRadioButtons())
+ queueInsertionCallback(addToRadioButtonGroupCallback, this);
resetListAttributeTargetObserver();
return InsertionDone;
}
« no previous file with comments | « Source/core/html/HTMLInputElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698