mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 562701, part c: Use Element in nsStyleAnimation::ComputeValue; r=dbaron
This commit is contained in:
parent
e2267fe41f
commit
3c41948d77
@ -42,7 +42,7 @@
|
||||
#include "nsSMILValue.h"
|
||||
#include "nsComputedDOMStyle.h"
|
||||
#include "nsStyleAnimation.h"
|
||||
#include "nsIContent.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "nsIDOMElement.h"
|
||||
|
||||
using namespace mozilla::dom;
|
||||
|
@ -50,10 +50,12 @@
|
||||
#include "nsCSSParser.h"
|
||||
#include "mozilla/css/Declaration.h"
|
||||
#include "nsCSSStruct.h"
|
||||
#include "mozilla/dom/Element.h"
|
||||
#include "prlog.h"
|
||||
#include <math.h>
|
||||
|
||||
namespace css = mozilla::css;
|
||||
namespace dom = mozilla::dom;
|
||||
|
||||
// HELPER METHODS
|
||||
// --------------
|
||||
@ -1780,7 +1782,7 @@ nsStyleAnimation::AddWeighted(nsCSSProperty aProperty,
|
||||
|
||||
already_AddRefed<css::StyleRule>
|
||||
BuildStyleRule(nsCSSProperty aProperty,
|
||||
nsIContent* aTargetElement,
|
||||
dom::Element* aTargetElement,
|
||||
const nsAString& aSpecifiedValue,
|
||||
PRBool aUseSVGMode)
|
||||
{
|
||||
@ -1822,15 +1824,14 @@ BuildStyleRule(nsCSSProperty aProperty,
|
||||
|
||||
inline
|
||||
already_AddRefed<nsStyleContext>
|
||||
LookupStyleContext(nsIContent* aElement)
|
||||
LookupStyleContext(dom::Element* aElement)
|
||||
{
|
||||
nsIDocument* doc = aElement->GetCurrentDoc();
|
||||
nsIPresShell* shell = doc->GetShell();
|
||||
if (!shell) {
|
||||
return nsnull;
|
||||
}
|
||||
return nsComputedDOMStyle::GetStyleContextForElement(aElement->AsElement(),
|
||||
nsnull, shell);
|
||||
return nsComputedDOMStyle::GetStyleContextForElement(aElement, nsnull, shell);
|
||||
}
|
||||
|
||||
|
||||
@ -1855,7 +1856,7 @@ LookupStyleContext(nsIContent* aElement)
|
||||
*/
|
||||
already_AddRefed<nsStyleContext>
|
||||
StyleWithDeclarationAdded(nsCSSProperty aProperty,
|
||||
nsIContent* aTargetElement,
|
||||
dom::Element* aTargetElement,
|
||||
const nsAString& aSpecifiedValue,
|
||||
PRBool aUseSVGMode)
|
||||
{
|
||||
@ -1888,12 +1889,11 @@ StyleWithDeclarationAdded(nsCSSProperty aProperty,
|
||||
|
||||
PRBool
|
||||
nsStyleAnimation::ComputeValue(nsCSSProperty aProperty,
|
||||
nsIContent* aTargetElement,
|
||||
dom::Element* aTargetElement,
|
||||
const nsAString& aSpecifiedValue,
|
||||
PRBool aUseSVGMode,
|
||||
Value& aComputedValue)
|
||||
{
|
||||
// XXXbz aTargetElement should be an Element
|
||||
NS_ABORT_IF_FALSE(aTargetElement, "null target element");
|
||||
NS_ABORT_IF_FALSE(aTargetElement->GetCurrentDoc(),
|
||||
"we should only be able to actively animate nodes that "
|
||||
|
@ -50,7 +50,6 @@
|
||||
#include "nsCoord.h"
|
||||
#include "nsColor.h"
|
||||
|
||||
class nsIContent;
|
||||
class nsPresContext;
|
||||
class nsStyleContext;
|
||||
class nsCSSValue;
|
||||
@ -59,6 +58,12 @@ struct nsCSSValuePair;
|
||||
struct nsCSSValuePairList;
|
||||
struct nsCSSRect;
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
class Element;
|
||||
} // namespace dom
|
||||
} // namespace mozilla
|
||||
|
||||
/**
|
||||
* Utility class to handle animated style values
|
||||
*/
|
||||
@ -171,7 +176,7 @@ public:
|
||||
* @return PR_TRUE on success, PR_FALSE on failure.
|
||||
*/
|
||||
static PRBool ComputeValue(nsCSSProperty aProperty,
|
||||
nsIContent* aElement,
|
||||
mozilla::dom::Element* aElement,
|
||||
const nsAString& aSpecifiedValue,
|
||||
PRBool aUseSVGMode,
|
||||
Value& aComputedValue);
|
||||
|
Loading…
Reference in New Issue
Block a user