mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset 24662d1aed8f (bug 911889)
This commit is contained in:
parent
ad030c0241
commit
18a0626fd1
@ -7,9 +7,6 @@
|
||||
#include "nsExpirationTracker.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsRefreshDriver.h"
|
||||
#include "nsPIDOMWindow.h"
|
||||
#include "nsIDocument.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
@ -135,28 +132,6 @@ ActiveLayerTracker::NotifyAnimated(nsIFrame* aFrame, nsCSSProperty aProperty)
|
||||
mutationCount = 0xFF;
|
||||
}
|
||||
|
||||
static bool
|
||||
IsPresContextInScriptAnimationCallback(nsPresContext* aPresContext)
|
||||
{
|
||||
if (aPresContext->RefreshDriver()->IsInRefresh()) {
|
||||
return true;
|
||||
}
|
||||
// Treat timeouts/setintervals as scripted animation callbacks for our
|
||||
// purposes.
|
||||
nsPIDOMWindow* win = aPresContext->Document()->GetInnerWindow();
|
||||
return win && win->IsRunningTimeout();
|
||||
}
|
||||
|
||||
/* static */ void
|
||||
ActiveLayerTracker::NotifyInlineStyleRuleModified(nsIFrame* aFrame,
|
||||
nsCSSProperty aProperty)
|
||||
{
|
||||
if (!IsPresContextInScriptAnimationCallback(aFrame->PresContext())) {
|
||||
return;
|
||||
}
|
||||
NotifyAnimated(aFrame, aProperty);
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
ActiveLayerTracker::IsStyleAnimated(nsIFrame* aFrame, nsCSSProperty aProperty)
|
||||
{
|
||||
|
@ -19,8 +19,6 @@ namespace mozilla {
|
||||
*/
|
||||
class ActiveLayerTracker {
|
||||
public:
|
||||
static void Shutdown();
|
||||
|
||||
/*
|
||||
* We track eCSSProperty_transform and eCSSProperty_opacity style changes
|
||||
* and use that information to guess whether style changes are animated.
|
||||
@ -38,33 +36,23 @@ public:
|
||||
* Any such marking will time out after a short period.
|
||||
*/
|
||||
static void NotifyAnimated(nsIFrame* aFrame, nsCSSProperty aProperty);
|
||||
/**
|
||||
* Notify that a property in the inline style rule of aFrame's element
|
||||
* has been modified.
|
||||
* This notification is incomplete --- not all modifications to inline
|
||||
* style will trigger this.
|
||||
*/
|
||||
static void NotifyInlineStyleRuleModified(nsIFrame* aFrame, nsCSSProperty aProperty);
|
||||
/**
|
||||
* Return true if aFrame's aProperty style should be considered as being animated
|
||||
* for constructing active layers.
|
||||
*/
|
||||
static bool IsStyleAnimated(nsIFrame* aFrame, nsCSSProperty aProperty);
|
||||
|
||||
/*
|
||||
* We track modifications to the content of certain frames (i.e. canvas frames)
|
||||
* and use that to make layering decisions.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Mark aFrame's content as being active. This marking will time out after
|
||||
* a short period.
|
||||
* a short period. This is useful for frames such as canvas frames.
|
||||
*/
|
||||
static void NotifyContentChange(nsIFrame* aFrame);
|
||||
/**
|
||||
* Return true if this frame's content is still marked as active.
|
||||
*/
|
||||
static bool IsContentActive(nsIFrame* aFrame);
|
||||
|
||||
static void Shutdown();
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -15,10 +15,9 @@
|
||||
#include "nsIURI.h"
|
||||
#include "nsNodeUtils.h"
|
||||
#include "nsWrapperCacheInlines.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "ActiveLayerTracker.h"
|
||||
|
||||
using namespace mozilla;
|
||||
namespace css = mozilla::css;
|
||||
namespace dom = mozilla::dom;
|
||||
|
||||
nsDOMCSSAttributeDeclaration::nsDOMCSSAttributeDeclaration(dom::Element* aElement,
|
||||
bool aIsSMILOverride)
|
||||
@ -170,19 +169,3 @@ nsDOMCSSAttributeDeclaration::GetParentObject()
|
||||
{
|
||||
return mElement;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMCSSAttributeDeclaration::SetPropertyValue(const nsCSSProperty aPropID,
|
||||
const nsAString& aValue)
|
||||
{
|
||||
// Scripted modifications to style.opacity or style.transform
|
||||
// could immediately force us into the animated state if heuristics suggest
|
||||
// this is scripted animation.
|
||||
if (aPropID == eCSSProperty_opacity || aPropID == eCSSProperty_transform) {
|
||||
nsIFrame* frame = mElement->GetPrimaryFrame();
|
||||
if (frame) {
|
||||
ActiveLayerTracker::NotifyInlineStyleRuleModified(frame, aPropID);
|
||||
}
|
||||
}
|
||||
return nsDOMCSSDeclaration::SetPropertyValue(aPropID, aValue);
|
||||
}
|
||||
|
@ -38,9 +38,6 @@ public:
|
||||
|
||||
virtual nsINode* GetParentObject() MOZ_OVERRIDE;
|
||||
|
||||
NS_IMETHOD SetPropertyValue(const nsCSSProperty aPropID,
|
||||
const nsAString& aValue);
|
||||
|
||||
protected:
|
||||
virtual nsresult SetCSSDeclaration(mozilla::css::Declaration* aDecl) MOZ_OVERRIDE;
|
||||
virtual nsIDocument* DocToUpdate() MOZ_OVERRIDE;
|
||||
|
Loading…
Reference in New Issue
Block a user