Index: Source/core/html/HTMLOptionElement.cpp |
diff --git a/Source/core/html/HTMLOptionElement.cpp b/Source/core/html/HTMLOptionElement.cpp |
index 90a3895b670fb248d30a38285853dbce40a046f8..018bc3d5924b2d1931c0efc0b6731c3e7db51236 100644 |
--- a/Source/core/html/HTMLOptionElement.cpp |
+++ b/Source/core/html/HTMLOptionElement.cpp |
@@ -330,20 +330,12 @@ bool HTMLOptionElement::isDisabledFormControl() const |
Node::InsertionNotificationRequest HTMLOptionElement::insertedInto(ContainerNode* insertionPoint) |
{ |
+ HTMLElement::insertedInto(insertionPoint); |
if (HTMLSelectElement* select = ownerSelectElement()) { |
select->setRecalcListItems(); |
- // Do not call selected() since calling updateListItemSelectedStates() |
- // at this time won't do the right thing. (Why, exactly?) |
- if (m_isSelected) { |
- // FIXME: Might be better to call this unconditionally, always |
- // passing m_isSelected, rather than only calling it if we are |
- // selected. |
- select->optionSelectionStateChanged(this, true); |
- select->scrollToSelection(); |
- } |
+ select->optionInserted(*this, m_isSelected); |
} |
- |
- return HTMLElement::insertedInto(insertionPoint); |
+ return InsertionDone; |
} |
void HTMLOptionElement::removedFrom(ContainerNode* insertionPoint) |
@@ -386,7 +378,7 @@ void HTMLOptionElement::didAddUserAgentShadowRoot(ShadowRoot& root) |
void HTMLOptionElement::updateLabel() |
{ |
if (ShadowRoot* root = userAgentShadowRoot()) |
- root->setTextContent(textIndentedToRespectGroupLabel()); |
+ root->setTextContent(text()); |
} |
bool HTMLOptionElement::spatialNavigationFocused() const |