mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +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
|
|
@ -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',
|
||||
'RestyleManager.h',
|
||||
'RestyleManagerBase.h',
|
||||
'RestyleManagerHandle.h',
|
||||
'RestyleManagerHandleInlines.h',
|
||||
'StaticPresData.h',
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@
|
|||
#include "nsAutoLayoutPhase.h"
|
||||
#include "nsStyleStructInlines.h"
|
||||
#include "nsPageContentFrame.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "StickyScrollContainer.h"
|
||||
#include "nsFieldSetFrame.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.
|
||||
static void
|
||||
ReparentFrame(RestyleManagerHandle aRestyleManager,
|
||||
ReparentFrame(RestyleManager* aRestyleManager,
|
||||
nsContainerFrame* aNewParentFrame,
|
||||
nsIFrame* aFrame)
|
||||
{
|
||||
|
|
@ -467,7 +466,7 @@ ReparentFrames(nsCSSFrameConstructor* aFrameConstructor,
|
|||
nsContainerFrame* aNewParentFrame,
|
||||
const nsFrameList& aFrameList)
|
||||
{
|
||||
RestyleManagerHandle restyleManager = aFrameConstructor->RestyleManager();
|
||||
RestyleManager* restyleManager = aFrameConstructor->RestyleManager();
|
||||
for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
|
||||
ReparentFrame(restyleManager, aNewParentFrame, e.get());
|
||||
}
|
||||
|
|
@ -1883,9 +1882,9 @@ nsCSSFrameConstructor::CreateGeneratedContentItem(nsFrameConstructorState& aStat
|
|||
return;
|
||||
}
|
||||
|
||||
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
|
||||
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
|
||||
RestyleManager::ReframingStyleContexts* rsc =
|
||||
geckoRM->GetReframingStyleContexts();
|
||||
restyleManager->GetReframingStyleContexts();
|
||||
if (rsc) {
|
||||
nsStyleContext* oldStyleContext = rsc->Get(container, aPseudoElement);
|
||||
if (oldStyleContext) {
|
||||
|
|
@ -5056,9 +5055,9 @@ nsCSSFrameConstructor::ResolveStyleContext(nsStyleContext* aParentStyleContext,
|
|||
result = styleSet->ResolveStyleForText(aContent, aParentStyleContext);
|
||||
}
|
||||
|
||||
if (mozilla::RestyleManager* geckoRM = RestyleManager()->GetAsGecko()) {
|
||||
if (mozilla::RestyleManager* restyleManager = RestyleManager()) {
|
||||
RestyleManager::ReframingStyleContexts* rsc =
|
||||
geckoRM->GetReframingStyleContexts();
|
||||
restyleManager->GetReframingStyleContexts();
|
||||
if (rsc) {
|
||||
nsStyleContext* oldStyleContext =
|
||||
rsc->Get(aContent, CSSPseudoElementType::NotPseudo);
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@
|
|||
#include "mozilla/Attributes.h"
|
||||
#include "mozilla/LinkedList.h"
|
||||
#include "mozilla/RestyleManagerBase.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsILayoutHistoryState.h"
|
||||
|
|
@ -41,6 +40,8 @@ class nsFrameConstructorState;
|
|||
|
||||
namespace mozilla {
|
||||
|
||||
class RestyleManager;
|
||||
|
||||
namespace dom {
|
||||
|
||||
class FlattenedChildIterator;
|
||||
|
|
@ -72,7 +73,7 @@ private:
|
|||
nsCSSFrameConstructor& operator=(const nsCSSFrameConstructor& aCopy) = delete;
|
||||
|
||||
public:
|
||||
mozilla::RestyleManagerHandle RestyleManager() const
|
||||
mozilla::RestyleManager* RestyleManager() const
|
||||
{ return mPresShell->GetPresContext()->RestyleManager(); }
|
||||
|
||||
nsIFrame* ConstructRootFrame();
|
||||
|
|
|
|||
|
|
@ -126,8 +126,7 @@
|
|||
#include "GeckoProfiler.h"
|
||||
#include "nsAnimationManager.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "LayoutLogging.h"
|
||||
|
||||
// Make sure getpid() works.
|
||||
|
|
|
|||
|
|
@ -34,8 +34,6 @@
|
|||
#include "nsLayoutUtils.h"
|
||||
#include "nsViewManager.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "SurfaceCacheUtils.h"
|
||||
#include "nsCSSRuleProcessor.h"
|
||||
#include "nsRuleNode.h"
|
||||
|
|
|
|||
|
|
@ -39,7 +39,6 @@
|
|||
#include "nsIMessageManager.h"
|
||||
#include "mozilla/RestyleLogging.h"
|
||||
#include "Units.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "prenv.h"
|
||||
#include "mozilla/StaticPresData.h"
|
||||
|
||||
|
|
@ -71,6 +70,7 @@ namespace mozilla {
|
|||
class EffectCompositor;
|
||||
class EventStateManager;
|
||||
class CounterStyleManager;
|
||||
class RestyleManager;
|
||||
namespace layers {
|
||||
class ContainerLayer;
|
||||
class LayerManager;
|
||||
|
|
@ -243,7 +243,7 @@ public:
|
|||
|
||||
nsRefreshDriver* RefreshDriver() { return mRefreshDriver; }
|
||||
|
||||
mozilla::RestyleManagerHandle RestyleManager() {
|
||||
mozilla::RestyleManager* RestyleManager() {
|
||||
MOZ_ASSERT(mRestyleManager);
|
||||
return mRestyleManager;
|
||||
}
|
||||
|
|
@ -1240,7 +1240,7 @@ protected:
|
|||
RefPtr<mozilla::EffectCompositor> mEffectCompositor;
|
||||
RefPtr<nsTransitionManager> mTransitionManager;
|
||||
RefPtr<nsAnimationManager> mAnimationManager;
|
||||
mozilla::RestyleManagerHandle::RefPtr mRestyleManager;
|
||||
RefPtr<mozilla::RestyleManager> mRestyleManager;
|
||||
RefPtr<mozilla::CounterStyleManager> mCounterStyleManager;
|
||||
nsIAtom* MOZ_UNSAFE_REF("always a static atom") mMedium; // initialized by subclass ctors
|
||||
nsCOMPtr<nsIAtom> mMediaEmulated;
|
||||
|
|
|
|||
|
|
@ -178,8 +178,7 @@
|
|||
#include "nsPlaceholderFrame.h"
|
||||
#include "nsTransitionManager.h"
|
||||
#include "ChildIterator.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "nsIDOMHTMLElement.h"
|
||||
#include "nsIDragSession.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
|
|
@ -567,7 +566,7 @@ VerifyStyleTree(nsPresContext* aPresContext, nsFrameManager* aFrameManager)
|
|||
{
|
||||
if (nsFrame::GetVerifyStyleTreeEnable()) {
|
||||
nsIFrame* rootFrame = aFrameManager->GetRootFrame();
|
||||
aPresContext->RestyleManager()->AsGecko()->DebugVerifyStyleTree(rootFrame);
|
||||
aPresContext->RestyleManager()->DebugVerifyStyleTree(rootFrame);
|
||||
}
|
||||
}
|
||||
#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.
|
||||
++mChangeNestCount;
|
||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
||||
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||
nsresult rv = restyleManager->ProcessRestyledFrames(changeList);
|
||||
restyleManager->FlushOverflowChangedTracker();
|
||||
--mChangeNestCount;
|
||||
|
|
@ -3643,7 +3642,7 @@ void
|
|||
PresShell::DispatchSynthMouseMove(WidgetGUIEvent* aEvent,
|
||||
bool aFlushOnHoverChange)
|
||||
{
|
||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
||||
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||
uint32_t hoverGenerationBefore =
|
||||
restyleManager->GetHoverGeneration();
|
||||
nsEventStatus status;
|
||||
|
|
@ -4448,7 +4447,7 @@ nsIPresShell::RestyleForCSSRuleChanges()
|
|||
return;
|
||||
}
|
||||
|
||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
||||
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||
if (scopeRoots.IsEmpty()) {
|
||||
// If scopeRoots is empty, we know that mStylesHaveChanged was true at
|
||||
// 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()) {
|
||||
nsPresContext* presContext = shell->GetPresContext();
|
||||
if (presContext) {
|
||||
presContext->RestyleManager()->AsGecko()->UpdateOnlyAnimationStyles();
|
||||
presContext->RestyleManager()->UpdateOnlyAnimationStyles();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9477,9 +9476,9 @@ PresShell::Observe(nsISupports* aSubject,
|
|||
{
|
||||
nsAutoScriptBlocker scriptBlocker;
|
||||
++mChangeNestCount;
|
||||
RestyleManagerHandle restyleManager = mPresContext->RestyleManager();
|
||||
restyleManager->AsGecko()->ProcessRestyledFrames(changeList);
|
||||
restyleManager->AsGecko()->FlushOverflowChangedTracker();
|
||||
RestyleManager* restyleManager = mPresContext->RestyleManager();
|
||||
restyleManager->ProcessRestyledFrames(changeList);
|
||||
restyleManager->FlushOverflowChangedTracker();
|
||||
--mChangeNestCount;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,6 @@
|
|||
#include "mozilla/dom/Performance.h"
|
||||
#include "mozilla/dom/WindowBinding.h"
|
||||
#include "mozilla/RestyleManager.h"
|
||||
#include "mozilla/RestyleManagerHandle.h"
|
||||
#include "mozilla/RestyleManagerHandleInlines.h"
|
||||
#include "Layers.h"
|
||||
#include "imgIContainer.h"
|
||||
#include "mozilla/dom/ScriptSettings.h"
|
||||
|
|
@ -1696,7 +1694,7 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
|
|||
|
||||
nsCOMPtr<nsIPresShell> shellKungFuDeathGrip(shell);
|
||||
mStyleFlushObservers.RemoveElement(shell);
|
||||
RestyleManagerHandle restyleManager =
|
||||
RestyleManager* restyleManager =
|
||||
shell->GetPresContext()->RestyleManager();
|
||||
restyleManager->SetObservingRefreshDriver(false);
|
||||
shell->FlushPendingNotifications(ChangesToFlush(Flush_Style, false));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue