Bug 947062 - Make background-position inline-style changes and CSS animations trigger layer activity. r=roc

--HG--
extra : commitid : 8Qu6NaiH9Ww
extra : rebase_source : 053f9d124287e10077c93c8e82afb60d2fab8d49
This commit is contained in:
Markus Stange 2015-10-22 22:45:14 +02:00
parent 5b914060de
commit 9b562aa73b
2 changed files with 5 additions and 1 deletions

View File

@ -47,6 +47,7 @@ public:
, mMarginTopRestyleCount(0)
, mMarginRightRestyleCount(0)
, mMarginBottomRestyleCount(0)
, mBackgroundPositionRestyleCount(0)
, mContentActive(false)
{}
~LayerActivity();
@ -64,6 +65,7 @@ public:
case eCSSProperty_margin_top: return mMarginTopRestyleCount;
case eCSSProperty_margin_right: return mMarginRightRestyleCount;
case eCSSProperty_margin_bottom: return mMarginBottomRestyleCount;
case eCSSProperty_background_position: return mBackgroundPositionRestyleCount;
default: MOZ_ASSERT(false); return mOpacityRestyleCount;
}
}
@ -92,6 +94,7 @@ public:
uint8_t mMarginTopRestyleCount;
uint8_t mMarginRightRestyleCount;
uint8_t mMarginBottomRestyleCount;
uint8_t mBackgroundPositionRestyleCount;
bool mContentActive;
};

View File

@ -194,7 +194,8 @@ nsDOMCSSAttributeDeclaration::SetPropertyValue(const nsCSSProperty aPropID,
aPropID == eCSSProperty_left || aPropID == eCSSProperty_top ||
aPropID == eCSSProperty_right || aPropID == eCSSProperty_bottom ||
aPropID == eCSSProperty_margin_left || aPropID == eCSSProperty_margin_top ||
aPropID == eCSSProperty_margin_right || aPropID == eCSSProperty_margin_bottom) {
aPropID == eCSSProperty_margin_right || aPropID == eCSSProperty_margin_bottom ||
aPropID == eCSSProperty_background_position) {
nsIFrame* frame = mElement->GetPrimaryFrame();
if (frame) {
ActiveLayerTracker::NotifyInlineStyleRuleModified(frame, aPropID);