зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1297899 - Part 5: Move refcounting from concrete restyle manager classes up to RestyleManager. r=bholley
MozReview-Commit-ID: 2KNfNCQzIIE --HG-- extra : rebase_source : bc788e378c6239554b27efee23d3362fe2f44a78
This commit is contained in:
Родитель
980ec770c6
Коммит
d075b281e3
|
@ -44,17 +44,14 @@ public:
|
|||
|
||||
explicit GeckoRestyleManager(nsPresContext* aPresContext);
|
||||
|
||||
private:
|
||||
// Private destructor, to discourage deletion outside of Release():
|
||||
~GeckoRestyleManager()
|
||||
protected:
|
||||
~GeckoRestyleManager() override
|
||||
{
|
||||
MOZ_ASSERT(!mReframingStyleContexts,
|
||||
"temporary member should be nulled out before destruction");
|
||||
}
|
||||
|
||||
public:
|
||||
NS_INLINE_DECL_REFCOUNTING(mozilla::GeckoRestyleManager)
|
||||
|
||||
// Forwarded nsIDocumentObserver method, to handle restyling (and
|
||||
// passing the notification to the frame).
|
||||
nsresult ContentStateChanged(nsIContent* aContent,
|
||||
|
|
|
@ -31,12 +31,11 @@ class Element;
|
|||
*/
|
||||
class RestyleManager
|
||||
{
|
||||
protected:
|
||||
RestyleManager(StyleBackendType aType, nsPresContext* aPresContext);
|
||||
|
||||
public:
|
||||
typedef mozilla::dom::Element Element;
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(mozilla::RestyleManager)
|
||||
|
||||
// Get an integer that increments every time we process pending restyles.
|
||||
// The value is never 0.
|
||||
uint32_t GetRestyleGeneration() const { return mRestyleGeneration; }
|
||||
|
@ -142,7 +141,10 @@ public:
|
|||
}
|
||||
|
||||
protected:
|
||||
~RestyleManager() {
|
||||
RestyleManager(StyleBackendType aType, nsPresContext* aPresContext);
|
||||
|
||||
virtual ~RestyleManager()
|
||||
{
|
||||
MOZ_ASSERT(!mAnimationsWithDestroyedFrame,
|
||||
"leaving dangling pointers from AnimationsWithDestroyedFrame");
|
||||
}
|
||||
|
|
|
@ -40,8 +40,6 @@ class ServoRestyleManager : public RestyleManager
|
|||
public:
|
||||
typedef RestyleManager base_type;
|
||||
|
||||
NS_INLINE_DECL_REFCOUNTING(ServoRestyleManager)
|
||||
|
||||
explicit ServoRestyleManager(nsPresContext* aPresContext);
|
||||
|
||||
void PostRestyleEvent(dom::Element* aElement,
|
||||
|
@ -101,7 +99,10 @@ public:
|
|||
static void ClearDirtyDescendantsFromSubtree(Element* aElement);
|
||||
|
||||
protected:
|
||||
~ServoRestyleManager() { MOZ_ASSERT(!mReentrantChanges); }
|
||||
~ServoRestyleManager() override
|
||||
{
|
||||
MOZ_ASSERT(!mReentrantChanges);
|
||||
}
|
||||
|
||||
private:
|
||||
/**
|
||||
|
|
Загрузка…
Ссылка в новой задаче