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

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

Issue 1837463002: Improve conformance of default OPTION selection of SELECT element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renaming to resetToDefaultSelection Created 4 years, 9 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/HTMLOptionElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
index f159f0982e25052845d653447788655faabf1452..63919f9d0e2268929657f8a2f473d7421e43d284 100644
--- a/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLOptionElement.cpp
@@ -239,18 +239,6 @@ void HTMLOptionElement::setValue(const AtomicString& value)
bool HTMLOptionElement::selected() const
{
- if (HTMLSelectElement* select = ownerSelectElement()) {
- // If a stylesheet contains option:checked selectors, this function is
- // called during parsing. updateListItemSelectedStates() is O(N) where N
- // is the number of option elements, so the <select> parsing would be
- // O(N^2) without the isFinishedParsingChildren check. Also,
- // updateListItemSelectedStates() determines default selection, and we'd
- // like to avoid to determine default selection with incomplete option
- // list.
- if (!select->isFinishedParsingChildren())
- return m_isSelected;
- select->updateListItemSelectedStates();
- }
return m_isSelected;
}

Powered by Google App Engine
This is Rietveld 408576698