зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216332 - Remove framearena helpers from abstract frame classes and stop them from being instantiated. r=dbaron
--HG-- extra : source : 9f59591f02706190e56db8ad89ff5a769b5c47dd
This commit is contained in:
Родитель
429a3b1e2f
Коммит
a1dd9fc19e
|
@ -44,8 +44,6 @@ NS_QUERYFRAME_HEAD(nsFormControlFrame)
|
|||
NS_QUERYFRAME_ENTRY(nsIFormControlFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsLeafFrame)
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsFormControlFrame)
|
||||
|
||||
nscoord
|
||||
nsFormControlFrame::GetIntrinsicISize()
|
||||
{
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
}
|
||||
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsFormControlFrame)
|
||||
|
||||
/**
|
||||
* Respond to a gui event
|
||||
|
|
|
@ -42,8 +42,6 @@ using namespace mozilla;
|
|||
using namespace mozilla::dom;
|
||||
using namespace mozilla::layout;
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsContainerFrame)
|
||||
|
||||
nsContainerFrame::~nsContainerFrame()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ class FramePropertyTable;
|
|||
class nsContainerFrame : public nsSplittableFrame
|
||||
{
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsContainerFrame)
|
||||
NS_DECL_QUERYFRAME_TARGET(nsContainerFrame)
|
||||
NS_DECL_QUERYFRAME
|
||||
|
||||
|
|
|
@ -78,11 +78,14 @@
|
|||
#define NS_FRAME_TRACE_REFLOW_OUT(_method, _status)
|
||||
#endif
|
||||
|
||||
// Frame allocation boilerplate macros. Every subclass of nsFrame
|
||||
// must define its own operator new and GetFrameId. If they do
|
||||
// not, the per-frame recycler lists in nsPresArena will not work
|
||||
// correctly, with potentially catastrophic consequences (not enough
|
||||
// memory is allocated for a frame object).
|
||||
// Frame allocation boilerplate macros. Every subclass of nsFrame must
|
||||
// either use NS_{DECL,IMPL}_FRAMEARENA_HELPERS pair for allocating
|
||||
// memory correctly, or use NS_DECL_ABSTRACT_FRAME to declare a frame
|
||||
// class abstract and stop it from being instantiated. If a frame class
|
||||
// without its own operator new and GetFrameId gets instantiated, the
|
||||
// per-frame recycler lists in nsPresArena will not work correctly,
|
||||
// with potentially catastrophic consequences (not enough memory is
|
||||
// allocated for a frame object).
|
||||
|
||||
#define NS_DECL_FRAMEARENA_HELPERS \
|
||||
void* operator new(size_t, nsIPresShell*) MOZ_MUST_OVERRIDE; \
|
||||
|
@ -94,6 +97,10 @@
|
|||
nsQueryFrame::FrameIID class::GetFrameId() \
|
||||
{ return nsQueryFrame::class##_id; }
|
||||
|
||||
#define NS_DECL_ABSTRACT_FRAME(class) \
|
||||
void* operator new(size_t, nsIPresShell*) MOZ_MUST_OVERRIDE = delete; \
|
||||
virtual nsQueryFrame::FrameIID GetFrameId() override MOZ_MUST_OVERRIDE = 0;
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
struct nsBoxLayoutMetrics;
|
||||
|
|
|
@ -14,8 +14,6 @@ nsLeafFrame::~nsLeafFrame()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsLeafFrame)
|
||||
|
||||
/* virtual */ nscoord
|
||||
nsLeafFrame::GetMinISize(nsRenderingContext *aRenderingContext)
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*/
|
||||
class nsLeafFrame : public nsFrame {
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsLeafFrame)
|
||||
|
||||
// nsIFrame replacements
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
|
|
@ -15,13 +15,6 @@ using namespace mozilla;
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// Frame class boilerplate
|
||||
// =======================
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsRubyContentFrame)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
// nsRubyContentFrame Method Implementations
|
||||
// ======================================
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ typedef nsInlineFrame nsRubyContentFrameSuper;
|
|||
class nsRubyContentFrame : public nsRubyContentFrameSuper
|
||||
{
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsRubyContentFrame)
|
||||
|
||||
// nsIFrame overrides
|
||||
virtual bool IsFrameOfType(uint32_t aFlags) const override;
|
||||
|
|
|
@ -14,8 +14,6 @@
|
|||
|
||||
using namespace mozilla;
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsSplittableFrame)
|
||||
|
||||
void
|
||||
nsSplittableFrame::Init(nsIContent* aContent,
|
||||
nsContainerFrame* aParent,
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
class nsSplittableFrame : public nsFrame
|
||||
{
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsSplittableFrame)
|
||||
|
||||
virtual void Init(nsIContent* aContent,
|
||||
nsContainerFrame* aParent,
|
||||
|
|
|
@ -30,8 +30,6 @@ using namespace mozilla::gfx;
|
|||
// nsMathMLContainerFrame implementation
|
||||
//
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsMathMLContainerFrame)
|
||||
|
||||
NS_QUERYFRAME_HEAD(nsMathMLContainerFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsIMathMLFrame)
|
||||
NS_QUERYFRAME_ENTRY(nsMathMLContainerFrame)
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
NS_DECL_QUERYFRAME_TARGET(nsMathMLContainerFrame)
|
||||
NS_DECL_QUERYFRAME
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsMathMLContainerFrame)
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// Overloaded nsMathMLFrame methods -- see documentation in nsIMathMLFrame.h
|
||||
|
|
|
@ -36,7 +36,6 @@ UNIFIED_SOURCES += [
|
|||
'nsSVGMarkerFrame.cpp',
|
||||
'nsSVGMaskFrame.cpp',
|
||||
'nsSVGOuterSVGFrame.cpp',
|
||||
'nsSVGPaintServerFrame.cpp',
|
||||
'nsSVGPathGeometryFrame.cpp',
|
||||
'nsSVGPatternFrame.cpp',
|
||||
'nsSVGStopFrame.cpp',
|
||||
|
|
|
@ -55,8 +55,6 @@ nsSVGGradientFrame::nsSVGGradientFrame(nsStyleContext* aContext) :
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGGradientFrame)
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// nsIFrame methods:
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ protected:
|
|||
explicit nsSVGGradientFrame(nsStyleContext* aContext);
|
||||
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsSVGGradientFrame)
|
||||
|
||||
// nsSVGPaintServerFrame methods:
|
||||
virtual already_AddRefed<gfxPattern>
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; 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/. */
|
||||
|
||||
// Main header first:
|
||||
#include "nsSVGPaintServerFrame.h"
|
||||
|
||||
// Keep others in (case-insensitive) order:
|
||||
#include "gfxContext.h"
|
||||
#include "nsSVGElement.h"
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsSVGPaintServerFrame)
|
|
@ -40,7 +40,7 @@ protected:
|
|||
}
|
||||
|
||||
public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
NS_DECL_ABSTRACT_FRAME(nsSVGPaintServerFrame)
|
||||
|
||||
/**
|
||||
* Constructs a gfxPattern of the paint server rendering.
|
||||
|
|
Загрузка…
Ссылка в новой задаче