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

Unified Diff: Source/core/css/resolver/StyleResolver.cpp

Issue 999963003: Add base LayoutStyle parameter to createAnimatableValueSnapshot() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing include 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/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/resolver/StyleResolver.cpp
diff --git a/Source/core/css/resolver/StyleResolver.cpp b/Source/core/css/resolver/StyleResolver.cpp
index 7108fad74878b6bd0b6976e69dff97d8ce9e9e76..81a1ea16741c9d82071413453291172395cc77cc 100644
--- a/Source/core/css/resolver/StyleResolver.cpp
+++ b/Source/core/css/resolver/StyleResolver.cpp
@@ -693,15 +693,10 @@ PassRefPtr<LayoutStyle> StyleResolver::styleForKeyframe(Element& element, const
// This function is used by the WebAnimations JavaScript API method animate().
// FIXME: Remove this when animate() switches away from resolution-dependent parsing.
-PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(Element& element, CSSPropertyID property, CSSValue* value)
+PassRefPtrWillBeRawPtr<AnimatableValue> StyleResolver::createAnimatableValueSnapshot(Element& element, const LayoutStyle* baseStyle, CSSPropertyID property, CSSValue* value)
{
- RefPtr<LayoutStyle> style;
- if (LayoutStyle* elementStyle = element.layoutStyle())
- style = LayoutStyle::clone(*elementStyle);
- else
- style = LayoutStyle::create();
StyleResolverState state(element.document(), &element);
- state.setStyle(style);
+ state.setStyle(baseStyle ? LayoutStyle::clone(*baseStyle) : LayoutStyle::create());
return createAnimatableValueSnapshot(state, property, value);
}
« no previous file with comments | « Source/core/css/resolver/StyleResolver.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698