Bug 652991 - Part 12. Correct pointer/refernce parameter convention. r=me

MozReview-Commit-ID: 2QTCJxnaAi2

--HG--
extra : rebase_source : e83d8d5afd9ecfbc5a685a3e5b7d4324f0333dce
extra : amend_source : c61aa20f453bdc9e76112d50beb7e07224709059
This commit is contained in:
cku 2016-08-02 19:06:14 +08:00
parent 423bdfd2fd
commit e5a7157308
2 changed files with 59 additions and 57 deletions

View File

@ -134,29 +134,29 @@ nsSVGRenderingObserver::AttributeChanged(nsIDocument* aDocument,
}
void
nsSVGRenderingObserver::ContentAppended(nsIDocument *aDocument,
nsIContent *aContainer,
nsIContent *aFirstNewContent,
nsSVGRenderingObserver::ContentAppended(nsIDocument* aDocument,
nsIContent* aContainer,
nsIContent* aFirstNewContent,
int32_t /* unused */)
{
DoUpdate();
}
void
nsSVGRenderingObserver::ContentInserted(nsIDocument *aDocument,
nsIContent *aContainer,
nsIContent *aChild,
nsSVGRenderingObserver::ContentInserted(nsIDocument* aDocument,
nsIContent* aContainer,
nsIContent* aChild,
int32_t /* unused */)
{
DoUpdate();
}
void
nsSVGRenderingObserver::ContentRemoved(nsIDocument *aDocument,
nsIContent *aContainer,
nsIContent *aChild,
nsSVGRenderingObserver::ContentRemoved(nsIDocument* aDocument,
nsIContent* aContainer,
nsIContent* aChild,
int32_t aIndexInContainer,
nsIContent *aPreviousSibling)
nsIContent* aPreviousSibling)
{
DoUpdate();
}
@ -474,7 +474,7 @@ nsSVGPaintingProperty::DoUpdate()
}
static nsSVGFilterProperty*
GetOrCreateFilterProperty(nsIFrame *aFrame)
GetOrCreateFilterProperty(nsIFrame* aFrame)
{
const nsStyleEffects* effects = aFrame->StyleEffects();
if (!effects->HasFilters())
@ -491,7 +491,7 @@ GetOrCreateFilterProperty(nsIFrame *aFrame)
}
static nsSVGMaskProperty*
GetOrCreateMaskProperty(nsIFrame *aFrame)
GetOrCreateMaskProperty(nsIFrame* aFrame)
{
FrameProperties props = aFrame->Properties();
nsSVGMaskProperty *prop = props.Get(nsSVGEffects::MaskProperty());
@ -506,7 +506,7 @@ GetOrCreateMaskProperty(nsIFrame *aFrame)
template<class T>
static T*
GetEffectProperty(nsIURI *aURI, nsIFrame *aFrame,
GetEffectProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<T>* aProperty)
{
if (!aURI)
@ -522,8 +522,8 @@ GetEffectProperty(nsIURI *aURI, nsIFrame *aFrame,
return prop;
}
nsSVGMarkerProperty *
nsSVGEffects::GetMarkerProperty(nsIURI *aURI, nsIFrame *aFrame,
nsSVGMarkerProperty*
nsSVGEffects::GetMarkerProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGMarkerProperty>* aProperty)
{
MOZ_ASSERT(aFrame->GetType() == nsGkAtoms::svgPathGeometryFrame &&
@ -532,22 +532,22 @@ nsSVGEffects::GetMarkerProperty(nsIURI *aURI, nsIFrame *aFrame,
return GetEffectProperty(aURI, aFrame, aProperty);
}
nsSVGTextPathProperty *
nsSVGEffects::GetTextPathProperty(nsIURI *aURI, nsIFrame *aFrame,
nsSVGTextPathProperty*
nsSVGEffects::GetTextPathProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGTextPathProperty>* aProperty)
{
return GetEffectProperty(aURI, aFrame, aProperty);
}
nsSVGPaintingProperty *
nsSVGEffects::GetPaintingProperty(nsIURI *aURI, nsIFrame *aFrame,
nsSVGPaintingProperty*
nsSVGEffects::GetPaintingProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGPaintingProperty>* aProperty)
{
return GetEffectProperty(aURI, aFrame, aProperty);
}
nsSVGPaintingProperty *
nsSVGEffects::GetPaintingPropertyForURI(nsIURI *aURI, nsIFrame *aFrame,
nsSVGPaintingProperty*
nsSVGEffects::GetPaintingPropertyForURI(nsIURI* aURI, nsIFrame* aFrame,
URIObserverHashtablePropertyDescriptor aProperty)
{
if (!aURI)
@ -570,7 +570,7 @@ nsSVGEffects::GetPaintingPropertyForURI(nsIURI *aURI, nsIFrame *aFrame,
}
nsSVGEffects::EffectProperties
nsSVGEffects::GetEffectProperties(nsIFrame *aFrame)
nsSVGEffects::GetEffectProperties(nsIFrame* aFrame)
{
NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame should be first continuation");
@ -595,7 +595,7 @@ nsSVGEffects::GetEffectProperties(nsIFrame *aFrame)
}
nsSVGPaintServerFrame *
nsSVGEffects::GetPaintServer(nsIFrame *aTargetFrame,
nsSVGEffects::GetPaintServer(nsIFrame* aTargetFrame,
nsStyleSVGPaint nsStyleSVG::* aPaint,
PaintingPropertyDescriptor aType)
{
@ -635,7 +635,7 @@ nsSVGEffects::GetPaintServer(nsIFrame *aTargetFrame,
}
nsSVGClipPathFrame *
nsSVGEffects::EffectProperties::GetClipPathFrame(bool *aOK)
nsSVGEffects::EffectProperties::GetClipPathFrame(bool* aOK)
{
if (!mClipPath)
return nullptr;
@ -648,7 +648,7 @@ nsSVGEffects::EffectProperties::GetClipPathFrame(bool *aOK)
}
nsSVGMaskFrame *
nsSVGEffects::EffectProperties::GetFirstMaskFrame(bool *aOK)
nsSVGEffects::EffectProperties::GetFirstMaskFrame(bool* aOK)
{
if (!mMask) {
return nullptr;
@ -684,7 +684,7 @@ nsSVGEffects::EffectProperties::GetMaskFrames()
}
void
nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
nsSVGEffects::UpdateEffects(nsIFrame* aFrame)
{
NS_ASSERTION(aFrame->GetContent()->IsElement(),
"aFrame's content should be an element");
@ -717,8 +717,8 @@ nsSVGEffects::UpdateEffects(nsIFrame *aFrame)
}
}
nsSVGFilterProperty *
nsSVGEffects::GetFilterProperty(nsIFrame *aFrame)
nsSVGFilterProperty*
nsSVGEffects::GetFilterProperty(nsIFrame* aFrame)
{
NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame should be first continuation");
@ -785,7 +785,8 @@ nsSVGRenderingObserverList::RemoveAll()
}
void
nsSVGEffects::AddRenderingObserver(Element *aElement, nsSVGRenderingObserver *aObserver)
nsSVGEffects::AddRenderingObserver(Element* aElement,
nsSVGRenderingObserver* aObserver)
{
nsSVGRenderingObserverList *observerList = GetObserverList(aElement);
if (!observerList) {
@ -800,7 +801,8 @@ nsSVGEffects::AddRenderingObserver(Element *aElement, nsSVGRenderingObserver *aO
}
void
nsSVGEffects::RemoveRenderingObserver(Element *aElement, nsSVGRenderingObserver *aObserver)
nsSVGEffects::RemoveRenderingObserver(Element* aElement,
nsSVGRenderingObserver* aObserver)
{
nsSVGRenderingObserverList *observerList = GetObserverList(aElement);
if (observerList) {
@ -814,7 +816,7 @@ nsSVGEffects::RemoveRenderingObserver(Element *aElement, nsSVGRenderingObserver
}
void
nsSVGEffects::RemoveAllRenderingObservers(Element *aElement)
nsSVGEffects::RemoveAllRenderingObservers(Element* aElement)
{
nsSVGRenderingObserverList *observerList = GetObserverList(aElement);
if (observerList) {
@ -824,7 +826,7 @@ nsSVGEffects::RemoveAllRenderingObservers(Element *aElement)
}
void
nsSVGEffects::InvalidateRenderingObservers(nsIFrame *aFrame)
nsSVGEffects::InvalidateRenderingObservers(nsIFrame* aFrame)
{
NS_ASSERTION(!aFrame->GetPrevContinuation(), "aFrame must be first continuation");
@ -857,7 +859,7 @@ nsSVGEffects::InvalidateRenderingObservers(nsIFrame *aFrame)
}
void
nsSVGEffects::InvalidateDirectRenderingObservers(Element *aElement, uint32_t aFlags /* = 0 */)
nsSVGEffects::InvalidateDirectRenderingObservers(Element* aElement, uint32_t aFlags /* = 0 */)
{
nsIFrame* frame = aElement->GetPrimaryFrame();
if (frame) {
@ -878,7 +880,7 @@ nsSVGEffects::InvalidateDirectRenderingObservers(Element *aElement, uint32_t aFl
}
void
nsSVGEffects::InvalidateDirectRenderingObservers(nsIFrame *aFrame, uint32_t aFlags /* = 0 */)
nsSVGEffects::InvalidateDirectRenderingObservers(nsIFrame* aFrame, uint32_t aFlags /* = 0 */)
{
nsIContent* content = aFrame->GetContent();
if (content && content->IsElement()) {

View File

@ -286,8 +286,8 @@ private:
class nsSVGFilterProperty : public nsSVGFilterChainObserver
{
public:
nsSVGFilterProperty(const nsTArray<nsStyleFilter> &aFilters,
nsIFrame *aFilteredFrame)
nsSVGFilterProperty(const nsTArray<nsStyleFilter>& aFilters,
nsIFrame* aFilteredFrame)
: nsSVGFilterChainObserver(aFilters, aFilteredFrame->GetContent(),
aFilteredFrame)
, mFrameReference(aFilteredFrame)
@ -304,7 +304,7 @@ protected:
class nsSVGMarkerProperty final: public nsSVGRenderingObserverProperty
{
public:
nsSVGMarkerProperty(nsIURI *aURI, nsIFrame *aFrame, bool aReferenceImage)
nsSVGMarkerProperty(nsIURI* aURI, nsIFrame* aFrame, bool aReferenceImage)
: nsSVGRenderingObserverProperty(aURI, aFrame, aReferenceImage) {}
protected:
@ -314,7 +314,7 @@ protected:
class nsSVGTextPathProperty final : public nsSVGRenderingObserverProperty
{
public:
nsSVGTextPathProperty(nsIURI *aURI, nsIFrame *aFrame, bool aReferenceImage)
nsSVGTextPathProperty(nsIURI* aURI, nsIFrame* aFrame, bool aReferenceImage)
: nsSVGRenderingObserverProperty(aURI, aFrame, aReferenceImage)
, mValid(true) {}
@ -335,7 +335,7 @@ private:
class nsSVGPaintingProperty final : public nsSVGRenderingObserverProperty
{
public:
nsSVGPaintingProperty(nsIURI *aURI, nsIFrame *aFrame, bool aReferenceImage)
nsSVGPaintingProperty(nsIURI* aURI, nsIFrame* aFrame, bool aReferenceImage)
: nsSVGRenderingObserverProperty(aURI, aFrame, aReferenceImage) {}
protected:
@ -464,7 +464,7 @@ public:
/**
* Get the paint server for a aTargetFrame.
*/
static nsSVGPaintServerFrame *GetPaintServer(nsIFrame *aTargetFrame,
static nsSVGPaintServerFrame *GetPaintServer(nsIFrame* aTargetFrame,
nsStyleSVGPaint nsStyleSVG::* aPaint,
PaintingPropertyDescriptor aProperty);
@ -479,14 +479,14 @@ public:
* exists but is an element of the wrong type, *aOK is set to false.
* Otherwise *aOK is untouched.
*/
nsSVGClipPathFrame *GetClipPathFrame(bool *aOK);
nsSVGClipPathFrame *GetClipPathFrame(bool* aOK);
/**
* @return the first mask frame, or null if there is no mask frame
* @param aOK if a mask was specified and the designated element
* exists but is an element of the wrong type, *aOK is set to false.
* Otherwise *aOK is untouched.
*/
nsSVGMaskFrame *GetFirstMaskFrame(bool *aOK = nullptr);
nsSVGMaskFrame *GetFirstMaskFrame(bool* aOK = nullptr);
/**
* @return an array which contains all SVG mask frames.
@ -505,7 +505,7 @@ public:
/**
* @param aFrame should be the first continuation
*/
static EffectProperties GetEffectProperties(nsIFrame *aFrame);
static EffectProperties GetEffectProperties(nsIFrame* aFrame);
/**
* Called when changes to an element (e.g. CSS property changes) cause its
@ -520,26 +520,26 @@ public:
*
* XXX rename to something more meaningful like RefreshResourceReferences?
*/
static void UpdateEffects(nsIFrame *aFrame);
static void UpdateEffects(nsIFrame* aFrame);
/**
* @param aFrame should be the first continuation
*/
static nsSVGFilterProperty *GetFilterProperty(nsIFrame *aFrame);
static nsSVGFilterProperty *GetFilterProperty(nsIFrame* aFrame);
/**
* @param aFrame must be a first-continuation.
*/
static void AddRenderingObserver(Element *aElement, nsSVGRenderingObserver *aObserver);
static void AddRenderingObserver(Element* aElement, nsSVGRenderingObserver *aObserver);
/**
* @param aFrame must be a first-continuation.
*/
static void RemoveRenderingObserver(Element *aElement, nsSVGRenderingObserver *aObserver);
static void RemoveRenderingObserver(Element* aElement, nsSVGRenderingObserver *aObserver);
/**
* Removes all rendering observers from aElement.
*/
static void RemoveAllRenderingObservers(Element *aElement);
static void RemoveAllRenderingObservers(Element* aElement);
/**
* This can be called on any frame. We invalidate the observers of aFrame's
@ -556,7 +556,7 @@ public:
* knowledge about our implementation and what can be affected by SVG effects
* to make invalidation relatively lightweight when an SVG effect changes.
*/
static void InvalidateRenderingObservers(nsIFrame *aFrame);
static void InvalidateRenderingObservers(nsIFrame* aFrame);
enum {
INVALIDATE_REFLOW = 1
@ -566,33 +566,33 @@ public:
* This can be called on any element or frame. Only direct observers of this
* (frame's) element, if any, are invalidated.
*/
static void InvalidateDirectRenderingObservers(Element *aElement, uint32_t aFlags = 0);
static void InvalidateDirectRenderingObservers(nsIFrame *aFrame, uint32_t aFlags = 0);
static void InvalidateDirectRenderingObservers(Element* aElement, uint32_t aFlags = 0);
static void InvalidateDirectRenderingObservers(nsIFrame* aFrame, uint32_t aFlags = 0);
/**
* Get an nsSVGMarkerProperty for the frame, creating a fresh one if necessary
*/
static nsSVGMarkerProperty *
GetMarkerProperty(nsIURI *aURI, nsIFrame *aFrame,
GetMarkerProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGMarkerProperty>* aProperty);
/**
* Get an nsSVGTextPathProperty for the frame, creating a fresh one if necessary
*/
static nsSVGTextPathProperty *
GetTextPathProperty(nsIURI *aURI, nsIFrame *aFrame,
GetTextPathProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGTextPathProperty>* aProperty);
/**
* Get an nsSVGPaintingProperty for the frame, creating a fresh one if necessary
*/
static nsSVGPaintingProperty *
GetPaintingProperty(nsIURI *aURI, nsIFrame *aFrame,
static nsSVGPaintingProperty*
GetPaintingProperty(nsIURI* aURI, nsIFrame* aFrame,
const mozilla::FramePropertyDescriptor<nsSVGPaintingProperty>* aProperty);
/**
* Get an nsSVGPaintingProperty for the frame for that URI, creating a fresh
* one if necessary
*/
static nsSVGPaintingProperty *
GetPaintingPropertyForURI(nsIURI *aURI, nsIFrame *aFrame,
static nsSVGPaintingProperty*
GetPaintingPropertyForURI(nsIURI* aURI, nsIFrame* aFrame,
URIObserverHashtablePropertyDescriptor aProp);
/**