Bug 1360776 - Pass AnimationValueMap raw pointer instead of Arc to Gecko_GetAnimationRule(). r=emilio

MozReview-Commit-ID: 5o8NuJolG2R

--HG--
extra : rebase_source : 13d732112dfe5614a83657c7bf7703944050c0f4
This commit is contained in:
Hiroyuki Ikezoe 2017-05-01 18:45:41 +09:00
Родитель c6f36404ea
Коммит d8fafebff7
10 изменённых файлов: 15 добавлений и 14 удалений

Просмотреть файл

@ -1525,8 +1525,8 @@ Animation::ComposeStyle<RefPtr<AnimValuesStyleRule>&>(
template
void
Animation::ComposeStyle<const RawServoAnimationValueMap&>(
const RawServoAnimationValueMap& aAnimationValues,
Animation::ComposeStyle<RawServoAnimationValueMap&>(
RawServoAnimationValueMap& aAnimationValues,
const nsCSSPropertyIDSet& aPropertiesToSkip);
} // namespace dom

Просмотреть файл

@ -476,7 +476,7 @@ EffectCompositor::GetServoAnimationRule(
const dom::Element* aElement,
CSSPseudoElementType aPseudoType,
CascadeLevel aCascadeLevel,
RawServoAnimationValueMapBorrowed aAnimationValues)
RawServoAnimationValueMapBorrowedMut aAnimationValues)
{
MOZ_ASSERT(aAnimationValues);
MOZ_ASSERT(mPresContext && mPresContext->IsDynamic(),

Просмотреть файл

@ -25,7 +25,7 @@ class nsIStyleRule;
class nsPresContext;
class nsStyleContext;
struct RawServoAnimationValueMap;
typedef RawServoAnimationValueMap const* RawServoAnimationValueMapBorrowed;
typedef RawServoAnimationValueMap* RawServoAnimationValueMapBorrowedMut;
namespace mozilla {
@ -163,7 +163,7 @@ public:
const dom::Element* aElement,
CSSPseudoElementType aPseudoType,
CascadeLevel aCascadeLevel,
RawServoAnimationValueMapBorrowed aAnimationValues);
RawServoAnimationValueMapBorrowedMut aAnimationValues);
bool HasPendingStyleUpdates() const;
bool HasThrottledStyleUpdates() const;

Просмотреть файл

@ -661,7 +661,7 @@ KeyframeEffectReadOnly::ComposeStyleRule(
// better to remove the duplicated code.
void
KeyframeEffectReadOnly::ComposeStyleRule(
const RawServoAnimationValueMap& aAnimationValues,
RawServoAnimationValueMap& aAnimationValues,
const AnimationProperty& aProperty,
const AnimationPropertySegment& aSegment,
const ComputedTiming& aComputedTiming)
@ -1881,8 +1881,8 @@ KeyframeEffectReadOnly::ComposeStyle<RefPtr<AnimValuesStyleRule>&>(
template
void
KeyframeEffectReadOnly::ComposeStyle<const RawServoAnimationValueMap&>(
const RawServoAnimationValueMap& aAnimationValues,
KeyframeEffectReadOnly::ComposeStyle<RawServoAnimationValueMap&>(
RawServoAnimationValueMap& aAnimationValues,
const nsCSSPropertyIDSet& aPropertiesToSkip);
} // namespace dom

Просмотреть файл

@ -431,7 +431,7 @@ private:
const AnimationPropertySegment& aSegment,
const ComputedTiming& aComputedTiming);
void ComposeStyleRule(const RawServoAnimationValueMap& aAnimationValues,
void ComposeStyleRule(RawServoAnimationValueMap& aAnimationValues,
const AnimationProperty& aProperty,
const AnimationPropertySegment& aSegment,
const ComputedTiming& aComputedTiming);

Просмотреть файл

@ -13,7 +13,6 @@ SERVO_ARC_TYPE(DeclarationBlock, RawServoDeclarationBlock)
SERVO_ARC_TYPE(StyleRule, RawServoStyleRule)
SERVO_ARC_TYPE(ImportRule, RawServoImportRule)
SERVO_ARC_TYPE(AnimationValue, RawServoAnimationValue)
SERVO_ARC_TYPE(AnimationValueMap, RawServoAnimationValueMap)
SERVO_ARC_TYPE(MediaList, RawServoMediaList)
SERVO_ARC_TYPE(MediaRule, RawServoMediaRule)
SERVO_ARC_TYPE(NamespaceRule, RawServoNamespaceRule)

Просмотреть файл

@ -148,7 +148,7 @@ SERVO_BINDING_FUNC(Servo_GetComputedKeyframeValues, void,
RawServoStyleSetBorrowed set,
RawGeckoComputedKeyframeValuesListBorrowedMut result)
SERVO_BINDING_FUNC(Servo_AnimationValueMap_Push, void,
RawServoAnimationValueMapBorrowed,
RawServoAnimationValueMapBorrowedMut,
nsCSSPropertyID property,
RawServoAnimationValueBorrowed value)
SERVO_BINDING_FUNC(Servo_ComputedValues_ExtractAnimationValue,
@ -244,7 +244,7 @@ SERVO_BINDING_FUNC(Servo_DeclarationBlock_HasCSSWideKeyword, bool,
// |base_values| is nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>.
// We use void* to avoid exposing nsRefPtrHashtable in FFI.
SERVO_BINDING_FUNC(Servo_AnimationCompose, void,
RawServoAnimationValueMapBorrowed animation_values,
RawServoAnimationValueMapBorrowedMut animation_values,
void* base_values,
nsCSSPropertyID property,
RawGeckoAnimationPropertySegmentBorrowed animation_segment,

Просмотреть файл

@ -14,6 +14,7 @@
#include "nsTArray.h"
struct RawServoStyleSet;
struct RawServoAnimationValueMap;
#define SERVO_ARC_TYPE(name_, type_) struct type_;
#include "mozilla/ServoArcTypeList.h"
@ -108,6 +109,7 @@ DECL_OWNED_REF_TYPE_FOR(RawServoStyleSet)
DECL_NULLABLE_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(StyleChildrenIterator)
DECL_OWNED_REF_TYPE_FOR(ServoElementSnapshot)
DECL_OWNED_REF_TYPE_FOR(RawServoAnimationValueMap)
// We don't use BorrowedMut because the nodes may alias
// Servo itself doesn't directly read or mutate these;

Просмотреть файл

@ -461,7 +461,7 @@ PseudoTagAndCorrectElementForAnimation(const Element*& aElementOrPseudo) {
bool
Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement,
EffectCompositor::CascadeLevel aCascadeLevel,
RawServoAnimationValueMapBorrowed aAnimationValues)
RawServoAnimationValueMapBorrowedMut aAnimationValues)
{
MOZ_ASSERT(aElement);

Просмотреть файл

@ -193,7 +193,7 @@ Gecko_GetExtraContentStyleDeclarations(RawGeckoElementBorrowed element);
bool
Gecko_GetAnimationRule(RawGeckoElementBorrowed aElementOrPseudo,
mozilla::EffectCompositor::CascadeLevel aCascadeLevel,
RawServoAnimationValueMapBorrowed aAnimationValues);
RawServoAnimationValueMapBorrowedMut aAnimationValues);
RawServoDeclarationBlockStrongBorrowedOrNull
Gecko_GetSMILOverrideDeclarationBlock(RawGeckoElementBorrowed element);
bool Gecko_StyleAnimationsEquals(RawGeckoStyleAnimationListBorrowed,