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

Unified Diff: sky/engine/core/css/resolver/SharedStyleFinder.cpp

Issue 1036933002: StocksApp hits an ASSERT when bringing up search (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« 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: sky/engine/core/css/resolver/SharedStyleFinder.cpp
diff --git a/sky/engine/core/css/resolver/SharedStyleFinder.cpp b/sky/engine/core/css/resolver/SharedStyleFinder.cpp
index 538e5f851bc86b30c0187ffc8e7b1e6f7c351e46..6ebc540975d1f028fce7b84dcb68e3e8718cdae5 100644
--- a/sky/engine/core/css/resolver/SharedStyleFinder.cpp
+++ b/sky/engine/core/css/resolver/SharedStyleFinder.cpp
@@ -153,7 +153,10 @@ inline Element* SharedStyleFinder::findElementForStyleSharing() const
StyleSharingList& styleSharingList = m_styleResolver.styleSharingList();
for (StyleSharingList::iterator it = styleSharingList.begin(); it != styleSharingList.end(); ++it) {
Element& candidate = **it;
- if (!canShareStyleWithElement(candidate))
+ // We shouldn't have elements in the style sharing list that don't
+ // support style sharing but we can end up with one currently if it gets
+ // added to the list and then it starts an animation.
+ if (candidate.hasActiveAnimations() || !canShareStyleWithElement(candidate))
continue;
if (it != styleSharingList.begin()) {
// Move the element to the front of the LRU
« 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