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

Unified Diff: Source/core/animation/ElementAnimations.cpp

Issue 1038193002: Clear baseLayoutStyle when the font selector version has increased. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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
Index: Source/core/animation/ElementAnimations.cpp
diff --git a/Source/core/animation/ElementAnimations.cpp b/Source/core/animation/ElementAnimations.cpp
index 86500eca222de8ac8b5f370b13498a3558e4425b..4af2dcac5c1c8cf2cd7c075b13161899fcb54827 100644
--- a/Source/core/animation/ElementAnimations.cpp
+++ b/Source/core/animation/ElementAnimations.cpp
@@ -90,13 +90,20 @@ DEFINE_TRACE(ElementAnimations)
#endif
}
-const LayoutStyle* ElementAnimations::baseLayoutStyle() const
+const LayoutStyle* ElementAnimations::validateBaseLayoutStyle()
{
-#if !ENABLE(ASSERT)
- if (isAnimationStyleChange())
- return m_baseLayoutStyle.get();
-#endif
+ if (!m_baseLayoutStyle)
+ return nullptr;
+
+ if (!isAnimationStyleChange() || !m_baseLayoutStyle->font().isFallbackValid()) {
+ setAnimationStyleChange(false);
esprehn 2015/03/26 23:28:15 This bit may be read in a bunch of places, this wo
rune 2015/03/27 07:14:22 Yep. Doing this made the patch a lot simpler. Don
+ clearBaseLayoutStyle();
+ }
+#if ENABLE(ASSERT)
return nullptr;
+#else
+ return m_baseLayoutStyle.get();
+#endif
}
void ElementAnimations::updateBaseLayoutStyle(const LayoutStyle* layoutStyle)

Powered by Google App Engine
This is Rietveld 408576698