mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 744157 - Return nsICSSDeclaration from Element::GetSMILOverrideStyle
This commit is contained in:
parent
ae195aefdc
commit
32714fbbd9
@ -13,6 +13,7 @@
|
||||
class nsEventStateManager;
|
||||
class nsGlobalWindow;
|
||||
class nsFocusManager;
|
||||
class nsICSSDeclaration;
|
||||
|
||||
// Element-specific flags
|
||||
enum {
|
||||
@ -180,10 +181,8 @@ public:
|
||||
*
|
||||
* Note: This method is analogous to the 'GetStyle' method in
|
||||
* nsGenericHTMLElement and nsStyledElement.
|
||||
*
|
||||
* TODO: Bug 744157 - All callers QI to nsICSSDeclaration.
|
||||
*/
|
||||
virtual nsIDOMCSSStyleDeclaration* GetSMILOverrideStyle() = 0;
|
||||
virtual nsICSSDeclaration* GetSMILOverrideStyle() = 0;
|
||||
|
||||
/**
|
||||
* Returns if the element is labelable as per HTML specification.
|
||||
|
@ -3518,7 +3518,7 @@ nsGenericElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsIDOMCSSStyleDeclaration*
|
||||
nsICSSDeclaration*
|
||||
nsGenericElement::GetSMILOverrideStyle()
|
||||
{
|
||||
nsGenericElement::nsDOMSlots *slots = DOMSlots();
|
||||
|
@ -91,8 +91,7 @@ nsSMILCSSProperty::GetBaseValue() const
|
||||
// GENERAL CASE: Non-Shorthands
|
||||
// (1) Put empty string in override style for property mPropID
|
||||
// (saving old override style value, so we can set it again when we're done)
|
||||
nsCOMPtr<nsICSSDeclaration> overrideDecl =
|
||||
do_QueryInterface(mElement->GetSMILOverrideStyle());
|
||||
nsICSSDeclaration* overrideDecl = mElement->GetSMILOverrideStyle();
|
||||
nsAutoString cachedOverrideStyleVal;
|
||||
if (overrideDecl) {
|
||||
overrideDecl->GetPropertyValue(mPropID, cachedOverrideStyleVal);
|
||||
@ -163,8 +162,7 @@ nsSMILCSSProperty::SetAnimValue(const nsSMILValue& aValue)
|
||||
}
|
||||
|
||||
// Use string value to style the target element
|
||||
nsCOMPtr<nsICSSDeclaration> overrideDecl =
|
||||
do_QueryInterface(mElement->GetSMILOverrideStyle());
|
||||
nsICSSDeclaration* overrideDecl = mElement->GetSMILOverrideStyle();
|
||||
if (overrideDecl) {
|
||||
nsAutoString oldValStr;
|
||||
overrideDecl->GetPropertyValue(mPropID, oldValStr);
|
||||
@ -180,8 +178,7 @@ void
|
||||
nsSMILCSSProperty::ClearAnimValue()
|
||||
{
|
||||
// Put empty string in override style for our property
|
||||
nsCOMPtr<nsICSSDeclaration> overrideDecl =
|
||||
do_QueryInterface(mElement->GetSMILOverrideStyle());
|
||||
nsICSSDeclaration* overrideDecl = mElement->GetSMILOverrideStyle();
|
||||
if (overrideDecl) {
|
||||
overrideDecl->SetPropertyValue(mPropID, EmptyString());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user