зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 23c6326dd926 (bug 1382077) on request from xidorn
This commit is contained in:
Родитель
c7741ea7ea
Коммит
41e41e6d05
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче