mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Issue #2488 - Part 4: Remove the RestyleManagerHandle smart pointer class
This commit is contained in:
parent
4bf43b8fb4
commit
6803c1f710
24 changed files with 55 additions and 414 deletions
|
|
@ -14,8 +14,7 @@
|
||||||
#include "mozilla/AnimationUtils.h"
|
#include "mozilla/AnimationUtils.h"
|
||||||
#include "mozilla/EffectSet.h"
|
#include "mozilla/EffectSet.h"
|
||||||
#include "mozilla/LayerAnimationInfo.h"
|
#include "mozilla/LayerAnimationInfo.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetPresShellForContent
|
#include "nsComputedDOMStyle.h" // nsComputedDOMStyle::GetPresShellForContent
|
||||||
#include "nsCSSPropertyIDSet.h"
|
#include "nsCSSPropertyIDSet.h"
|
||||||
#include "nsCSSProps.h"
|
#include "nsCSSProps.h"
|
||||||
|
|
@ -202,7 +201,7 @@ EffectCompositor::RequestRestyle(dom::Element* aElement,
|
||||||
|
|
||||||
if (aRestyleType == RestyleType::Layer) {
|
if (aRestyleType == RestyleType::Layer) {
|
||||||
// Prompt layers to re-sync their animations.
|
// Prompt layers to re-sync their animations.
|
||||||
mPresContext->RestyleManager()->AsGecko()->IncrementAnimationGeneration();
|
mPresContext->RestyleManager()->IncrementAnimationGeneration();
|
||||||
EffectSet* effectSet =
|
EffectSet* effectSet =
|
||||||
EffectSet::GetEffectSet(aElement, aPseudoType);
|
EffectSet::GetEffectSet(aElement, aPseudoType);
|
||||||
if (effectSet) {
|
if (effectSet) {
|
||||||
|
|
@ -314,7 +313,7 @@ EffectCompositor::GetAnimationRule(dom::Element* aElement,
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mPresContext->RestyleManager()->AsGecko()->SkipAnimationRules()) {
|
if (mPresContext->RestyleManager()->SkipAnimationRules()) {
|
||||||
// We don't need to worry about updating mElementsToRestyle in this case
|
// We don't need to worry about updating mElementsToRestyle in this case
|
||||||
// since this is not the animation restyle we requested when we called
|
// since this is not the animation restyle we requested when we called
|
||||||
// PostRestyleForAnimation (see comment at start of this method).
|
// PostRestyleForAnimation (see comment at start of this method).
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
#include "EffectSet.h"
|
#include "EffectSet.h"
|
||||||
#include "mozilla/dom/Element.h" // For Element
|
#include "mozilla/dom/Element.h" // For Element
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
|
#include "nsCSSPseudoElements.h" // For CSSPseudoElementType
|
||||||
#include "nsCycleCollectionNoteChild.h" // For CycleCollectionNoteChild
|
#include "nsCycleCollectionNoteChild.h" // For CycleCollectionNoteChild
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
|
|
@ -111,7 +110,7 @@ void
|
||||||
EffectSet::UpdateAnimationGeneration(nsPresContext* aPresContext)
|
EffectSet::UpdateAnimationGeneration(nsPresContext* aPresContext)
|
||||||
{
|
{
|
||||||
mAnimationGeneration =
|
mAnimationGeneration =
|
||||||
aPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration();
|
aPresContext->RestyleManager()->GetAnimationGeneration();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ nsIAtom**
|
/* static */ nsIAtom**
|
||||||
|
|
|
||||||
|
|
@ -54,8 +54,7 @@
|
||||||
#include "nsSMILAnimationController.h"
|
#include "nsSMILAnimationController.h"
|
||||||
#include "mozilla/dom/SVGElementBinding.h"
|
#include "mozilla/dom/SVGElementBinding.h"
|
||||||
#include "mozilla/Unused.h"
|
#include "mozilla/Unused.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
@ -927,9 +926,9 @@ nsSVGElement::WalkAnimatedContentStyleRules(nsRuleWalker* aRuleWalker)
|
||||||
// whether this is a "no-animation restyle". (This should match the check
|
// whether this is a "no-animation restyle". (This should match the check
|
||||||
// in nsHTMLCSSStyleSheet::RulesMatching(), where we determine whether to
|
// in nsHTMLCSSStyleSheet::RulesMatching(), where we determine whether to
|
||||||
// apply the SMILOverrideStyle.)
|
// apply the SMILOverrideStyle.)
|
||||||
RestyleManagerHandle restyleManager =
|
RestyleManager* restyleManager =
|
||||||
aRuleWalker->PresContext()->RestyleManager();
|
aRuleWalker->PresContext()->RestyleManager();
|
||||||
if (!restyleManager->AsGecko()->SkipAnimationRules()) {
|
if (!restyleManager->SkipAnimationRules()) {
|
||||||
// update/walk the animated content style rule.
|
// update/walk the animated content style rule.
|
||||||
css::StyleRule* animContentStyleRule = GetAnimatedContentStyleRule();
|
css::StyleRule* animContentStyleRule = GetAnimatedContentStyleRule();
|
||||||
if (!animContentStyleRule) {
|
if (!animContentStyleRule) {
|
||||||
|
|
|
||||||
|
|
@ -1,155 +0,0 @@
|
||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#ifndef mozilla_RestyleManagerHandle_h
|
|
||||||
#define mozilla_RestyleManagerHandle_h
|
|
||||||
|
|
||||||
#include "mozilla/Assertions.h"
|
|
||||||
#include "mozilla/EventStates.h"
|
|
||||||
#include "mozilla/HandleRefPtr.h"
|
|
||||||
#include "mozilla/RefCountType.h"
|
|
||||||
#include "nsChangeHint.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
class RestyleManager;
|
|
||||||
namespace dom {
|
|
||||||
class Element;
|
|
||||||
} // namespace dom
|
|
||||||
} // namespace mozilla
|
|
||||||
class nsAttrValue;
|
|
||||||
class nsIAtom;
|
|
||||||
class nsIContent;
|
|
||||||
class nsIFrame;
|
|
||||||
class nsStyleChangeList;
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Smart pointer class that can hold a pointer to a RestyleManager.
|
|
||||||
*/
|
|
||||||
class RestyleManagerHandle
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef HandleRefPtr<RestyleManagerHandle> RefPtr;
|
|
||||||
|
|
||||||
// We define this Ptr class with a RestyleManager API that forwards on to the
|
|
||||||
// wrapped pointer, rather than putting these methods on RestyleManagerHandle
|
|
||||||
// itself, so that we can have RestyleManagerHandle behave like a smart
|
|
||||||
// pointer and be dereferenced with operator->.
|
|
||||||
class Ptr
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
friend class ::mozilla::RestyleManagerHandle;
|
|
||||||
|
|
||||||
RestyleManager* AsGecko()
|
|
||||||
{
|
|
||||||
return reinterpret_cast<RestyleManager*>(mValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
RestyleManager* GetAsGecko() { return AsGecko(); }
|
|
||||||
|
|
||||||
const RestyleManager* AsGecko() const
|
|
||||||
{
|
|
||||||
return const_cast<Ptr*>(this)->AsGecko();
|
|
||||||
}
|
|
||||||
|
|
||||||
const RestyleManager* GetAsGecko() const { return AsGecko(); }
|
|
||||||
|
|
||||||
// These inline methods are defined in RestyleManagerHandleInlines.h.
|
|
||||||
inline MozExternalRefCountType AddRef();
|
|
||||||
inline MozExternalRefCountType Release();
|
|
||||||
|
|
||||||
// Restyle manager interface. These inline methods are defined in
|
|
||||||
// RestyleManagerHandleInlines.h and just forward to the underlying
|
|
||||||
// RestyleManager. See corresponding comments in
|
|
||||||
// RestyleManager.h for descriptions of these methods.
|
|
||||||
|
|
||||||
inline void Disconnect();
|
|
||||||
inline void PostRestyleEvent(dom::Element* aElement,
|
|
||||||
nsRestyleHint aRestyleHint,
|
|
||||||
nsChangeHint aMinChangeHint);
|
|
||||||
inline void PostRestyleEventForLazyConstruction();
|
|
||||||
inline void RebuildAllStyleData(nsChangeHint aExtraHint,
|
|
||||||
nsRestyleHint aRestyleHint);
|
|
||||||
inline void PostRebuildAllStyleDataEvent(nsChangeHint aExtraHint,
|
|
||||||
nsRestyleHint aRestyleHint);
|
|
||||||
inline void ProcessPendingRestyles();
|
|
||||||
inline void ContentInserted(nsINode* aContainer,
|
|
||||||
nsIContent* aChild);
|
|
||||||
inline void ContentAppended(nsIContent* aContainer,
|
|
||||||
nsIContent* aFirstNewContent);
|
|
||||||
inline void ContentRemoved(nsINode* aContainer,
|
|
||||||
nsIContent* aOldChild,
|
|
||||||
nsIContent* aFollowingSibling);
|
|
||||||
inline void RestyleForInsertOrChange(nsINode* aContainer,
|
|
||||||
nsIContent* aChild);
|
|
||||||
inline void RestyleForAppend(nsIContent* aContainer,
|
|
||||||
nsIContent* aFirstNewContent);
|
|
||||||
inline void ContentStateChanged(nsIContent* aContent,
|
|
||||||
EventStates aStateMask);
|
|
||||||
inline void AttributeWillChange(dom::Element* aElement,
|
|
||||||
int32_t aNameSpaceID,
|
|
||||||
nsIAtom* aAttribute,
|
|
||||||
int32_t aModType,
|
|
||||||
const nsAttrValue* aNewValue);
|
|
||||||
inline void AttributeChanged(dom::Element* aElement,
|
|
||||||
int32_t aNameSpaceID,
|
|
||||||
nsIAtom* aAttribute,
|
|
||||||
int32_t aModType,
|
|
||||||
const nsAttrValue* aOldValue);
|
|
||||||
inline nsresult ReparentStyleContext(nsIFrame* aFrame);
|
|
||||||
inline bool HasPendingRestyles();
|
|
||||||
inline uint64_t GetRestyleGeneration() const;
|
|
||||||
inline uint32_t GetHoverGeneration() const;
|
|
||||||
inline void SetObservingRefreshDriver(bool aObserving);
|
|
||||||
inline nsresult ProcessRestyledFrames(nsStyleChangeList& aChangeList);
|
|
||||||
inline void FlushOverflowChangedTracker();
|
|
||||||
inline void NotifyDestroyingFrame(nsIFrame* aFrame);
|
|
||||||
|
|
||||||
private:
|
|
||||||
// Stores a pointer to an RestyleManager.
|
|
||||||
uintptr_t mValue;
|
|
||||||
};
|
|
||||||
|
|
||||||
MOZ_IMPLICIT RestyleManagerHandle(decltype(nullptr) = nullptr)
|
|
||||||
{
|
|
||||||
mPtr.mValue = 0;
|
|
||||||
}
|
|
||||||
RestyleManagerHandle(const RestyleManagerHandle& aOth)
|
|
||||||
{
|
|
||||||
mPtr.mValue = aOth.mPtr.mValue;
|
|
||||||
}
|
|
||||||
MOZ_IMPLICIT RestyleManagerHandle(RestyleManager* aManager)
|
|
||||||
{
|
|
||||||
*this = aManager;
|
|
||||||
}
|
|
||||||
|
|
||||||
RestyleManagerHandle& operator=(decltype(nullptr))
|
|
||||||
{
|
|
||||||
mPtr.mValue = 0;
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
RestyleManagerHandle& operator=(RestyleManager* aManager)
|
|
||||||
{
|
|
||||||
mPtr.mValue = reinterpret_cast<uintptr_t>(aManager);
|
|
||||||
return *this;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Make RestyleManagerHandle usable in boolean contexts.
|
|
||||||
explicit operator bool() const { return !!mPtr.mValue; }
|
|
||||||
bool operator!() const { return !mPtr.mValue; }
|
|
||||||
|
|
||||||
// Make RestyleManagerHandle behave like a smart pointer.
|
|
||||||
Ptr* operator->() { return &mPtr; }
|
|
||||||
const Ptr* operator->() const { return &mPtr; }
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ptr mPtr;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // namespace mozilla
|
|
||||||
|
|
||||||
#endif // mozilla_RestyleManagerHandle_h
|
|
||||||
|
|
@ -1,181 +0,0 @@
|
||||||
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
||||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
||||||
|
|
||||||
#ifndef mozilla_RestyleManagerHandleInlines_h
|
|
||||||
#define mozilla_RestyleManagerHandleInlines_h
|
|
||||||
|
|
||||||
#include "mozilla/RestyleManager.h"
|
|
||||||
|
|
||||||
namespace mozilla {
|
|
||||||
|
|
||||||
MozExternalRefCountType
|
|
||||||
RestyleManagerHandle::Ptr::AddRef()
|
|
||||||
{
|
|
||||||
return AsGecko()->AddRef();
|
|
||||||
}
|
|
||||||
|
|
||||||
MozExternalRefCountType
|
|
||||||
RestyleManagerHandle::Ptr::Release()
|
|
||||||
{
|
|
||||||
return AsGecko()->Release();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::Disconnect()
|
|
||||||
{
|
|
||||||
AsGecko()->Disconnect();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::PostRestyleEvent(dom::Element* aElement,
|
|
||||||
nsRestyleHint aRestyleHint,
|
|
||||||
nsChangeHint aMinChangeHint)
|
|
||||||
{
|
|
||||||
AsGecko()->PostRestyleEvent(aElement, aRestyleHint, aMinChangeHint);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::PostRestyleEventForLazyConstruction()
|
|
||||||
{
|
|
||||||
AsGecko()->PostRestyleEventForLazyConstruction();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::RebuildAllStyleData(nsChangeHint aExtraHint,
|
|
||||||
nsRestyleHint aRestyleHint)
|
|
||||||
{
|
|
||||||
AsGecko()->RebuildAllStyleData(aExtraHint, aRestyleHint);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::PostRebuildAllStyleDataEvent(
|
|
||||||
nsChangeHint aExtraHint,
|
|
||||||
nsRestyleHint aRestyleHint)
|
|
||||||
{
|
|
||||||
AsGecko()->PostRebuildAllStyleDataEvent(aExtraHint, aRestyleHint);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::ProcessPendingRestyles()
|
|
||||||
{
|
|
||||||
AsGecko()->ProcessPendingRestyles();
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
|
||||||
RestyleManagerHandle::Ptr::ProcessRestyledFrames(nsStyleChangeList& aChangeList)
|
|
||||||
{
|
|
||||||
return AsGecko()->ProcessRestyledFrames(aChangeList);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::FlushOverflowChangedTracker()
|
|
||||||
{
|
|
||||||
AsGecko()->FlushOverflowChangedTracker();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::ContentInserted(nsINode* aContainer,
|
|
||||||
nsIContent* aChild)
|
|
||||||
{
|
|
||||||
AsGecko()->ContentInserted(aContainer, aChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::ContentAppended(nsIContent* aContainer,
|
|
||||||
nsIContent* aFirstNewContent)
|
|
||||||
{
|
|
||||||
AsGecko()->ContentAppended(aContainer, aFirstNewContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::ContentRemoved(nsINode* aContainer,
|
|
||||||
nsIContent* aOldChild,
|
|
||||||
nsIContent* aFollowingSibling)
|
|
||||||
{
|
|
||||||
AsGecko()->ContentRemoved(aContainer, aOldChild, aFollowingSibling);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::RestyleForInsertOrChange(nsINode* aContainer,
|
|
||||||
nsIContent* aChild)
|
|
||||||
{
|
|
||||||
AsGecko()->RestyleForInsertOrChange(aContainer, aChild);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::RestyleForAppend(nsIContent* aContainer,
|
|
||||||
nsIContent* aFirstNewContent)
|
|
||||||
{
|
|
||||||
AsGecko()->RestyleForAppend(aContainer, aFirstNewContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::ContentStateChanged(nsIContent* aContent,
|
|
||||||
EventStates aStateMask)
|
|
||||||
{
|
|
||||||
AsGecko()->ContentStateChanged(aContent, aStateMask);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::AttributeWillChange(dom::Element* aElement,
|
|
||||||
int32_t aNameSpaceID,
|
|
||||||
nsIAtom* aAttribute,
|
|
||||||
int32_t aModType,
|
|
||||||
const nsAttrValue* aNewValue)
|
|
||||||
{
|
|
||||||
AsGecko()->AttributeWillChange(aElement, aNameSpaceID, aAttribute, aModType,
|
|
||||||
aNewValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::AttributeChanged(dom::Element* aElement,
|
|
||||||
int32_t aNameSpaceID,
|
|
||||||
nsIAtom* aAttribute,
|
|
||||||
int32_t aModType,
|
|
||||||
const nsAttrValue* aOldValue)
|
|
||||||
{
|
|
||||||
AsGecko()->AttributeChanged(aElement, aNameSpaceID, aAttribute, aModType,
|
|
||||||
aOldValue);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
|
||||||
RestyleManagerHandle::Ptr::ReparentStyleContext(nsIFrame* aFrame)
|
|
||||||
{
|
|
||||||
return AsGecko()->ReparentStyleContext(aFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
|
||||||
RestyleManagerHandle::Ptr::HasPendingRestyles()
|
|
||||||
{
|
|
||||||
return AsGecko()->HasPendingRestyles();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint64_t
|
|
||||||
RestyleManagerHandle::Ptr::GetRestyleGeneration() const
|
|
||||||
{
|
|
||||||
return AsGecko()->GetRestyleGeneration();
|
|
||||||
}
|
|
||||||
|
|
||||||
uint32_t
|
|
||||||
RestyleManagerHandle::Ptr::GetHoverGeneration() const
|
|
||||||
{
|
|
||||||
return AsGecko()->GetHoverGeneration();
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::SetObservingRefreshDriver(bool aObserving)
|
|
||||||
{
|
|
||||||
AsGecko()->SetObservingRefreshDriver(aObserving);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
RestyleManagerHandle::Ptr::NotifyDestroyingFrame(nsIFrame* aFrame)
|
|
||||||
{
|
|
||||||
AsGecko()->NotifyDestroyingFrame(aFrame);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace mozilla
|
|
||||||
|
|
||||||
#endif // mozilla_RestyleManagerHandleInlines_h
|
|
||||||
|
|
@ -112,8 +112,6 @@ EXPORTS.mozilla += [
|
||||||
'RestyleLogging.h',
|
'RestyleLogging.h',
|
||||||
'RestyleManager.h',
|
'RestyleManager.h',
|
||||||
'RestyleManagerBase.h',
|
'RestyleManagerBase.h',
|
||||||
'RestyleManagerHandle.h',
|
|
||||||
'RestyleManagerHandleInlines.h',
|
|
||||||
'StaticPresData.h',
|
'StaticPresData.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,8 +79,7 @@
|
||||||
#include "nsAutoLayoutPhase.h"
|
#include "nsAutoLayoutPhase.h"
|
||||||
#include "nsStyleStructInlines.h"
|
#include "nsStyleStructInlines.h"
|
||||||
#include "nsPageContentFrame.h"
|
#include "nsPageContentFrame.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "StickyScrollContainer.h"
|
#include "StickyScrollContainer.h"
|
||||||
#include "nsFieldSetFrame.h"
|
#include "nsFieldSetFrame.h"
|
||||||
#include "nsInlineFrame.h"
|
#include "nsInlineFrame.h"
|
||||||
|
|
@ -454,7 +453,7 @@ AnyKidsNeedBlockParent(nsIFrame *aFrameList)
|
||||||
|
|
||||||
// Reparent a frame into a wrapper frame that is a child of its old parent.
|
// Reparent a frame into a wrapper frame that is a child of its old parent.
|
||||||
static void
|
static void
|
||||||
ReparentFrame(RestyleManagerHandle aRestyleManager,
|
ReparentFrame(RestyleManager* aRestyleManager,
|
||||||
nsContainerFrame* aNewParentFrame,
|
nsContainerFrame* aNewParentFrame,
|
||||||
nsIFrame* aFrame)
|
nsIFrame* aFrame)
|
||||||
{
|
{
|
||||||
|
|
@ -467,7 +466,7 @@ ReparentFrames(nsCSSFrameConstructor* aFrameConstructor,
|
||||||
nsContainerFrame* aNewParentFrame,
|
nsContainerFrame* aNewParentFrame,
|
||||||
const nsFrameList& aFrameList)
|
const nsFrameList& aFrameList)
|
||||||
{
|
{
|
||||||
RestyleManagerHandle restyleManager = aFrameConstructor->RestyleManager();
|
RestyleManager* restyleManager = aFrameConstructor->RestyleManager();
|
||||||
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
|
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
|
||||||
ReparentFrame(restyleManager, aNewParentFrame, e.get());
|
ReparentFrame(restyleManager, aNewParentFrame, e.get());
|
||||||
}
|
}
|
||||||
|
|
@ -1883,9 +1882,9 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
|
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
|
||||||
RestyleManager::ReframingStyleContexts* rsc =
|
RestyleManager::ReframingStyleContexts* rsc =
|
||||||
geckoRM->GetReframingStyleContexts();
|
restyleManager->GetReframingStyleContexts();
|
||||||
if (rsc) {
|
if (rsc) {
|
||||||
nsStyleContext* oldStyleContext = rsc->Get(container, aPseudoElement);
|
nsStyleContext* oldStyleContext = rsc->Get(container, aPseudoElement);
|
||||||
if (oldStyleContext) {
|
if (oldStyleContext) {
|
||||||
|
|
@ -5056,9 +5055,9 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
|
||||||
result = styleSet->ResolveStyleForText(aContent, aParentStyleContext);
|
result = styleSet->ResolveStyleForText(aContent, aParentStyleContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
|
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
|
||||||
RestyleManager::ReframingStyleContexts* rsc =
|
RestyleManager::ReframingStyleContexts* rsc =
|
||||||
geckoRM->GetReframingStyleContexts();
|
restyleManager->GetReframingStyleContexts();
|
||||||
if (rsc) {
|
if (rsc) {
|
||||||
nsStyleContext* oldStyleContext =
|
nsStyleContext* oldStyleContext =
|
||||||
rsc->Get(aContent, CSSPseudoElementType::NotPseudo);
|
rsc->Get(aContent, CSSPseudoElementType::NotPseudo);
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@
|
||||||
#include "mozilla/Attributes.h"
|
#include "mozilla/Attributes.h"
|
||||||
#include "mozilla/LinkedList.h"
|
#include "mozilla/LinkedList.h"
|
||||||
#include "mozilla/RestyleManagerBase.h"
|
#include "mozilla/RestyleManagerBase.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
|
||||||
|
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsILayoutHistoryState.h"
|
#include "nsILayoutHistoryState.h"
|
||||||
|
|
@ -41,6 +40,8 @@ class nsFrameConstructorState;
|
||||||
|
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
|
|
||||||
|
class RestyleManager;
|
||||||
|
|
||||||
namespace dom {
|
namespace dom {
|
||||||
|
|
||||||
class FlattenedChildIterator;
|
class FlattenedChildIterator;
|
||||||
|
|
@ -72,7 +73,7 @@ private:
|
||||||
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy) = delete;
|
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
mozilla::RestyleManagerHandle RestyleManager() const
|
mozilla::RestyleManager* RestyleManager() const
|
||||||
{ return mPresShell->GetPresContext()->RestyleManager(); }
|
{ return mPresShell->GetPresContext()->RestyleManager(); }
|
||||||
|
|
||||||
nsIFrame* ConstructRootFrame();
|
nsIFrame* ConstructRootFrame();
|
||||||
|
|
|
||||||
|
|
@ -126,8 +126,7 @@
|
||||||
#include "GeckoProfiler.h"
|
#include "GeckoProfiler.h"
|
||||||
#include "nsAnimationManager.h"
|
#include "nsAnimationManager.h"
|
||||||
#include "nsTransitionManager.h"
|
#include "nsTransitionManager.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "LayoutLogging.h"
|
#include "LayoutLogging.h"
|
||||||
|
|
||||||
// Make sure getpid() works.
|
// Make sure getpid() works.
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,6 @@
|
||||||
#include "nsLayoutUtils.h"
|
#include "nsLayoutUtils.h"
|
||||||
#include "nsViewManager.h"
|
#include "nsViewManager.h"
|
||||||
#include "mozilla/RestyleManager.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "SurfaceCacheUtils.h"
|
#include "SurfaceCacheUtils.h"
|
||||||
#include "nsCSSRuleProcessor.h"
|
#include "nsCSSRuleProcessor.h"
|
||||||
#include "nsRuleNode.h"
|
#include "nsRuleNode.h"
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,6 @@
|
||||||
#include "nsIMessageManager.h"
|
#include "nsIMessageManager.h"
|
||||||
#include "mozilla/RestyleLogging.h"
|
#include "mozilla/RestyleLogging.h"
|
||||||
#include "Units.h"
|
#include "Units.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
|
||||||
#include "prenv.h"
|
#include "prenv.h"
|
||||||
#include "mozilla/StaticPresData.h"
|
#include "mozilla/StaticPresData.h"
|
||||||
|
|
||||||
|
|
@ -71,6 +70,7 @@ namespace mozilla {
|
||||||
class EffectCompositor;
|
class EffectCompositor;
|
||||||
class EventStateManager;
|
class EventStateManager;
|
||||||
class CounterStyleManager;
|
class CounterStyleManager;
|
||||||
|
class RestyleManager;
|
||||||
namespace layers {
|
namespace layers {
|
||||||
class ContainerLayer;
|
class ContainerLayer;
|
||||||
class LayerManager;
|
class LayerManager;
|
||||||
|
|
@ -243,7 +243,7 @@ public:
|
||||||
|
|
||||||
nsRefreshDriver* RefreshDriver() { return mRefreshDriver; }
|
nsRefreshDriver* RefreshDriver() { return mRefreshDriver; }
|
||||||
|
|
||||||
mozilla::RestyleManagerHandle RestyleManager() {
|
mozilla::RestyleManager* RestyleManager() {
|
||||||
MOZ_ASSERT(mRestyleManager);
|
MOZ_ASSERT(mRestyleManager);
|
||||||
return mRestyleManager;
|
return mRestyleManager;
|
||||||
}
|
}
|
||||||
|
|
@ -1240,7 +1240,7 @@ protected:
|
||||||
RefPtr<mozilla::EffectCompositor> mEffectCompositor;
|
RefPtr<mozilla::EffectCompositor> mEffectCompositor;
|
||||||
RefPtr<nsTransitionManager> mTransitionManager;
|
RefPtr<nsTransitionManager> mTransitionManager;
|
||||||
RefPtr<nsAnimationManager> mAnimationManager;
|
RefPtr<nsAnimationManager> mAnimationManager;
|
||||||
mozilla::RestyleManagerHandle::RefPtr mRestyleManager;
|
RefPtr<mozilla::RestyleManager> mRestyleManager;
|
||||||
RefPtr<mozilla::CounterStyleManager> mCounterStyleManager;
|
RefPtr<mozilla::CounterStyleManager> mCounterStyleManager;
|
||||||
nsIAtom* MOZ_UNSAFE_REF("always a static atom") mMedium; // initialized by subclass ctors
|
nsIAtom* MOZ_UNSAFE_REF("always a static atom") mMedium; // initialized by subclass ctors
|
||||||
nsCOMPtr<nsIAtom> mMediaEmulated;
|
nsCOMPtr<nsIAtom> mMediaEmulated;
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,7 @@
|
||||||
#include "nsPlaceholderFrame.h"
|
#include "nsPlaceholderFrame.h"
|
||||||
#include "nsTransitionManager.h"
|
#include "nsTransitionManager.h"
|
||||||
#include "ChildIterator.h"
|
#include "ChildIterator.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsIDOMHTMLElement.h"
|
#include "nsIDOMHTMLElement.h"
|
||||||
#include "nsIDragSession.h"
|
#include "nsIDragSession.h"
|
||||||
#include "nsIFrameInlines.h"
|
#include "nsIFrameInlines.h"
|
||||||
|
|
@ -567,7 +566,7 @@ VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager)
|
||||||
{
|
{
|
||||||
if (nsFrame::GetVerifyStyleTreeEnable()) {
|
if (nsFrame::GetVerifyStyleTreeEnable()) {
|
||||||
nsIFrame* rootFrame = aFrameManager->GetRootFrame();
|
nsIFrame* rootFrame = aFrameManager->GetRootFrame();
|
||||||
aPresContext->RestyleManager()->AsGecko()->DebugVerifyStyleTree(rootFrame);
|
aPresContext->RestyleManager()->DebugVerifyStyleTree(rootFrame);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define VERIFY_STYLE_TREE ::VerifyStyleTree(mPresContext, mFrameConstructor)
|
#define VERIFY_STYLE_TREE ::VerifyStyleTree(mPresContext, mFrameConstructor)
|
||||||
|
|
@ -2857,7 +2856,7 @@ PresShell::RecreateFramesFor(nsIContent* aContent)
|
||||||
|
|
||||||
// Mark ourselves as not safe to flush while we're doing frame construction.
|
// Mark ourselves as not safe to flush while we're doing frame construction.
|
||||||
++mChangeNestCount;
|
++mChangeNestCount;
|
||||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||||
nsresult rv = restyleManager->ProcessRestyledFrames(changeList);
|
nsresult rv = restyleManager->ProcessRestyledFrames(changeList);
|
||||||
restyleManager->FlushOverflowChangedTracker();
|
restyleManager->FlushOverflowChangedTracker();
|
||||||
--mChangeNestCount;
|
--mChangeNestCount;
|
||||||
|
|
@ -3643,7 +3642,7 @@ void
|
||||||
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
|
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
|
||||||
bool aFlushOnHoverChange)
|
bool aFlushOnHoverChange)
|
||||||
{
|
{
|
||||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||||
uint32_t hoverGenerationBefore =
|
uint32_t hoverGenerationBefore =
|
||||||
restyleManager->GetHoverGeneration();
|
restyleManager->GetHoverGeneration();
|
||||||
nsEventStatus status;
|
nsEventStatus status;
|
||||||
|
|
@ -4448,7 +4447,7 @@ nsIPresShell::RestyleForCSSRuleChanges()
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||||
if (scopeRoots.IsEmpty()) {
|
if (scopeRoots.IsEmpty()) {
|
||||||
// If scopeRoots is empty, we know that mStylesHaveChanged was true at
|
// If scopeRoots is empty, we know that mStylesHaveChanged was true at
|
||||||
// the beginning of this function, and that we need to restyle the whole
|
// the beginning of this function, and that we need to restyle the whole
|
||||||
|
|
@ -6731,7 +6730,7 @@ FlushThrottledStyles(nsIDocument *aDocument, void *aData)
|
||||||
if (shell && shell->IsVisible()) {
|
if (shell && shell->IsVisible()) {
|
||||||
nsPresContext* presContext = shell->GetPresContext();
|
nsPresContext* presContext = shell->GetPresContext();
|
||||||
if (presContext) {
|
if (presContext) {
|
||||||
presContext->RestyleManager()->AsGecko()->UpdateOnlyAnimationStyles();
|
presContext->RestyleManager()->UpdateOnlyAnimationStyles();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -9477,9 +9476,9 @@ PresShell::Observe(nsISupports* aSubject,
|
||||||
{
|
{
|
||||||
nsAutoScriptBlocker scriptBlocker;
|
nsAutoScriptBlocker scriptBlocker;
|
||||||
++mChangeNestCount;
|
++mChangeNestCount;
|
||||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||||
restyleManager->AsGecko()->ProcessRestyledFrames(changeList);
|
restyleManager->ProcessRestyledFrames(changeList);
|
||||||
restyleManager->AsGecko()->FlushOverflowChangedTracker();
|
restyleManager->FlushOverflowChangedTracker();
|
||||||
--mChangeNestCount;
|
--mChangeNestCount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -46,8 +46,6 @@
|
||||||
#include "mozilla/dom/Performance.h"
|
#include "mozilla/dom/Performance.h"
|
||||||
#include "mozilla/dom/WindowBinding.h"
|
#include "mozilla/dom/WindowBinding.h"
|
||||||
#include "mozilla/RestyleManager.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "Layers.h"
|
#include "Layers.h"
|
||||||
#include "imgIContainer.h"
|
#include "imgIContainer.h"
|
||||||
#include "mozilla/dom/ScriptSettings.h"
|
#include "mozilla/dom/ScriptSettings.h"
|
||||||
|
|
@ -1696,7 +1694,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
||||||
|
|
||||||
nsCOMPtr<nsIPresShell> shellKungFuDeathGrip(shell);
|
nsCOMPtr<nsIPresShell> shellKungFuDeathGrip(shell);
|
||||||
mStyleFlushObservers.RemoveElement(shell);
|
mStyleFlushObservers.RemoveElement(shell);
|
||||||
RestyleManagerHandle restyleManager =
|
RestyleManager* restyleManager =
|
||||||
shell->GetPresContext()->RestyleManager();
|
shell->GetPresContext()->RestyleManager();
|
||||||
restyleManager->SetObservingRefreshDriver(false);
|
restyleManager->SetObservingRefreshDriver(false);
|
||||||
shell->FlushPendingNotifications(ChangesToFlush(Flush_Style, false));
|
shell->FlushPendingNotifications(ChangesToFlush(Flush_Style, false));
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,7 @@
|
||||||
#include "nsGkAtoms.h"
|
#include "nsGkAtoms.h"
|
||||||
#include "nsStyleSet.h"
|
#include "nsStyleSet.h"
|
||||||
#include "nsFrameManager.h"
|
#include "nsFrameManager.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsPlaceholderFrame.h"
|
#include "nsPlaceholderFrame.h"
|
||||||
#include "nsCSSFrameConstructor.h"
|
#include "nsCSSFrameConstructor.h"
|
||||||
|
|
||||||
|
|
@ -81,7 +80,7 @@ nsFirstLetterFrame::SetInitialChildList(ChildListID aListID,
|
||||||
{
|
{
|
||||||
MOZ_ASSERT(aListID == kPrincipalList, "Principal child list is the only "
|
MOZ_ASSERT(aListID == kPrincipalList, "Principal child list is the only "
|
||||||
"list that nsFirstLetterFrame should set via this function");
|
"list that nsFirstLetterFrame should set via this function");
|
||||||
RestyleManagerHandle restyleManager = PresContext()->RestyleManager();
|
RestyleManager* restyleManager = PresContext()->RestyleManager();
|
||||||
|
|
||||||
for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
|
for (nsFrameList::Enumerator e(aChildList); !e.AtEnd(); e.Next()) {
|
||||||
NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
|
NS_ASSERTION(e.get()->GetParent() == this, "Unexpected parent");
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,6 @@
|
||||||
#include "nsLayoutUtils.h"
|
#include "nsLayoutUtils.h"
|
||||||
#include "LayoutLogging.h"
|
#include "LayoutLogging.h"
|
||||||
#include "mozilla/RestyleManager.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
|
|
||||||
#include "nsIDOMNode.h"
|
#include "nsIDOMNode.h"
|
||||||
#include "nsISelection.h"
|
#include "nsISelection.h"
|
||||||
|
|
@ -677,7 +675,7 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
// because what matters is whether the new style (not the old)
|
// because what matters is whether the new style (not the old)
|
||||||
// specifies CSS transitions.
|
// specifies CSS transitions.
|
||||||
RestyleManager::ReframingStyleContexts* rsc =
|
RestyleManager::ReframingStyleContexts* rsc =
|
||||||
presContext->RestyleManager()->AsGecko()->GetReframingStyleContexts();
|
presContext->RestyleManager()->GetReframingStyleContexts();
|
||||||
if (rsc) {
|
if (rsc) {
|
||||||
rsc->Put(mContent, mStyleContext);
|
rsc->Put(mContent, mStyleContext);
|
||||||
}
|
}
|
||||||
|
|
@ -688,7 +686,7 @@ nsFrame::DestroyFrom(nsIFrame* aDestructRoot)
|
||||||
// If no new frame for this element is created by the end of the
|
// If no new frame for this element is created by the end of the
|
||||||
// restyling process, stop animations and transitions for this frame
|
// restyling process, stop animations and transitions for this frame
|
||||||
RestyleManager::AnimationsWithDestroyedFrame* adf =
|
RestyleManager::AnimationsWithDestroyedFrame* adf =
|
||||||
presContext->RestyleManager()->AsGecko()->GetAnimationsWithDestroyedFrame();
|
presContext->RestyleManager()->GetAnimationsWithDestroyedFrame();
|
||||||
// AnimationsWithDestroyedFrame only lives during the restyling process.
|
// AnimationsWithDestroyedFrame only lives during the restyling process.
|
||||||
if (adf) {
|
if (adf) {
|
||||||
adf->Put(mContent, mStyleContext);
|
adf->Put(mContent, mStyleContext);
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,7 @@
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsRenderingContext.h"
|
#include "nsRenderingContext.h"
|
||||||
#include "nsCSSAnonBoxes.h"
|
#include "nsCSSAnonBoxes.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
#include "mozilla/Likely.h"
|
#include "mozilla/Likely.h"
|
||||||
#include "SVGTextFrame.h"
|
#include "SVGTextFrame.h"
|
||||||
|
|
@ -346,7 +345,7 @@ ReparentChildListStyle(nsPresContext* aPresContext,
|
||||||
const nsFrameList::Slice& aFrames,
|
const nsFrameList::Slice& aFrames,
|
||||||
nsIFrame* aParentFrame)
|
nsIFrame* aParentFrame)
|
||||||
{
|
{
|
||||||
RestyleManagerHandle restyleManager = aPresContext->RestyleManager();
|
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
||||||
|
|
||||||
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
|
for (nsFrameList::Enumerator e(aFrames); !e.AtEnd(); e.Next()) {
|
||||||
NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
|
NS_ASSERTION(e.get()->GetParent() == aParentFrame, "Bogus parentage");
|
||||||
|
|
@ -493,7 +492,7 @@ nsInlineFrame::DrainSelfOverflowListInternal(DrainFlags aFlags)
|
||||||
if (!(aFlags & eDontReparentFrames)) {
|
if (!(aFlags & eDontReparentFrames)) {
|
||||||
nsIFrame* firstChild = overflowFrames->FirstChild();
|
nsIFrame* firstChild = overflowFrames->FirstChild();
|
||||||
const bool doReparentSC = (aFlags & eInFirstLine);
|
const bool doReparentSC = (aFlags & eInFirstLine);
|
||||||
RestyleManagerHandle restyleManager = PresContext()->RestyleManager();
|
RestyleManager* restyleManager = PresContext()->RestyleManager();
|
||||||
for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) {
|
for (nsIFrame* f = firstChild; f; f = f->GetNextSibling()) {
|
||||||
f->SetParent(this);
|
f->SetParent(this);
|
||||||
if (doReparentSC) {
|
if (doReparentSC) {
|
||||||
|
|
@ -560,7 +559,7 @@ nsInlineFrame::ReflowFrames(nsPresContext* aPresContext,
|
||||||
|
|
||||||
nsLineLayout* lineLayout = aReflowInput.mLineLayout;
|
nsLineLayout* lineLayout = aReflowInput.mLineLayout;
|
||||||
bool inFirstLine = aReflowInput.mLineLayout->GetInFirstLine();
|
bool inFirstLine = aReflowInput.mLineLayout->GetInFirstLine();
|
||||||
RestyleManagerHandle restyleManager = aPresContext->RestyleManager();
|
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
||||||
WritingMode frameWM = aReflowInput.GetWritingMode();
|
WritingMode frameWM = aReflowInput.GetWritingMode();
|
||||||
WritingMode lineWM = aReflowInput.mLineLayout->mRootSpan->mWritingMode;
|
WritingMode lineWM = aReflowInput.mLineLayout->mRootSpan->mWritingMode;
|
||||||
LogicalMargin framePadding = aReflowInput.ComputedLogicalBorderPadding();
|
LogicalMargin framePadding = aReflowInput.ComputedLogicalBorderPadding();
|
||||||
|
|
|
||||||
|
|
@ -16,8 +16,7 @@
|
||||||
#include "nsTableFrame.h"
|
#include "nsTableFrame.h"
|
||||||
#include "celldata.h"
|
#include "celldata.h"
|
||||||
|
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "nsIScriptError.h"
|
#include "nsIScriptError.h"
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,7 @@
|
||||||
|
|
||||||
#include "mozilla/AnimationCollection.h"
|
#include "mozilla/AnimationCollection.h"
|
||||||
|
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsAnimationManager.h" // For dom::CSSAnimation
|
#include "nsAnimationManager.h" // For dom::CSSAnimation
|
||||||
#include "nsPresContext.h"
|
#include "nsPresContext.h"
|
||||||
#include "nsTransitionManager.h" // For dom::CSSTransition
|
#include "nsTransitionManager.h" // For dom::CSSTransition
|
||||||
|
|
@ -138,7 +137,7 @@ AnimationCollection<AnimationType>::UpdateCheckGeneration(
|
||||||
nsPresContext* aPresContext)
|
nsPresContext* aPresContext)
|
||||||
{
|
{
|
||||||
mCheckGeneration =
|
mCheckGeneration =
|
||||||
aPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration();
|
aPresContext->RestyleManager()->GetAnimationGeneration();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class AnimationType>
|
template<class AnimationType>
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,7 @@
|
||||||
#include "nsAttrValue.h"
|
#include "nsAttrValue.h"
|
||||||
#include "nsAttrValueInlines.h"
|
#include "nsAttrValueInlines.h"
|
||||||
#include "nsCSSPseudoElements.h"
|
#include "nsCSSPseudoElements.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
@ -73,7 +72,7 @@ nsHTMLCSSStyleSheet::ElementRulesMatching(nsPresContext* aPresContext,
|
||||||
|
|
||||||
declaration = aElement->GetSMILOverrideStyleDeclaration();
|
declaration = aElement->GetSMILOverrideStyleDeclaration();
|
||||||
if (declaration) {
|
if (declaration) {
|
||||||
RestyleManager* restyleManager = aPresContext->RestyleManager()->AsGecko();
|
RestyleManager* restyleManager = aPresContext->RestyleManager();
|
||||||
if (!restyleManager->SkipAnimationRules()) {
|
if (!restyleManager->SkipAnimationRules()) {
|
||||||
// Animation restyle (or non-restyle traversal of rules)
|
// Animation restyle (or non-restyle traversal of rules)
|
||||||
// Now we can walk SMIL overrride style, without triggering transitions.
|
// Now we can walk SMIL overrride style, without triggering transitions.
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,7 @@
|
||||||
#include "mozilla/dom/Element.h"
|
#include "mozilla/dom/Element.h"
|
||||||
#include "nsHashKeys.h"
|
#include "nsHashKeys.h"
|
||||||
#include "mozilla/OperatorNewExtensions.h"
|
#include "mozilla/OperatorNewExtensions.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
|
|
||||||
using namespace mozilla;
|
using namespace mozilla;
|
||||||
using namespace mozilla::dom;
|
using namespace mozilla::dom;
|
||||||
|
|
|
||||||
|
|
@ -40,8 +40,7 @@
|
||||||
#include "nsCSSRules.h"
|
#include "nsCSSRules.h"
|
||||||
#include "nsPrintfCString.h"
|
#include "nsPrintfCString.h"
|
||||||
#include "nsIFrame.h"
|
#include "nsIFrame.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsQueryObject.h"
|
#include "nsQueryObject.h"
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
|
|
@ -1755,7 +1754,7 @@ nsStyleSet::ResolveStyleWithoutAnimation(dom::Element* aTarget,
|
||||||
pseudoType == CSSPseudoElementType::before ||
|
pseudoType == CSSPseudoElementType::before ||
|
||||||
pseudoType == CSSPseudoElementType::after,
|
pseudoType == CSSPseudoElementType::after,
|
||||||
"unexpected type for animations");
|
"unexpected type for animations");
|
||||||
RestyleManager* restyleManager = PresContext()->RestyleManager()->AsGecko();
|
RestyleManager* restyleManager = PresContext()->RestyleManager();
|
||||||
|
|
||||||
bool oldSkipAnimationRules = restyleManager->SkipAnimationRules();
|
bool oldSkipAnimationRules = restyleManager->SkipAnimationRules();
|
||||||
restyleManager->SetSkipAnimationRules(true);
|
restyleManager->SetSkipAnimationRules(true);
|
||||||
|
|
@ -2235,7 +2234,7 @@ nsStyleSet::ReparentStyleContext(nsStyleContext* aStyleContext,
|
||||||
CSSPseudoElementType pseudoType = aStyleContext->GetPseudoType();
|
CSSPseudoElementType pseudoType = aStyleContext->GetPseudoType();
|
||||||
nsRuleNode* ruleNode = aStyleContext->RuleNode();
|
nsRuleNode* ruleNode = aStyleContext->RuleNode();
|
||||||
|
|
||||||
NS_ASSERTION(!PresContext()->RestyleManager()->AsGecko()->SkipAnimationRules(),
|
NS_ASSERTION(!PresContext()->RestyleManager()->SkipAnimationRules(),
|
||||||
"we no longer handle SkipAnimationRules()");
|
"we no longer handle SkipAnimationRules()");
|
||||||
|
|
||||||
nsRuleNode* visitedRuleNode = nullptr;
|
nsRuleNode* visitedRuleNode = nullptr;
|
||||||
|
|
@ -2515,5 +2514,5 @@ nsStyleSet::ClearSelectors()
|
||||||
if (!mRuleTree) {
|
if (!mRuleTree) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PresContext()->RestyleManager()->AsGecko()->ClearSelectors();
|
PresContext()->RestyleManager()->ClearSelectors();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,7 @@
|
||||||
#include "nsDisplayList.h"
|
#include "nsDisplayList.h"
|
||||||
#include "nsStyleChangeList.h"
|
#include "nsStyleChangeList.h"
|
||||||
#include "nsStyleSet.h"
|
#include "nsStyleSet.h"
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsDOMMutationObserver.h"
|
#include "nsDOMMutationObserver.h"
|
||||||
|
|
||||||
using mozilla::TimeStamp;
|
using mozilla::TimeStamp;
|
||||||
|
|
@ -503,7 +502,7 @@ nsTransitionManager::StyleContextChanged(dom::Element *aElement,
|
||||||
|
|
||||||
if (collection &&
|
if (collection &&
|
||||||
collection->mCheckGeneration ==
|
collection->mCheckGeneration ==
|
||||||
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration()) {
|
mPresContext->RestyleManager()->GetAnimationGeneration()) {
|
||||||
// When we start a new transition, we immediately post a restyle.
|
// When we start a new transition, we immediately post a restyle.
|
||||||
// If the animation generation on the collection is current, that
|
// If the animation generation on the collection is current, that
|
||||||
// means *this* is that restyle, since we bump the animation
|
// means *this* is that restyle, since we bump the animation
|
||||||
|
|
@ -914,7 +913,7 @@ nsTransitionManager::ConsiderInitiatingTransition(
|
||||||
OwningElementRef(*aElement, aNewStyleContext->GetPseudoType()));
|
OwningElementRef(*aElement, aNewStyleContext->GetPseudoType()));
|
||||||
animation->SetTimelineNoUpdate(timeline);
|
animation->SetTimelineNoUpdate(timeline);
|
||||||
animation->SetCreationSequence(
|
animation->SetCreationSequence(
|
||||||
mPresContext->RestyleManager()->AsGecko()->GetAnimationGeneration());
|
mPresContext->RestyleManager()->GetAnimationGeneration());
|
||||||
animation->SetEffectFromStyle(pt);
|
animation->SetEffectFromStyle(pt);
|
||||||
animation->PlayFromStyle();
|
animation->PlayFromStyle();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@
|
||||||
#include "nsSVGContainerFrame.h"
|
#include "nsSVGContainerFrame.h"
|
||||||
|
|
||||||
// Keep others in (case-insensitive) order:
|
// Keep others in (case-insensitive) order:
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsCSSFrameConstructor.h"
|
#include "nsCSSFrameConstructor.h"
|
||||||
#include "nsSVGEffects.h"
|
#include "nsSVGEffects.h"
|
||||||
#include "nsSVGElement.h"
|
#include "nsSVGElement.h"
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@
|
||||||
#include "nsSVGEffects.h"
|
#include "nsSVGEffects.h"
|
||||||
|
|
||||||
// Keep others in (case-insensitive) order:
|
// Keep others in (case-insensitive) order:
|
||||||
#include "mozilla/RestyleManagerHandle.h"
|
#include "mozilla/RestyleManager.h"
|
||||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
|
||||||
#include "nsCSSFrameConstructor.h"
|
#include "nsCSSFrameConstructor.h"
|
||||||
#include "nsISupportsImpl.h"
|
#include "nsISupportsImpl.h"
|
||||||
#include "nsSVGClipPathFrame.h"
|
#include "nsSVGClipPathFrame.h"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue