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

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: Addressed review issues 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 | « Source/core/animation/ElementAnimations.h ('k') | Source/platform/fonts/Font.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/ElementAnimations.cpp
diff --git a/Source/core/animation/ElementAnimations.cpp b/Source/core/animation/ElementAnimations.cpp
index 86500eca222de8ac8b5f370b13498a3558e4425b..598a71b1065f6729f6088ec7d4475f8f405dde94 100644
--- a/Source/core/animation/ElementAnimations.cpp
+++ b/Source/core/animation/ElementAnimations.cpp
@@ -117,4 +117,15 @@ void ElementAnimations::clearBaseLayoutStyle()
m_baseLayoutStyle = nullptr;
}
+bool ElementAnimations::isAnimationStyleChange() const
+{
+ // TODO(rune@opera.com): The FontFaceCache version number may be increased without forcing
+ // a style recalc (see crbug.com/471079). LayoutStyle objects created with different cache
+ // versions will not be considered equal as Font::operator== will compare versions, hence
+ // LayoutStyle::operator== will return false. We avoid using baseLayoutStyle (the check for
+ // isFallbackValid()) in that case to avoid triggering the LayoutStyle comparison ASSERT
+ // in updateBaseLayoutStyle.
+ return m_animationStyleChange && (!m_baseLayoutStyle || m_baseLayoutStyle->font().isFallbackValid());
+}
+
} // namespace blink
« no previous file with comments | « Source/core/animation/ElementAnimations.h ('k') | Source/platform/fonts/Font.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698