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

Unified Diff: third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h

Issue 2649103007: Make PropertyHandle instances const references where possible (Closed)
Patch Set: Created 3 years, 11 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: third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
diff --git a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
index 44efdf39a6d389c22d549a1f8672d3593b4f023d..b8723a9cf13a2abd96a18dc8d0677d57e45aabf9 100644
--- a/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
+++ b/third_party/WebKit/Source/core/animation/LegacyStyleInterpolation.h
@@ -35,7 +35,7 @@ class CORE_EXPORT LegacyStyleInterpolation : public Interpolation {
// AnimatedStyleBuilder::applyProperty)
// (3) a custom value that is inserted directly into the StyleResolverState.
void apply(StyleResolverState& state) const {
- AnimatedStyleBuilder::applyProperty(m_id, state, currentValue().get());
+ AnimatedStyleBuilder::applyProperty(id(), state, currentValue().get());
}
bool isLegacyStyleInterpolation() const final { return true; }
@@ -44,9 +44,9 @@ class CORE_EXPORT LegacyStyleInterpolation : public Interpolation {
return toInterpolableAnimatableValue(m_cachedValue.get())->value();
}
- CSSPropertyID id() const { return m_id; }
+ CSSPropertyID id() const { return m_property.cssProperty(); }
- PropertyHandle getProperty() const final { return PropertyHandle(id()); }
+ const PropertyHandle& getProperty() const final { return m_property; }
void interpolate(int iteration, double fraction) final;
@@ -58,7 +58,7 @@ class CORE_EXPORT LegacyStyleInterpolation : public Interpolation {
private:
const std::unique_ptr<InterpolableValue> m_start;
const std::unique_ptr<InterpolableValue> m_end;
- CSSPropertyID m_id;
+ PropertyHandle m_property;
mutable double m_cachedFraction;
mutable int m_cachedIteration;

Powered by Google App Engine
This is Rietveld 408576698