Loading dom/animation/KeyframeEffectReadOnly.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ #include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt #include "mozilla/KeyframeUtils.h" #include "mozilla/ServoBindings.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/StyleAnimationValueInlines.h" #include "Layers.h" // For Layer #include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContextForElement #include "nsContentUtils.h" // nsContentUtils::ReportToConsole Loading layout/base/nsLayoutUtils.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ #include "mozilla/EventDispatcher.h" #include "mozilla/EventStateManager.h" #include "mozilla/RuleNodeCacheConditions.h" #include "mozilla/StyleAnimationValueInlines.h" #include "mozilla/StyleSetHandle.h" #include "mozilla/StyleSetHandleInlines.h" #include "RegionBuilder.h" Loading layout/painting/nsDisplayList.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ #include "mozilla/OperatorNewExtensions.h" #include "mozilla/PendingAnimationTracker.h" #include "mozilla/Preferences.h" #include "mozilla/StyleAnimationValueInlines.h" #include "mozilla/Telemetry.h" #include "mozilla/UniquePtr.h" #include "mozilla/Unused.h" Loading layout/style/StyleAnimationValue.h +4 −27 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "nsCSSValue.h" #include "nsStyleCoord.h" #include "nsStyleTransformMatrix.h" #include "ServoBindings.h" class nsIFrame; class nsStyleContext; Loading Loading @@ -585,37 +584,15 @@ struct AnimationValue bool IsNull() const { return mGecko.IsNull() && !mServo; } float GetOpacity() const { return mServo ? Servo_AnimationValue_GetOpacity(mServo) : mGecko.GetFloatValue(); } inline float GetOpacity() const; // Returns the scale for mGecko or mServo, which are calculated with // reference to aFrame. gfxSize GetScaleValue(const nsIFrame* aFrame) const { if (mServo) { RefPtr<nsCSSValueSharedList> list; Servo_AnimationValue_GetTransform(mServo, &list); return nsStyleTransformMatrix::GetScaleValue(list, aFrame); } return mGecko.GetScaleValue(aFrame); } inline gfxSize GetScaleValue(const nsIFrame* aFrame) const; // Uncompute this AnimationValue and then serialize it. void SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const { if (mServo) { Servo_AnimationValue_Serialize(mServo, aProperty, &aString); return; } DebugOnly<bool> uncomputeResult = StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString); MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue"); } inline void SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const; }; struct PropertyStyleAnimationValuePair Loading layout/style/StyleAnimationValueInlines.h 0 → 100644 +48 −0 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_StyleAnimationValueInlines_h_ #define mozilla_StyleAnimationValueInlines_h_ #include "mozilla/StyleAnimationValue.h" #include "mozilla/ServoBindings.h" namespace mozilla { float AnimationValue::GetOpacity() const { return mServo ? Servo_AnimationValue_GetOpacity(mServo) : mGecko.GetFloatValue(); } gfxSize AnimationValue::GetScaleValue(const nsIFrame* aFrame) const { if (mServo) { RefPtr<nsCSSValueSharedList> list; Servo_AnimationValue_GetTransform(mServo, &list); return nsStyleTransformMatrix::GetScaleValue(list, aFrame); } return mGecko.GetScaleValue(aFrame); } void AnimationValue::SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const { if (mServo) { Servo_AnimationValue_Serialize(mServo, aProperty, &aString); return; } DebugOnly<bool> uncomputeResult = StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString); MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue"); } } // namespace mozilla #endif // mozilla_StyleAnimationValueInlines_h_ Loading
dom/animation/KeyframeEffectReadOnly.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -18,7 +18,7 @@ #include "mozilla/LookAndFeel.h" // For LookAndFeel::GetInt #include "mozilla/KeyframeUtils.h" #include "mozilla/ServoBindings.h" #include "mozilla/StyleAnimationValue.h" #include "mozilla/StyleAnimationValueInlines.h" #include "Layers.h" // For Layer #include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetStyleContextForElement #include "nsContentUtils.h" // nsContentUtils::ReportToConsole Loading
layout/base/nsLayoutUtils.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -116,6 +116,7 @@ #include "mozilla/EventDispatcher.h" #include "mozilla/EventStateManager.h" #include "mozilla/RuleNodeCacheConditions.h" #include "mozilla/StyleAnimationValueInlines.h" #include "mozilla/StyleSetHandle.h" #include "mozilla/StyleSetHandleInlines.h" #include "RegionBuilder.h" Loading
layout/painting/nsDisplayList.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ #include "mozilla/OperatorNewExtensions.h" #include "mozilla/PendingAnimationTracker.h" #include "mozilla/Preferences.h" #include "mozilla/StyleAnimationValueInlines.h" #include "mozilla/Telemetry.h" #include "mozilla/UniquePtr.h" #include "mozilla/Unused.h" Loading
layout/style/StyleAnimationValue.h +4 −27 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ #include "nsCSSValue.h" #include "nsStyleCoord.h" #include "nsStyleTransformMatrix.h" #include "ServoBindings.h" class nsIFrame; class nsStyleContext; Loading Loading @@ -585,37 +584,15 @@ struct AnimationValue bool IsNull() const { return mGecko.IsNull() && !mServo; } float GetOpacity() const { return mServo ? Servo_AnimationValue_GetOpacity(mServo) : mGecko.GetFloatValue(); } inline float GetOpacity() const; // Returns the scale for mGecko or mServo, which are calculated with // reference to aFrame. gfxSize GetScaleValue(const nsIFrame* aFrame) const { if (mServo) { RefPtr<nsCSSValueSharedList> list; Servo_AnimationValue_GetTransform(mServo, &list); return nsStyleTransformMatrix::GetScaleValue(list, aFrame); } return mGecko.GetScaleValue(aFrame); } inline gfxSize GetScaleValue(const nsIFrame* aFrame) const; // Uncompute this AnimationValue and then serialize it. void SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const { if (mServo) { Servo_AnimationValue_Serialize(mServo, aProperty, &aString); return; } DebugOnly<bool> uncomputeResult = StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString); MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue"); } inline void SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const; }; struct PropertyStyleAnimationValuePair Loading
layout/style/StyleAnimationValueInlines.h 0 → 100644 +48 −0 Original line number Diff line number Diff line /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef mozilla_StyleAnimationValueInlines_h_ #define mozilla_StyleAnimationValueInlines_h_ #include "mozilla/StyleAnimationValue.h" #include "mozilla/ServoBindings.h" namespace mozilla { float AnimationValue::GetOpacity() const { return mServo ? Servo_AnimationValue_GetOpacity(mServo) : mGecko.GetFloatValue(); } gfxSize AnimationValue::GetScaleValue(const nsIFrame* aFrame) const { if (mServo) { RefPtr<nsCSSValueSharedList> list; Servo_AnimationValue_GetTransform(mServo, &list); return nsStyleTransformMatrix::GetScaleValue(list, aFrame); } return mGecko.GetScaleValue(aFrame); } void AnimationValue::SerializeSpecifiedValue(nsCSSPropertyID aProperty, nsAString& aString) const { if (mServo) { Servo_AnimationValue_Serialize(mServo, aProperty, &aString); return; } DebugOnly<bool> uncomputeResult = StyleAnimationValue::UncomputeValue(aProperty, mGecko, aString); MOZ_ASSERT(uncomputeResult, "failed to uncompute StyleAnimationValue"); } } // namespace mozilla #endif // mozilla_StyleAnimationValueInlines_h_