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

Unified Diff: Source/core/html/HTMLOptionElement.cpp

Issue 783983005: Fix regression caused by r178354 where options in optgroup not indented (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Reverted change to Element.cpp Created 6 years 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/html.css ('k') | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/css/html.css ('k') | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698