From 523efb98ece894514a85087e1fb4aa5a3ddebf5f Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Fri, 16 Jan 2009 21:16:46 +1300 Subject: [PATCH] Bug 473334. Devirtualize some nsSVGSVGElement methods. r=jwatt,sr=roc --HG-- extra : rebase_source : 7a14a6c7697283a490696c43f3f62a23ad1beba4 --- content/svg/content/src/nsSVGSVGElement.cpp | 22 ++------------------- content/svg/content/src/nsSVGSVGElement.h | 10 +++++----- 2 files changed, 7 insertions(+), 25 deletions(-) diff --git a/content/svg/content/src/nsSVGSVGElement.cpp b/content/svg/content/src/nsSVGSVGElement.cpp index 52b2573f59ef..4ee200af8e3d 100644 --- a/content/svg/content/src/nsSVGSVGElement.cpp +++ b/content/svg/content/src/nsSVGSVGElement.cpp @@ -1061,7 +1061,7 @@ nsSVGSVGElement::SetZoomAndPan(PRUint16 aZoomAndPan) //---------------------------------------------------------------------- // helper methods for implementing SVGZoomEvent: -NS_IMETHODIMP +nsresult nsSVGSVGElement::GetCurrentScaleNumber(nsIDOMSVGNumber **aResult) { *aResult = mCurrentScale; @@ -1118,7 +1118,7 @@ nsSVGSVGElement::SetCurrentTranslate(float x, float y) return NS_OK; } -NS_IMETHODIMP_(void) +void nsSVGSVGElement::RecordCurrentScaleTranslate() { // IMPORTANT: If either mCurrentTranslate *or* mCurrentScale is changed then @@ -1134,24 +1134,6 @@ nsSVGSVGElement::RecordCurrentScaleTranslate() mCurrentTranslate->GetY(&mPreviousTranslate_y); } -NS_IMETHODIMP_(float) -nsSVGSVGElement::GetPreviousTranslate_x() -{ - return mPreviousTranslate_x; -} - -NS_IMETHODIMP_(float) -nsSVGSVGElement::GetPreviousTranslate_y() -{ - return mPreviousTranslate_y; -} - -NS_IMETHODIMP_(float) -nsSVGSVGElement::GetPreviousScale() -{ - return mPreviousScale; -} - #ifdef MOZ_SMIL nsSMILTimeContainer* nsSVGSVGElement::GetTimedDocumentRoot() diff --git a/content/svg/content/src/nsSVGSVGElement.h b/content/svg/content/src/nsSVGSVGElement.h index c3d1347928ec..8d3c94cb4d48 100644 --- a/content/svg/content/src/nsSVGSVGElement.h +++ b/content/svg/content/src/nsSVGSVGElement.h @@ -105,7 +105,7 @@ public: NS_FORWARD_NSIDOMSVGELEMENT(nsSVGSVGElementBase::) // helper methods for implementing SVGZoomEvent: - NS_IMETHOD GetCurrentScaleNumber(nsIDOMSVGNumber **aResult); + nsresult GetCurrentScaleNumber(nsIDOMSVGNumber **aResult); /** * For use by zoom controls to allow currentScale, currentTranslate.x and @@ -125,15 +125,15 @@ public: * Record the current values of currentScale, currentTranslate.x and * currentTranslate.y prior to changing the value of one of them. */ - NS_IMETHOD_(void) RecordCurrentScaleTranslate(); + void RecordCurrentScaleTranslate(); /** * Retrieve the value of currentScale, currentTranslate.x or * currentTranslate.y prior to the last change made to any one of them. */ - NS_IMETHOD_(float) GetPreviousTranslate_x(); - NS_IMETHOD_(float) GetPreviousTranslate_y(); - NS_IMETHOD_(float) GetPreviousScale(); + float GetPreviousTranslate_x() { return mPreviousTranslate_x; } + float GetPreviousTranslate_y() { return mPreviousTranslate_y; } + float GetPreviousScale() { return mPreviousScale; } #ifdef MOZ_SMIL nsSMILTimeContainer* GetTimedDocumentRoot();