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

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

Issue 2012943002: Merge "SELECT popup: Do not update popup content for arbitrary attribute change." to M52. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 years, 7 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 8254a174992b257075ca6c8496c67d03e5300c9d..6da2ad4dd50b7bf62fd848db141cf31a8c3d86fd 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -2033,8 +2033,16 @@ HTMLSelectElement::PopupUpdater::PopupUpdater(HTMLSelectElement& select)
: m_select(select)
{
m_observer = MutationObserver::create(this);
+ Vector<String> filter;
+ filter.reserveCapacity(4);
+ // Observe only attributes which affect popup content.
+ filter.append(String("disabled"));
+ filter.append(String("label"));
+ filter.append(String("selected"));
+ filter.append(String("value"));
MutationObserverInit init;
init.setAttributes(true);
+ init.setAttributeFilter(filter);
init.setCharacterData(true);
init.setChildList(true);
init.setSubtree(true);
« 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