Bug 1419695: Allow transitioning chrome-only properties, as long as they're specified as a longhand. r?xidorn
MozReview-Commit-ID: 4hQfYbhxeq7
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -484,16 +484,19 @@ nsTransitionManager::DoUpdateTransitions
// FIXME: Would be good to find a way to share code between this
// interpretation of transition-property and the one below.
// FIXME(emilio): This should probably just use the "all" shorthand id, and
// we should probably remove eCSSPropertyExtra_all_properties.
if (property == eCSSPropertyExtra_all_properties) {
for (nsCSSPropertyID p = nsCSSPropertyID(0);
p < eCSSProperty_COUNT_no_shorthands;
p = nsCSSPropertyID(p + 1)) {
+ if (!nsCSSProps::IsEnabled(p, CSSEnabledState::eForAllContent)) {
+ continue;
+ }
startedAny |=
ConsiderInitiatingTransition(p, aDisp, i, aElement, aPseudoType,
aElementTransitions,
aOldStyle, aNewStyle,
propertiesChecked);
}
} else if (nsCSSProps::IsShorthand(property)) {
CSSPROPS_FOR_SHORTHAND_SUBPROPERTIES(subprop, property,
@@ -661,23 +664,16 @@ nsTransitionManager::ConsiderInitiatingT
// property, so we ignore this one.
// See http://lists.w3.org/Archives/Public/www-style/2009Aug/0109.html .
if (aPropertiesChecked.HasProperty(aProperty)) {
return false;
}
aPropertiesChecked.AddProperty(aProperty);
- // Ignore disabled properties. We can arrive here if the transition-property
- // is 'all' and the disabled property has a default value which derives value
- // from another property, e.g. color.
- if (!nsCSSProps::IsEnabled(aProperty, CSSEnabledState::eForAllContent)) {
- return false;
- }
-
if (!IsTransitionable(aProperty)) {
return false;
}
float delay = aStyleDisplay.GetTransitionDelay(transitionIdx);
// The spec says a negative duration is treated as zero.
float duration =