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

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

Issue 2118743002: Merge "Improve performance of SELECT element by optimizing Vector." to M52 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
index 21d8caa030c0c2362134f2dda82dd5212ddd0ac7..2e8c5f00015959c75756a3c847ed368892124787 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -654,7 +654,7 @@ void HTMLSelectElement::setActiveSelectionAnchor(HTMLOptionElement* option)
// 3. Drag the mouse pointer onto the fourth OPTION
// m_activeSelectionEndIndex = 3, options at 1-3 indices are selected.
// updateListBoxSelection needs to clear selection of the fifth OPTION.
- m_cachedStateForActiveSelection.clear();
+ m_cachedStateForActiveSelection.resize(0);
for (auto& element : listItems()) {
m_cachedStateForActiveSelection.append(isHTMLOptionElement(*element) && toHTMLOptionElement(element)->selected());
}
@@ -803,7 +803,7 @@ void HTMLSelectElement::setRecalcListItems()
void HTMLSelectElement::recalcListItems() const
{
TRACE_EVENT0("blink", "HTMLSelectElement::recalcListItems");
- m_listItems.clear();
+ m_listItems.resize(0);
m_shouldRecalcListItems = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698