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

Unified Diff: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp

Issue 2109993003: Remove redundant calls to HTMLSelectElement::setRecalcListItems(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
Index: third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
index 445dcf6320104355d38b653f5247cf2f58e0d5ec..79806ce88199b8025c14243311e9eef602de3e3d 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptGroupElement.cpp
@@ -97,6 +97,25 @@ bool HTMLOptGroupElement::matchesEnabledPseudoClass() const
return !isDisabledFormControl();
}
+Node::InsertionNotificationRequest HTMLOptGroupElement::insertedInto(ContainerNode* insertionPoint)
+{
+ HTMLElement::insertedInto(insertionPoint);
+ if (HTMLSelectElement* select = ownerSelectElement()) {
+ if (insertionPoint == select)
+ select->optGroupInsertedOrRemoved(*this);
+ }
+ return InsertionDone;
+}
+
+void HTMLOptGroupElement::removedFrom(ContainerNode* insertionPoint)
+{
+ if (isHTMLSelectElement(*insertionPoint)) {
+ if (!parentNode())
+ toHTMLSelectElement(insertionPoint)->optGroupInsertedOrRemoved(*this);
+ }
+ HTMLElement::removedFrom(insertionPoint);
+}
+
void HTMLOptGroupElement::updateNonComputedStyle()
{
m_style = originalStyleForLayoutObject();

Powered by Google App Engine
This is Rietveld 408576698