Backed out changeset 23c6326dd926 (bug 1382077) on request from xidorn

This commit is contained in:
Carsten "Tomcat" Book 2017-07-25 12:17:56 +02:00
Родитель c7741ea7ea
Коммит 41e41e6d05
7 изменённых файлов: 16 добавлений и 23 удалений

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

@ -2117,9 +2117,8 @@ nsPresContext::MediaFeatureValuesChanged(nsRestyleHint aRestyleHint,
mPendingMediaFeatureValuesChanged = false;
// MediumFeaturesChanged updates the applied rules, so it always gets called.
if (mShell) {
aRestyleHint |= mShell->
StyleSet()->MediumFeaturesChanged(mPendingViewportChange);
if (mShell && mShell->StyleSet()->MediumFeaturesChanged()) {
aRestyleHint |= eRestyle_Subtree;
}
if (mPendingViewportChange &&

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

@ -113,13 +113,10 @@ ServoStyleSet::InvalidateStyleForCSSRuleChanges()
mPresContext->RestyleManager()->AsServo()->PostRestyleEventForCSSRuleChanges();
}
nsRestyleHint
ServoStyleSet::MediumFeaturesChanged(bool aViewportChanged) const
bool
ServoStyleSet::MediumFeaturesChanged() const
{
if (Servo_StyleSet_MediumFeaturesChanged(mRawSet.get())) {
return eRestyle_Subtree;
}
return nsRestyleHint(0);
return Servo_StyleSet_MediumFeaturesChanged(mRawSet.get());
}
size_t

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

@ -115,7 +115,7 @@ public:
return StylistNeedsUpdate();
}
nsRestyleHint MediumFeaturesChanged(bool aViewportChanged) const;
bool MediumFeaturesChanged() const;
void InvalidateStyleForCSSRuleChanges();

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

@ -160,7 +160,7 @@ public:
inline void RecordShadowStyleChange(mozilla::dom::ShadowRoot* aShadowRoot);
inline bool StyleSheetsHaveChanged() const;
inline void InvalidateStyleForCSSRuleChanges();
inline nsRestyleHint MediumFeaturesChanged(bool aViewportChanged);
inline bool MediumFeaturesChanged();
inline already_AddRefed<nsStyleContext>
ProbePseudoElementStyle(dom::Element* aParentElement,
mozilla::CSSPseudoElementType aType,

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

@ -256,10 +256,10 @@ StyleSetHandle::Ptr::StyleSheetsHaveChanged() const
{
FORWARD(StyleSheetsHaveChanged, ());
}
nsRestyleHint
StyleSetHandle::Ptr::MediumFeaturesChanged(bool aViewportChanged)
bool
StyleSetHandle::Ptr::MediumFeaturesChanged()
{
FORWARD(MediumFeaturesChanged, (aViewportChanged));
FORWARD(MediumFeaturesChanged, ());
}
void
StyleSetHandle::Ptr::InvalidateStyleForCSSRuleChanges()

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

@ -2674,8 +2674,8 @@ nsStyleSet::HasAttributeDependentStyle(Element* aElement,
return data.mHint;
}
nsRestyleHint
nsStyleSet::MediumFeaturesChanged(bool aViewportChanged)
bool
nsStyleSet::MediumFeaturesChanged()
{
NS_ASSERTION(mBatching == 0, "rule processors out of date");
@ -2700,10 +2700,7 @@ nsStyleSet::MediumFeaturesChanged(bool aViewportChanged)
stylesChanged = stylesChanged || thisChanged;
}
if (stylesChanged) {
return eRestyle_Subtree;
}
return nsRestyleHint(0);
return stylesChanged;
}
bool

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

@ -380,10 +380,10 @@ class nsStyleSet final
/*
* Do any processing that needs to happen as a result of a change in
* the characteristics of the medium, and return restyle hint needed
* for the change.
* the characteristics of the medium, and return whether style rules
* may have changed as a result.
*/
nsRestyleHint MediumFeaturesChanged(bool aViewportChanged);
bool MediumFeaturesChanged();
// APIs to manipulate the style sheet lists. The sheets in each
// list are stored with the most significant sheet last.