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

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

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle 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/core/animation/InterpolationEffect.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 598a71b1065f6729f6088ec7d4475f8f405dde94..6152e263cb551afcd124380e7c12e17485cd818f 100644
--- a/Source/core/animation/ElementAnimations.cpp
+++ b/Source/core/animation/ElementAnimations.cpp
@@ -49,7 +49,7 @@ ElementAnimations::~ElementAnimations()
#endif
}
-void ElementAnimations::updateAnimationFlags(LayoutStyle& style)
+void ElementAnimations::updateAnimationFlags(ComputedStyle& style)
{
for (const auto& entry : m_players) {
const AnimationPlayer& player = *entry.key;
@@ -90,42 +90,42 @@ DEFINE_TRACE(ElementAnimations)
#endif
}
-const LayoutStyle* ElementAnimations::baseLayoutStyle() const
+const ComputedStyle* ElementAnimations::baseComputedStyle() const
{
#if !ENABLE(ASSERT)
if (isAnimationStyleChange())
- return m_baseLayoutStyle.get();
+ return m_baseComputedStyle.get();
#endif
return nullptr;
}
-void ElementAnimations::updateBaseLayoutStyle(const LayoutStyle* layoutStyle)
+void ElementAnimations::updateBaseComputedStyle(const ComputedStyle* computedStyle)
{
if (!isAnimationStyleChange()) {
- m_baseLayoutStyle = nullptr;
+ m_baseComputedStyle = nullptr;
return;
}
#if ENABLE(ASSERT)
- if (m_baseLayoutStyle && layoutStyle)
- ASSERT(*m_baseLayoutStyle == *layoutStyle);
+ if (m_baseComputedStyle && computedStyle)
+ ASSERT(*m_baseComputedStyle == *computedStyle);
#endif
- m_baseLayoutStyle = LayoutStyle::clone(*layoutStyle);
+ m_baseComputedStyle = ComputedStyle::clone(*computedStyle);
}
-void ElementAnimations::clearBaseLayoutStyle()
+void ElementAnimations::clearBaseComputedStyle()
{
- m_baseLayoutStyle = nullptr;
+ m_baseComputedStyle = 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
+ // a style recalc (see crbug.com/471079). ComputedStyle 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());
+ // ComputedStyle::operator== will return false. We avoid using baseComputedStyle (the check for
+ // isFallbackValid()) in that case to avoid triggering the ComputedStyle comparison ASSERT
+ // in updateBaseComputedStyle.
+ return m_animationStyleChange && (!m_baseComputedStyle || m_baseComputedStyle->font().isFallbackValid());
}
} // namespace blink
« no previous file with comments | « Source/core/animation/ElementAnimations.h ('k') | Source/core/animation/InterpolationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698