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

Unified Diff: Source/core/dom/Element.cpp

Issue 1181183004: Recalc list items for <select> before updating style for the select. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments. Created 5 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 | 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/dom/Element.cpp
diff --git a/Source/core/dom/Element.cpp b/Source/core/dom/Element.cpp
index 4d361113e4fa9b9249b67d87c85b5c6477805ac0..c2db12d8bc29a05037ba8dc3090e5c7f3f18da23 100644
--- a/Source/core/dom/Element.cpp
+++ b/Source/core/dom/Element.cpp
@@ -1754,8 +1754,13 @@ ElementShadow& Element::ensureShadow()
void Element::pseudoStateChanged(CSSSelector::PseudoType pseudo)
{
+ // We can't schedule invaliation sets from inside style recalc otherwise
+ // we'd never process them.
+ // TODO(esprehn): Make this an ASSERT and fix places that call into this
+ // like HTMLSelectElement.
+ if (document().inStyleRecalc())
+ return;
StyleResolver* styleResolver = document().styleResolver();
-
if (inActiveDocument() && styleResolver && styleChangeType() < SubtreeStyleChange)
document().styleEngine().pseudoStateChangedForElement(pseudo, *this);
}
« no previous file with comments | « no previous file | Source/core/html/HTMLSelectElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698