diff --git a/layout/base/FrameLayerBuilder.h b/layout/base/FrameLayerBuilder.h index 1581557da12..40e993bda42 100644 --- a/layout/base/FrameLayerBuilder.h +++ b/layout/base/FrameLayerBuilder.h @@ -47,6 +47,8 @@ enum LayerState { }; class RefCountedRegion { +private: + ~RefCountedRegion() {} public: NS_INLINE_DECL_REFCOUNTING(RefCountedRegion) diff --git a/layout/style/AnimationCommon.h b/layout/style/AnimationCommon.h index adf49e6b740..6d83a6361c0 100644 --- a/layout/style/AnimationCommon.h +++ b/layout/style/AnimationCommon.h @@ -282,6 +282,10 @@ struct ComputedTiming */ struct ElementAnimation { +protected: + virtual ~ElementAnimation() { } + +public: ElementAnimation() : mIsRunningOnCompositor(false) , mLastNotification(LAST_NOTIFICATION_NONE) @@ -291,7 +295,6 @@ struct ElementAnimation // FIXME: If we succeed in moving transition-specific code to a type of // AnimationEffect (as per the Web Animations API) we should remove these // virtual methods. - virtual ~ElementAnimation() { } virtual ElementPropertyTransition* AsTransition() { return nullptr; } virtual const ElementPropertyTransition* AsTransition() const { return nullptr; diff --git a/layout/style/CounterStyleManager.cpp b/layout/style/CounterStyleManager.cpp index a7c9253419a..087af1b29bf 100644 --- a/layout/style/CounterStyleManager.cpp +++ b/layout/style/CounterStyleManager.cpp @@ -933,6 +933,8 @@ BuiltinCounterStyle::GetInitialCounterText(CounterValue aOrdinal, class DependentBuiltinCounterStyle MOZ_FINAL : public BuiltinCounterStyle { +private: + ~DependentBuiltinCounterStyle() {} public: DependentBuiltinCounterStyle(int32_t aStyle, CounterStyleManager* aManager) : BuiltinCounterStyle(aStyle), @@ -978,6 +980,8 @@ DependentBuiltinCounterStyle::GetFallback() class CustomCounterStyle MOZ_FINAL : public CounterStyle { +private: + ~CustomCounterStyle() {} public: CustomCounterStyle(CounterStyleManager* aManager, nsCSSCounterStyleRule* aRule) diff --git a/layout/style/CounterStyleManager.h b/layout/style/CounterStyleManager.h index aac49300732..af8f6ea93ef 100644 --- a/layout/style/CounterStyleManager.h +++ b/layout/style/CounterStyleManager.h @@ -101,9 +101,10 @@ protected: class CounterStyleManager MOZ_FINAL { +private: + ~CounterStyleManager(); public: CounterStyleManager(nsPresContext* aPresContext); - ~CounterStyleManager(); static void InitializeBuiltinCounterStyles(); diff --git a/layout/style/nsCSSValue.h b/layout/style/nsCSSValue.h index c7c8d9a711a..85acbfba04c 100644 --- a/layout/style/nsCSSValue.h +++ b/layout/style/nsCSSValue.h @@ -83,8 +83,10 @@ struct URLValue { URLValue(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer, nsIPrincipal* aOriginPrincipal); +protected: ~URLValue(); +public: bool operator==(const URLValue& aOther) const; // URIEquals only compares URIs and principals (unlike operator==, which @@ -124,8 +126,10 @@ struct ImageValue : public URLValue { // aString must not be null. ImageValue(nsIURI* aURI, nsStringBuffer* aString, nsIURI* aReferrer, nsIPrincipal* aOriginPrincipal, nsIDocument* aDocument); +private: ~ImageValue(); +public: // Inherit operator== from URLValue nsRefPtrHashtable, imgRequestProxy> mRequests;