Backout changeset 47c7022e4e11 for bug 913444

--HG--
extra : rebase_source : 6d3b0bd5c4ea52561fba9b358dae8b7843f10205
This commit is contained in:
Robert O'Callahan 2013-11-03 23:12:58 -08:00
Родитель 88c7f3c0c4
Коммит 634c0d1e79
5 изменённых файлов: 8 добавлений и 29 удалений

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

@ -29,14 +29,6 @@ public:
: mFrame(aFrame)
, mOpacityRestyleCount(0)
, mTransformRestyleCount(0)
, mLeftRestyleCount(0)
, mTopRestyleCount(0)
, mRightRestyleCount(0)
, mBottomRestyleCount(0)
, mMarginLeftRestyleCount(0)
, mMarginTopRestyleCount(0)
, mMarginRightRestyleCount(0)
, mMarginBottomRestyleCount(0)
, mContentActive(false)
{}
~LayerActivity();
@ -50,10 +42,6 @@ public:
case eCSSProperty_top: return mTopRestyleCount;
case eCSSProperty_right: return mRightRestyleCount;
case eCSSProperty_bottom: return mBottomRestyleCount;
case eCSSProperty_margin_left: return mMarginLeftRestyleCount;
case eCSSProperty_margin_top: return mMarginTopRestyleCount;
case eCSSProperty_margin_right: return mMarginRightRestyleCount;
case eCSSProperty_margin_bottom: return mMarginBottomRestyleCount;
default: MOZ_ASSERT(false); return mOpacityRestyleCount;
}
}
@ -67,10 +55,6 @@ public:
uint8_t mTopRestyleCount;
uint8_t mRightRestyleCount;
uint8_t mBottomRestyleCount;
uint8_t mMarginLeftRestyleCount;
uint8_t mMarginTopRestyleCount;
uint8_t mMarginRightRestyleCount;
uint8_t mMarginBottomRestyleCount;
bool mContentActive;
};
@ -219,18 +203,14 @@ ActiveLayerTracker::IsStyleAnimated(nsIFrame* aFrame, nsCSSProperty aProperty)
}
/* static */ bool
ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(nsIFrame* aFrame)
ActiveLayerTracker::IsOffsetStyleAnimated(nsIFrame* aFrame)
{
LayerActivity* layerActivity = GetLayerActivity(aFrame);
if (layerActivity) {
if (layerActivity->mLeftRestyleCount >= 2 ||
layerActivity->mTopRestyleCount >= 2 ||
layerActivity->mRightRestyleCount >= 2 ||
layerActivity->mBottomRestyleCount >= 2 ||
layerActivity->mMarginLeftRestyleCount >= 2 ||
layerActivity->mMarginTopRestyleCount >= 2 ||
layerActivity->mMarginRightRestyleCount >= 2 ||
layerActivity->mMarginBottomRestyleCount >= 2) {
layerActivity->mBottomRestyleCount >= 2) {
return true;
}
}

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

@ -63,7 +63,7 @@ public:
* Return true if any of aFrame's offset property styles should be considered
* as being animated for constructing active layers.
*/
static bool IsOffsetOrMarginStyleAnimated(nsIFrame* aFrame);
static bool IsOffsetStyleAnimated(nsIFrame* aFrame);
/*
* We track modifications to the content of certain frames (i.e. canvas frames)

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

@ -1255,7 +1255,7 @@ nsLayoutUtils::GetActiveScrolledRootFor(nsIFrame* aFrame,
while (f != aStopAtAncestor) {
if (IsPopup(f))
break;
if (ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(f))
if (ActiveLayerTracker::IsOffsetStyleAnimated(f))
break;
nsIFrame* parent = GetCrossDocParentFrame(f);
if (!parent)

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

@ -180,9 +180,7 @@ nsDOMCSSAttributeDeclaration::SetPropertyValue(const nsCSSProperty aPropID,
// this is scripted animation.
if (aPropID == eCSSProperty_opacity || aPropID == eCSSProperty_transform ||
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_right || aPropID == eCSSProperty_bottom) {
nsIFrame* frame = mElement->GetPrimaryFrame();
if (frame) {
ActiveLayerTracker::NotifyInlineStyleRuleModified(frame, aPropID);

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

@ -314,8 +314,9 @@ nsChangeHint nsStyleMargin::CalcDifference(const nsStyleMargin& aOther) const
}
// Margin differences can't affect descendant intrinsic sizes and
// don't need to force children to reflow.
return NS_CombineHint(nsChangeHint_NeedReflow,
nsChangeHint_ClearAncestorIntrinsics);
return NS_SubtractHint(NS_STYLE_HINT_REFLOW,
NS_CombineHint(nsChangeHint_ClearDescendantIntrinsics,
nsChangeHint_NeedDirtyReflow));
}
nsStylePadding::nsStylePadding() {