Bug 744157 - Return nsICSSDeclaration from Element::GetSMILOverrideStyle

This commit is contained in:
Jignesh Kakadiya 2012-06-09 15:19:25 -07:00
parent ae195aefdc
commit 32714fbbd9
3 changed files with 6 additions and 10 deletions

View File

@ -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.

View File

@ -3518,7 +3518,7 @@ nsGenericElement::WalkContentStyleRules(nsRuleWalker* aRuleWalker)
return NS_OK;
}
nsIDOMCSSStyleDeclaration*
nsICSSDeclaration*
nsGenericElement::GetSMILOverrideStyle()
{
nsGenericElement::nsDOMSlots *slots = DOMSlots();

View File

@ -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());
}