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

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

Issue 2012653002: SELECT popup: Do not update popup content for arbitrary attribute change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 422185fd6be5af1c8254211d2f2ba058ce130c72..f22dd48c44a7be422881379ffe498c32129ffa0c 100644
--- a/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLSelectElement.cpp
@@ -2032,8 +2032,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