From e4daffa10a1d5236af14483ac8e9598d1a243cec Mon Sep 17 00:00:00 2001 From: "bugzilla%arlen.demon.co.uk" Date: Fri, 31 Dec 2004 01:13:27 +0000 Subject: [PATCH] Bug 270708 remove nsPresContext variable from AttributeChanged and cleaned up comment in nsIFrame.h p=bugmail@q1n.org r=pkwarren sr=bzbarsky git-svn-id: svn://10.0.0.236/trunk@167124 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSFrameConstructor.cpp | 5 ++--- mozilla/layout/base/nsCSSFrameConstructor.h | 2 +- mozilla/layout/forms/nsFileControlFrame.cpp | 11 +++++------ mozilla/layout/forms/nsFileControlFrame.h | 3 +-- .../layout/forms/nsGfxButtonControlFrame.cpp | 11 +++++------ .../layout/forms/nsGfxButtonControlFrame.h | 3 +-- mozilla/layout/forms/nsIsIndexFrame.cpp | 11 +++++------ mozilla/layout/forms/nsIsIndexFrame.h | 3 +-- mozilla/layout/forms/nsTextControlFrame.cpp | 19 +++++++++---------- mozilla/layout/forms/nsTextControlFrame.h | 3 +-- mozilla/layout/generic/nsAreaFrame.cpp | 10 ++++------ mozilla/layout/generic/nsAreaFrame.h | 3 +-- mozilla/layout/generic/nsBlockFrame.cpp | 19 ++++++++++--------- mozilla/layout/generic/nsBlockFrame.h | 3 +-- mozilla/layout/generic/nsFrame.cpp | 3 +-- mozilla/layout/generic/nsFrame.h | 3 +-- mozilla/layout/generic/nsFrameFrame.cpp | 8 +++----- mozilla/layout/generic/nsIFrame.h | 11 ++++++----- mozilla/layout/generic/nsImageFrame.cpp | 10 ++++------ mozilla/layout/generic/nsImageFrame.h | 3 +-- .../base/src/nsMathMLContainerFrame.cpp | 5 ++--- .../mathml/base/src/nsMathMLContainerFrame.h | 3 +-- .../mathml/base/src/nsMathMLTokenFrame.cpp | 5 ++--- .../mathml/base/src/nsMathMLTokenFrame.h | 3 +-- .../mathml/base/src/nsMathMLmfencedFrame.cpp | 7 +++---- .../mathml/base/src/nsMathMLmfencedFrame.h | 3 +-- .../mathml/base/src/nsMathMLmfracFrame.cpp | 10 +++++----- .../mathml/base/src/nsMathMLmfracFrame.h | 3 +-- .../mathml/base/src/nsMathMLmoFrame.cpp | 7 +++---- .../layout/mathml/base/src/nsMathMLmoFrame.h | 3 +-- .../mathml/base/src/nsMathMLmoverFrame.cpp | 7 +++---- .../mathml/base/src/nsMathMLmoverFrame.h | 3 +-- .../mathml/base/src/nsMathMLmstyleFrame.cpp | 5 ++--- .../mathml/base/src/nsMathMLmstyleFrame.h | 3 +-- .../mathml/base/src/nsMathMLmunderFrame.cpp | 7 +++---- .../mathml/base/src/nsMathMLmunderFrame.h | 3 +-- .../base/src/nsMathMLmunderoverFrame.cpp | 7 +++---- .../mathml/base/src/nsMathMLmunderoverFrame.h | 3 +-- .../base/src/nsSVGGenericContainerFrame.cpp | 3 +-- .../svg/base/src/nsSVGGenericContainerFrame.h | 3 +-- .../svg/base/src/nsSVGInnerSVGFrame.cpp | 6 ++---- .../svg/base/src/nsSVGOuterSVGFrame.cpp | 6 ++---- .../svg/base/src/nsSVGPathGeometryFrame.cpp | 3 +-- .../svg/base/src/nsSVGPathGeometryFrame.h | 3 +-- .../layout/svg/base/src/nsSVGTextFrame.cpp | 8 +++----- mozilla/layout/tables/nsTableCellFrame.cpp | 5 ++--- mozilla/layout/tables/nsTableCellFrame.h | 3 +-- mozilla/layout/xul/base/src/nsBoxFrame.cpp | 14 ++++++-------- mozilla/layout/xul/base/src/nsBoxFrame.h | 3 +-- mozilla/layout/xul/base/src/nsDeckFrame.cpp | 10 ++++------ mozilla/layout/xul/base/src/nsDeckFrame.h | 3 +-- .../layout/xul/base/src/nsImageBoxFrame.cpp | 14 +++++++------- mozilla/layout/xul/base/src/nsImageBoxFrame.h | 3 +-- .../layout/xul/base/src/nsLeafBoxFrame.cpp | 8 +++----- mozilla/layout/xul/base/src/nsLeafBoxFrame.h | 3 +-- .../xul/base/src/nsListBoxBodyFrame.cpp | 10 +++++----- .../layout/xul/base/src/nsListBoxBodyFrame.h | 5 ++--- mozilla/layout/xul/base/src/nsMenuFrame.cpp | 7 +++---- mozilla/layout/xul/base/src/nsMenuFrame.h | 3 +-- .../layout/xul/base/src/nsMenuPopupFrame.cpp | 8 +++----- .../layout/xul/base/src/nsMenuPopupFrame.h | 3 +-- .../xul/base/src/nsNativeScrollbarFrame.cpp | 8 +++----- .../xul/base/src/nsNativeScrollbarFrame.h | 5 ++--- .../xul/base/src/nsProgressMeterFrame.cpp | 12 +++++------- .../xul/base/src/nsProgressMeterFrame.h | 3 +-- .../layout/xul/base/src/nsResizerFrame.cpp | 14 ++++++-------- mozilla/layout/xul/base/src/nsResizerFrame.h | 3 +-- .../layout/xul/base/src/nsScrollbarFrame.cpp | 8 +++----- .../layout/xul/base/src/nsScrollbarFrame.h | 3 +-- mozilla/layout/xul/base/src/nsSliderFrame.cpp | 18 ++++++++---------- mozilla/layout/xul/base/src/nsSliderFrame.h | 3 +-- .../layout/xul/base/src/nsSplitterFrame.cpp | 12 +++++------- mozilla/layout/xul/base/src/nsSplitterFrame.h | 3 +-- .../layout/xul/base/src/nsTextBoxFrame.cpp | 12 ++++++------ mozilla/layout/xul/base/src/nsTextBoxFrame.h | 3 +-- .../xul/base/src/tree/src/nsTreeColFrame.cpp | 8 +++----- .../xul/base/src/tree/src/nsTreeColFrame.h | 3 +-- 77 files changed, 199 insertions(+), 284 deletions(-) diff --git a/mozilla/layout/base/nsCSSFrameConstructor.cpp b/mozilla/layout/base/nsCSSFrameConstructor.cpp index 045c393e966..c317354ca08 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.cpp +++ b/mozilla/layout/base/nsCSSFrameConstructor.cpp @@ -10323,9 +10323,8 @@ nsCSSFrameConstructor::AttributeChanged(nsPresContext* aPresContext, // let the frame deal with it now, so we don't have to deal later if (primaryFrame) { - result = primaryFrame->AttributeChanged(aPresContext, aContent, - aNameSpaceID, aAttribute, - aModType); + result = primaryFrame->AttributeChanged(aContent, aNameSpaceID, + aAttribute, aModType); // XXXwaterson should probably check for special IB siblings // here, and propagate the AttributeChanged notification to // them, as well. Currently, inline frames don't do anything on diff --git a/mozilla/layout/base/nsCSSFrameConstructor.h b/mozilla/layout/base/nsCSSFrameConstructor.h index 3052090b35a..ab079118930 100644 --- a/mozilla/layout/base/nsCSSFrameConstructor.h +++ b/mozilla/layout/base/nsCSSFrameConstructor.h @@ -127,7 +127,7 @@ public: void GeneratedContentFrameRemoved(nsIFrame* aFrame); - nsresult AttributeChanged(nsPresContext* aPresContext, + nsresult AttributeChanged(nsPresContext* aPresContext, nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index 970cedfcda6..2d6db6cf3db 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -548,11 +548,10 @@ nsFileControlFrame::SyncAttr(PRInt32 aNameSpaceID, nsIAtom* aAttribute, } NS_IMETHODIMP -nsFileControlFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsFileControlFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { // propagate disabled to text / button inputs if (aNameSpaceID == kNameSpaceID_None && @@ -564,7 +563,7 @@ nsFileControlFrame::AttributeChanged(nsPresContext* aPresContext, SyncAttr(aNameSpaceID, aAttribute, SYNC_TEXT); } - return nsAreaFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + return nsAreaFrame::AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); } NS_IMETHODIMP diff --git a/mozilla/layout/forms/nsFileControlFrame.h b/mozilla/layout/forms/nsFileControlFrame.h index d91c5969738..158d2bbfbbd 100644 --- a/mozilla/layout/forms/nsFileControlFrame.h +++ b/mozilla/layout/forms/nsFileControlFrame.h @@ -98,8 +98,7 @@ public: #endif NS_IMETHOD SetSuggestedSize(nscoord aWidth, nscoord aHeight) { return NS_OK; }; NS_IMETHOD GetFrameForPoint(nsPresContext* aPresContext, const nsPoint& aPoint, nsFramePaintLayer aWhichLayer, nsIFrame** aFrame); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/forms/nsGfxButtonControlFrame.cpp b/mozilla/layout/forms/nsGfxButtonControlFrame.cpp index 79ec9206cfb..3ce5becb761 100644 --- a/mozilla/layout/forms/nsGfxButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsGfxButtonControlFrame.cpp @@ -307,11 +307,10 @@ nsGfxButtonControlFrame::GetDefaultLabel(nsString& aString) } NS_IMETHODIMP -nsGfxButtonControlFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsGfxButtonControlFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { nsresult rv = NS_OK; @@ -329,7 +328,7 @@ nsGfxButtonControlFrame::AttributeChanged(nsPresContext* aPresContext, // defer to HTMLButtonControlFrame } else { - rv = nsHTMLButtonControlFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + rv = nsHTMLButtonControlFrame::AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); } return rv; } diff --git a/mozilla/layout/forms/nsGfxButtonControlFrame.h b/mozilla/layout/forms/nsGfxButtonControlFrame.h index 39430b13cd7..742bd5c6e52 100644 --- a/mozilla/layout/forms/nsGfxButtonControlFrame.h +++ b/mozilla/layout/forms/nsGfxButtonControlFrame.h @@ -95,8 +95,7 @@ public: nsIContent * aContent, nsIFrame** aFrame); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index eaec3a5dc26..1565ea3fa40 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -325,17 +325,16 @@ NS_IMETHODIMP nsIsIndexFrame::Reflow(nsPresContext* aPresContext, } NS_IMETHODIMP -nsIsIndexFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsIsIndexFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { nsresult rv = NS_OK; if (nsHTMLAtoms::prompt == aAttribute) { rv = UpdatePromptLabel(); } else { - rv = nsAreaFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + rv = nsAreaFrame::AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); } return rv; } diff --git a/mozilla/layout/forms/nsIsIndexFrame.h b/mozilla/layout/forms/nsIsIndexFrame.h index 34a7fb00e84..31eb6be080b 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.h +++ b/mozilla/layout/forms/nsIsIndexFrame.h @@ -111,8 +111,7 @@ public: #ifdef NS_DEBUG NS_IMETHOD GetFrameName(nsAString& aResult) const; #endif - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/forms/nsTextControlFrame.cpp b/mozilla/layout/forms/nsTextControlFrame.cpp index c9eb34e186f..cfc88e817df 100644 --- a/mozilla/layout/forms/nsTextControlFrame.cpp +++ b/mozilla/layout/forms/nsTextControlFrame.cpp @@ -2764,11 +2764,10 @@ nsTextControlFrame::GetSelectionContr(nsISelectionController **aSelCon) ////NSIFRAME NS_IMETHODIMP -nsTextControlFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsTextControlFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { if (!mEditor || !mSelCon) {return NS_ERROR_NOT_INITIALIZED;} nsresult rv = NS_OK; @@ -2799,14 +2798,14 @@ nsTextControlFrame::AttributeChanged(nsPresContext* aPresContext, if (NS_CONTENT_ATTR_NOT_THERE != rv) { // set readonly flags |= nsIPlaintextEditor::eEditorReadonlyMask; - if (mSelCon && IsFocusedContent(aPresContext, mContent)) + if (mSelCon && IsFocusedContent(GetPresContext(), mContent)) mSelCon->SetCaretEnabled(PR_FALSE); } else { // unset readonly flags &= ~(nsIPlaintextEditor::eEditorReadonlyMask); if (mSelCon && !(flags & nsIPlaintextEditor::eEditorDisabledMask) && - IsFocusedContent(aPresContext, mContent)) + IsFocusedContent(GetPresContext(), mContent)) mSelCon->SetCaretEnabled(PR_TRUE); } mEditor->SetFlags(flags); @@ -2815,7 +2814,7 @@ nsTextControlFrame::AttributeChanged(nsPresContext* aPresContext, { // XXXbryner do we need to check for a null presshell here? // we don't do anything with it. - nsIPresShell *shell = aPresContext->GetPresShell(); + nsIPresShell *shell = GetPresContext()->GetPresShell(); if (!shell) return NS_ERROR_FAILURE; @@ -2828,7 +2827,7 @@ nsTextControlFrame::AttributeChanged(nsPresContext* aPresContext, if (mSelCon) { mSelCon->SetDisplaySelection(nsISelectionController::SELECTION_OFF); - if (IsFocusedContent(aPresContext, mContent)) + if (IsFocusedContent(GetPresContext(), mContent)) mSelCon->SetCaretEnabled(PR_FALSE); } } @@ -2845,7 +2844,7 @@ nsTextControlFrame::AttributeChanged(nsPresContext* aPresContext, // Allow the base class to handle common attributes supported // by all form elements... else { - rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); } return rv; diff --git a/mozilla/layout/forms/nsTextControlFrame.h b/mozilla/layout/forms/nsTextControlFrame.h index 261e07cddb9..1933fb101e2 100644 --- a/mozilla/layout/forms/nsTextControlFrame.h +++ b/mozilla/layout/forms/nsTextControlFrame.h @@ -173,8 +173,7 @@ public: virtual nsIAtom* GetType() const; /** handler for attribute changes to mContent */ - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/generic/nsAreaFrame.cpp b/mozilla/layout/generic/nsAreaFrame.cpp index 18a2ed4f9cb..a1b6f9b46e1 100644 --- a/mozilla/layout/generic/nsAreaFrame.cpp +++ b/mozilla/layout/generic/nsAreaFrame.cpp @@ -156,20 +156,18 @@ nsAreaFrame::Destroy(nsPresContext* aPresContext) } NS_IMETHODIMP -nsAreaFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsAreaFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBlockFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBlockFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // If the accesskey changed, register for the new value // The old value has been unregistered in nsXULElement::SetAttr if (aAttribute == nsXULAtoms::accesskey || aAttribute == nsXULAtoms::control) - RegUnregAccessKey(aPresContext, PR_TRUE); + RegUnregAccessKey(GetPresContext(), PR_TRUE); return rv; } diff --git a/mozilla/layout/generic/nsAreaFrame.h b/mozilla/layout/generic/nsAreaFrame.h index 1c1a06a2dfe..5dfac4dcbce 100644 --- a/mozilla/layout/generic/nsAreaFrame.h +++ b/mozilla/layout/generic/nsAreaFrame.h @@ -67,8 +67,7 @@ public: NS_IMETHOD Destroy(nsPresContext* aPresContext); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 1690f157cb0..47190075512 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -2964,22 +2964,22 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState, } NS_IMETHODIMP -nsBlockFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsBlockFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBlockFrameSuper::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBlockFrameSuper::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (NS_FAILED(rv)) { return rv; } if (nsHTMLAtoms::start == aAttribute) { + nsPresContext* presContext = GetPresContext(); + // XXX Not sure if this is necessary anymore - RenumberLists(aPresContext); + RenumberLists(presContext); nsHTMLReflowCommand* reflowCmd; rv = NS_NewHTMLReflowCommand(&reflowCmd, this, @@ -2987,7 +2987,7 @@ nsBlockFrame::AttributeChanged(nsPresContext* aPresContext, nsnull, aAttribute); if (NS_SUCCEEDED(rv)) - aPresContext->PresShell()->AppendReflowCommand(reflowCmd); + presContext->PresShell()->AppendReflowCommand(reflowCmd); } else if (nsHTMLAtoms::value == aAttribute) { const nsStyleDisplay* styleDisplay = GetStyleDisplay(); @@ -3010,8 +3010,9 @@ nsBlockFrame::AttributeChanged(nsPresContext* aPresContext, // Tell the enclosing block frame to renumber list items within // itself if (nsnull != blockParent) { + nsPresContext* presContext = GetPresContext(); // XXX Not sure if this is necessary anymore - blockParent->RenumberLists(aPresContext); + blockParent->RenumberLists(presContext); nsHTMLReflowCommand* reflowCmd; rv = NS_NewHTMLReflowCommand(&reflowCmd, blockParent, @@ -3019,7 +3020,7 @@ nsBlockFrame::AttributeChanged(nsPresContext* aPresContext, nsnull, aAttribute); if (NS_SUCCEEDED(rv)) - aPresContext->PresShell()->AppendReflowCommand(reflowCmd); + presContext->PresShell()->AppendReflowCommand(reflowCmd); } } } diff --git a/mozilla/layout/generic/nsBlockFrame.h b/mozilla/layout/generic/nsBlockFrame.h index f84b60b4ed5..349d44c86db 100644 --- a/mozilla/layout/generic/nsBlockFrame.h +++ b/mozilla/layout/generic/nsBlockFrame.h @@ -205,8 +205,7 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/generic/nsFrame.cpp b/mozilla/layout/generic/nsFrame.cpp index c10b7d1ad15..0d50a4c1f54 100644 --- a/mozilla/layout/generic/nsFrame.cpp +++ b/mozilla/layout/generic/nsFrame.cpp @@ -2163,8 +2163,7 @@ nsFrame::CharacterDataChanged(nsPresContext* aPresContext, } NS_IMETHODIMP -nsFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) diff --git a/mozilla/layout/generic/nsFrame.h b/mozilla/layout/generic/nsFrame.h index 6870bcbc27a..ed745863571 100644 --- a/mozilla/layout/generic/nsFrame.h +++ b/mozilla/layout/generic/nsFrame.h @@ -232,8 +232,7 @@ public: NS_IMETHOD CharacterDataChanged(nsPresContext* aPresContext, nsIContent* aChild, PRBool aAppend); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/generic/nsFrameFrame.cpp b/mozilla/layout/generic/nsFrameFrame.cpp index 96a795edd66..2ad94798bfd 100644 --- a/mozilla/layout/generic/nsFrameFrame.cpp +++ b/mozilla/layout/generic/nsFrameFrame.cpp @@ -125,8 +125,7 @@ public: const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); @@ -445,8 +444,7 @@ nsSubDocumentFrame::VerifyTree() const } NS_IMETHODIMP -nsSubDocumentFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSubDocumentFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -493,7 +491,7 @@ nsSubDocumentFrame::AttributeChanged(nsPresContext* aPresContext, // If our container is a web-shell, inform it that it has a new // child. If it's not a web-shell then some things will not operate // properly. - nsCOMPtr container = aPresContext->GetContainer(); + nsCOMPtr container = GetPresContext()->GetContainer(); nsCOMPtr parentAsNode(do_QueryInterface(container)); if (parentAsNode) { diff --git a/mozilla/layout/generic/nsIFrame.h b/mozilla/layout/generic/nsIFrame.h index 34c283b6d37..ba13599d4cb 100644 --- a/mozilla/layout/generic/nsIFrame.h +++ b/mozilla/layout/generic/nsIFrame.h @@ -829,12 +829,13 @@ public: * The first frame that maps that content is asked to deal * with the change by doing whatever is appropriate. * - * @param aChild the content object - * @param aAttribute the attribute whose value changed - * @param aHint the level of change that has already been dealt with + * @param aChild the piece of content whose attribute changed + * @param aNameSpaceID the namespace of the attribute + * @param aAttribute the atom name of the attribute + * @param aModType Whether or not the attribute was added, changed, or removed. + * The constants are defined in nsIDOMMutationEvent.h. */ - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) = 0; diff --git a/mozilla/layout/generic/nsImageFrame.cpp b/mozilla/layout/generic/nsImageFrame.cpp index 2279de23d57..975af24d8b5 100644 --- a/mozilla/layout/generic/nsImageFrame.cpp +++ b/mozilla/layout/generic/nsImageFrame.cpp @@ -1758,22 +1758,20 @@ nsImageFrame::GetCursor(const nsPoint& aPoint, } NS_IMETHODIMP -nsImageFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsImageFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsSplittableFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsSplittableFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (NS_FAILED(rv)) { return rv; } if (nsHTMLAtoms::alt == aAttribute) { mState |= NS_FRAME_IS_DIRTY; - mParent->ReflowDirtyChild(aPresContext->PresShell(), (nsIFrame*) this); + mParent->ReflowDirtyChild(GetPresContext()->PresShell(), (nsIFrame*) this); } return NS_OK; diff --git a/mozilla/layout/generic/nsImageFrame.h b/mozilla/layout/generic/nsImageFrame.h index 75c8c7cb86b..8998c710eea 100644 --- a/mozilla/layout/generic/nsImageFrame.h +++ b/mozilla/layout/generic/nsImageFrame.h @@ -115,8 +115,7 @@ public: nsEventStatus* aEventStatus); NS_IMETHOD GetCursor(const nsPoint& aPoint, nsIFrame::Cursor& aCursor); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp index 248e10c64f4..2eca75403f5 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.cpp @@ -1017,8 +1017,7 @@ nsMathMLContainerFrame::ReplaceFrame(nsPresContext* aPresContext, } NS_IMETHODIMP -nsMathMLContainerFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsMathMLContainerFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -1033,7 +1032,7 @@ nsMathMLContainerFrame::AttributeChanged(nsPresContext* aPresContext, MapAttributesIntoCSS(aPresContext, this); } - return ReflowDirtyChild(aPresContext->PresShell(), nsnull); + return ReflowDirtyChild(GetPresContext()->PresShell(), nsnull); } // We are an inline frame, so we handle dirty request like nsInlineFrame diff --git a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.h b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.h index ba6d83c82ab..d1abfa4e6ae 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLContainerFrame.h @@ -204,8 +204,7 @@ public: // Therefore, there is an overhead here in that our siblings are re-laid // too (e.g., this happens with , , , ). NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.cpp index eea3d3c57fc..af63b8584fe 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.cpp @@ -269,8 +269,7 @@ nsMathMLTokenFrame::ReflowDirtyChild(nsIPresShell* aPresShell, } NS_IMETHODIMP -nsMathMLTokenFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLTokenFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -281,7 +280,7 @@ nsMathMLTokenFrame::AttributeChanged(nsPresContext* aPresContext, } return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.h b/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.h index 12a8388c6ba..40220725e2d 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLTokenFrame.h @@ -80,8 +80,7 @@ public: nsIFrame* aChild); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp index 51ad381b544..bcc70fa266e 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.cpp @@ -105,17 +105,16 @@ nsMathMLmfencedFrame::SetInitialChildList(nsPresContext* aPresContext, } NS_IMETHODIMP -nsMathMLmfencedFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmfencedFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { RemoveFencesAndSeparators(); - CreateFencesAndSeparators(aPresContext); + CreateFencesAndSeparators(GetPresContext()); return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.h index 705a79caa23..5685669ce95 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmfencedFrame.h @@ -79,8 +79,7 @@ public: PRUint32 aFlags = 0); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, + AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp index a284adaf821..4ea2fa9e800 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.cpp @@ -453,8 +453,7 @@ nsMathMLmfracFrame::Place(nsPresContext* aPresContext, } NS_IMETHODIMP -nsMathMLmfracFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmfracFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -472,15 +471,16 @@ nsMathMLmfracFrame::AttributeChanged(nsPresContext* aPresContext, if (!mSlashChar) { mSlashChar = new nsMathMLChar(); if (mSlashChar) { + nsPresContext* presContext = GetPresContext(); nsAutoString slashChar; slashChar.Assign(kSlashChar); - mSlashChar->SetData(aPresContext, slashChar); - ResolveMathMLCharStyle(aPresContext, mContent, mStyleContext, mSlashChar, PR_TRUE); + mSlashChar->SetData(presContext, slashChar); + ResolveMathMLCharStyle(presContext, mContent, mStyleContext, mSlashChar, PR_TRUE); } } } } return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent,aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.h index e0635d5ef33..4e795020bbf 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmfracFrame.h @@ -94,8 +94,7 @@ public: GetAdditionalStyleContext(PRInt32 aIndex) const; NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp index b22cbc65685..39adbc9f3fe 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.cpp @@ -988,8 +988,7 @@ nsMathMLmoFrame::ReflowDirtyChild(nsIPresShell* aPresShell, } NS_IMETHODIMP -nsMathMLmoFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmoFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -1009,11 +1008,11 @@ nsMathMLmoFrame::AttributeChanged(nsPresContext* aPresContext, } while (embellishData.coreFrame == this); // we have automatic data to update in the children of the target frame - return ReLayoutChildren(aPresContext, target); + return ReLayoutChildren(GetPresContext(), target); } return nsMathMLTokenFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.h index 229787de10b..a41e9824edd 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmoFrame.h @@ -84,8 +84,7 @@ public: nsIFrame* aChild); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, + AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp index e48a9151119..82f0d1bcda1 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.cpp @@ -80,8 +80,7 @@ nsMathMLmoverFrame::~nsMathMLmoverFrame() } NS_IMETHODIMP -nsMathMLmoverFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmoverFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -89,11 +88,11 @@ nsMathMLmoverFrame::AttributeChanged(nsPresContext* aPresContext, if (nsMathMLAtoms::accent_ == aAttribute) { // When we have automatic data to update within ourselves, we ask our // parent to re-layout its children - return ReLayoutChildren(aPresContext, mParent); + return ReLayoutChildren(GetPresContext(), mParent); } return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.h index 917d3d96c4f..9eaa2b96285 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmoverFrame.h @@ -79,8 +79,7 @@ public: PRUint32 aFlagsToUpdate); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp index ba0896d4366..8300f3fb6bc 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.cpp @@ -206,8 +206,7 @@ nsMathMLmstyleFrame::UpdatePresentationDataFromChildAt(nsPresContext* aPresConte } NS_IMETHODIMP -nsMathMLmstyleFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmstyleFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -217,5 +216,5 @@ nsMathMLmstyleFrame::AttributeChanged(nsPresContext* aPresContext, // them in our subtree. However, our siblings will be re-laid too. We used // to have a more speedier but more verbose alternative that didn't re-layout // our siblings. See bug 114909 - attachment 67668. - return ReLayoutChildren(aPresContext, mParent); + return ReLayoutChildren(GetPresContext(), mParent); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.h index 8c31cf902d1..5ab59fb7f7d 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmstyleFrame.h @@ -51,8 +51,7 @@ public: friend nsresult NS_NewMathMLmstyleFrame(nsIPresShell* aPresShell, nsIFrame** aNewFrame); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, + AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp index e2eda804674..d99fa7a2af0 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.cpp @@ -80,8 +80,7 @@ nsMathMLmunderFrame::~nsMathMLmunderFrame() } NS_IMETHODIMP -nsMathMLmunderFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmunderFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -89,11 +88,11 @@ nsMathMLmunderFrame::AttributeChanged(nsPresContext* aPresContext, if (nsMathMLAtoms::accentunder_ == aAttribute) { // When we have automatic data to update within ourselves, we ask our // parent to re-layout its children - return ReLayoutChildren(aPresContext, mParent); + return ReLayoutChildren(GetPresContext(), mParent); } return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.h index c1a02387b30..e93aa50e9db 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderFrame.h @@ -79,8 +79,7 @@ public: PRUint32 aFlagsToUpdate); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp index 3998a62ea4b..7f9aaf2cf71 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.cpp @@ -80,8 +80,7 @@ nsMathMLmunderoverFrame::~nsMathMLmunderoverFrame() } NS_IMETHODIMP -nsMathMLmunderoverFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aContent, +nsMathMLmunderoverFrame::AttributeChanged(nsIContent* aContent, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -90,11 +89,11 @@ nsMathMLmunderoverFrame::AttributeChanged(nsPresContext* aPresContext, nsMathMLAtoms::accentunder_ == aAttribute) { // When we have automatic data to update within ourselves, we ask our // parent to re-layout its children - return ReLayoutChildren(aPresContext, mParent); + return ReLayoutChildren(GetPresContext(), mParent); } return nsMathMLContainerFrame:: - AttributeChanged(aPresContext, aContent, aNameSpaceID, + AttributeChanged(aContent, aNameSpaceID, aAttribute, aModType); } diff --git a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.h b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.h index 2d438875b6d..47f6da19199 100644 --- a/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.h +++ b/mozilla/layout/mathml/base/src/nsMathMLmunderoverFrame.h @@ -79,8 +79,7 @@ public: PRUint32 aFlagsToUpdate); NS_IMETHOD - AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.cpp b/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.cpp index 1467b2e665d..dc642a0d06f 100644 --- a/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.cpp @@ -180,8 +180,7 @@ nsSVGGenericContainerFrame::ReplaceFrame(nsPresContext* aPresContext, } NS_IMETHODIMP -nsSVGGenericContainerFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSVGGenericContainerFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) diff --git a/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.h b/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.h index da6bbd1d306..be4daa4af09 100644 --- a/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.h +++ b/mozilla/layout/svg/base/src/nsSVGGenericContainerFrame.h @@ -92,8 +92,7 @@ public: nsStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/svg/base/src/nsSVGInnerSVGFrame.cpp b/mozilla/layout/svg/base/src/nsSVGInnerSVGFrame.cpp index 20c70b391f1..ac6732de83c 100644 --- a/mozilla/layout/svg/base/src/nsSVGInnerSVGFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGInnerSVGFrame.cpp @@ -102,8 +102,7 @@ public: nsStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); @@ -329,8 +328,7 @@ nsSVGInnerSVGFrame::ReplaceFrame(nsPresContext* aPresContext, } NS_IMETHODIMP -nsSVGInnerSVGFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSVGInnerSVGFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) diff --git a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp index 9e3f011df99..c9c5d2a6d4f 100644 --- a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp @@ -205,8 +205,7 @@ public: nsIFrame* aOldFrame, nsIFrame* aNewFrame); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); @@ -692,8 +691,7 @@ nsSVGOuterSVGFrame::ReplaceFrame(nsPresContext* aPresContext, } NS_IMETHODIMP -nsSVGOuterSVGFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSVGOuterSVGFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) diff --git a/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.cpp b/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.cpp index 408c711f5cc..a4c38d837bc 100644 --- a/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.cpp @@ -119,8 +119,7 @@ nsSVGPathGeometryFrame::Init(nsPresContext* aPresContext, } NS_IMETHODIMP -nsSVGPathGeometryFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSVGPathGeometryFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType, diff --git a/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.h b/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.h index d3a5814a0b3..e5a04abd44d 100644 --- a/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.h +++ b/mozilla/layout/svg/base/src/nsSVGPathGeometryFrame.h @@ -79,8 +79,7 @@ public: nsStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType, diff --git a/mozilla/layout/svg/base/src/nsSVGTextFrame.cpp b/mozilla/layout/svg/base/src/nsSVGTextFrame.cpp index 9fd0425db74..c8aab4b5c3e 100644 --- a/mozilla/layout/svg/base/src/nsSVGTextFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGTextFrame.cpp @@ -115,8 +115,7 @@ public: nsStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType, @@ -281,7 +280,7 @@ NS_INTERFACE_MAP_END_INHERITING(nsSVGTextFrameBase) //---------------------------------------------------------------------- // nsIFrame methods NS_IMETHODIMP -nsSVGTextFrame::Init(nsPresContext* aPresContext, +nsSVGTextFrame::Init(nsPresContext* aPresContext, nsIContent* aContent, nsIFrame* aParent, nsStyleContext* aContext, @@ -297,8 +296,7 @@ nsSVGTextFrame::Init(nsPresContext* aPresContext, } NS_IMETHODIMP -nsSVGTextFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSVGTextFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType, diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index c8c7687c04a..cdee43fc589 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -205,8 +205,7 @@ nsTableCellFrame::GetColIndex(PRInt32 &aColIndex) const } NS_IMETHODIMP -nsTableCellFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsTableCellFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -215,7 +214,7 @@ nsTableCellFrame::AttributeChanged(nsPresContext* aPresContext, nsTableFrame* tableFrame = nsnull; nsresult rv = nsTableFrame::GetTableFrame(this, tableFrame); if ((NS_SUCCEEDED(rv)) && (tableFrame)) { - tableFrame->AttributeChangedFor(aPresContext, this, aChild, aAttribute); + tableFrame->AttributeChangedFor(GetPresContext(), this, aChild, aAttribute); } return NS_OK; } diff --git a/mozilla/layout/tables/nsTableCellFrame.h b/mozilla/layout/tables/nsTableCellFrame.h index c91de11c896..1211ef15979 100644 --- a/mozilla/layout/tables/nsTableCellFrame.h +++ b/mozilla/layout/tables/nsTableCellFrame.h @@ -93,8 +93,7 @@ public: #endif - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.cpp b/mozilla/layout/xul/base/src/nsBoxFrame.cpp index 2f2d4ac2d90..875c3478418 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsBoxFrame.cpp @@ -1232,15 +1232,13 @@ nsBoxFrame::AppendFrames(nsPresContext* aPresContext, NS_IMETHODIMP -nsBoxFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsBoxFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsContainerFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsContainerFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // Ignore 'width', 'height', 'screenX', 'screenY' and 'sizemode' on a // . @@ -1336,11 +1334,11 @@ nsBoxFrame::AttributeChanged(nsPresContext* aPresContext, UpdateMouseThrough(); } - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(GetPresContext()); MarkDirty(state); } else if (aAttribute == nsXULAtoms::ordinal) { - nsBoxLayoutState state(aPresContext->PresShell()); + nsBoxLayoutState state(GetPresContext()->PresShell()); nsIBox* parent; GetParentBox(&parent); @@ -1350,7 +1348,7 @@ nsBoxFrame::AttributeChanged(nsPresContext* aPresContext, // If the accesskey changed, register for the new value // The old value has been unregistered in nsXULElement::SetAttr else if (aAttribute == nsXULAtoms::accesskey) { - RegUnregAccessKey(aPresContext, PR_TRUE); + RegUnregAccessKey(GetPresContext(), PR_TRUE); } return rv; diff --git a/mozilla/layout/xul/base/src/nsBoxFrame.h b/mozilla/layout/xul/base/src/nsBoxFrame.h index 5c990c9a0dc..ee804b4f461 100644 --- a/mozilla/layout/xul/base/src/nsBoxFrame.h +++ b/mozilla/layout/xul/base/src/nsBoxFrame.h @@ -141,8 +141,7 @@ public: nsIFrame* asPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsDeckFrame.cpp b/mozilla/layout/xul/base/src/nsDeckFrame.cpp index eab6aae9dfd..3eb38001124 100644 --- a/mozilla/layout/xul/base/src/nsDeckFrame.cpp +++ b/mozilla/layout/xul/base/src/nsDeckFrame.cpp @@ -100,20 +100,18 @@ nsDeckFrame::ChildrenMustHaveWidgets(PRBool& aMust) const } NS_IMETHODIMP -nsDeckFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsDeckFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // if the index changed hide the old element and make the now element visible if (aAttribute == nsXULAtoms::selectedIndex) { - IndexChanged(aPresContext); + IndexChanged(GetPresContext()); } return rv; diff --git a/mozilla/layout/xul/base/src/nsDeckFrame.h b/mozilla/layout/xul/base/src/nsDeckFrame.h index 877518f3419..fb386bd55b2 100644 --- a/mozilla/layout/xul/base/src/nsDeckFrame.h +++ b/mozilla/layout/xul/base/src/nsDeckFrame.h @@ -56,8 +56,7 @@ public: nsIFrame** aNewFrame, nsIBoxLayout* aLayoutManager); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp b/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp index 65882ed7e90..a0147b18ca4 100644 --- a/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsImageBoxFrame.cpp @@ -245,17 +245,17 @@ NS_NewImageBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ) } // NS_NewTitledButtonFrame NS_IMETHODIMP -nsImageBoxFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsImageBoxFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { - nsresult rv = nsLeafBoxFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + nsresult rv = nsLeafBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (aAttribute == nsHTMLAtoms::src) { UpdateImage(); - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(GetPresContext()); MarkDirty(state); } else if (aAttribute == nsXULAtoms::validate) diff --git a/mozilla/layout/xul/base/src/nsImageBoxFrame.h b/mozilla/layout/xul/base/src/nsImageBoxFrame.h index fc9e07acb16..5405c9910f3 100644 --- a/mozilla/layout/xul/base/src/nsImageBoxFrame.h +++ b/mozilla/layout/xul/base/src/nsImageBoxFrame.h @@ -82,8 +82,7 @@ public: nsStyleContext* aContext, nsIFrame* asPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsLeafBoxFrame.cpp b/mozilla/layout/xul/base/src/nsLeafBoxFrame.cpp index 82006c2af9d..eba1de178d1 100644 --- a/mozilla/layout/xul/base/src/nsLeafBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsLeafBoxFrame.cpp @@ -131,15 +131,13 @@ nsLeafBoxFrame::Init(nsPresContext* aPresContext, } NS_IMETHODIMP -nsLeafBoxFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsLeafBoxFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsLeafFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsLeafFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (aAttribute == nsXULAtoms::mousethrough) UpdateMouseThrough(); diff --git a/mozilla/layout/xul/base/src/nsLeafBoxFrame.h b/mozilla/layout/xul/base/src/nsLeafBoxFrame.h index ad9ede22c86..7ee7c04bb69 100644 --- a/mozilla/layout/xul/base/src/nsLeafBoxFrame.h +++ b/mozilla/layout/xul/base/src/nsLeafBoxFrame.h @@ -87,8 +87,7 @@ public: nsFramePaintLayer aWhichLayer, nsIFrame** aFrame); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp index 882cd10b299..7c1b54bdab6 100644 --- a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp +++ b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.cpp @@ -303,8 +303,7 @@ nsListBoxBodyFrame::Destroy(nsPresContext* aPresContext) } NS_IMETHODIMP -nsListBoxBodyFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsListBoxBodyFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -318,20 +317,21 @@ nsListBoxBodyFrame::AttributeChanged(nsPresContext* aPresContext, if (!rows.IsEmpty()) { PRInt32 dummy; PRInt32 count = rows.ToInteger(&dummy); + nsPresContext* presContext = GetPresContext(); float t2p; - t2p = aPresContext->TwipsToPixels(); + t2p = presContext->TwipsToPixels(); PRInt32 rowHeight = GetRowHeightTwips(); rowHeight = NSTwipsToIntPixels(rowHeight, t2p); nsAutoString value; value.AppendInt(rowHeight*count); mContent->SetAttr(kNameSpaceID_None, nsXULAtoms::minheight, value, PR_FALSE); - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(presContext); MarkDirty(state); } } else - rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); return rv; diff --git a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.h b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.h index 7568965f13c..2334ef9b83d 100644 --- a/mozilla/layout/xul/base/src/nsListBoxBodyFrame.h +++ b/mozilla/layout/xul/base/src/nsListBoxBodyFrame.h @@ -77,9 +77,8 @@ public: NS_IMETHOD Init(nsPresContext* aPresContext, nsIContent* aContent, nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow); NS_IMETHOD Destroy(nsPresContext* aPresContext); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, nsIContent* aChild, - PRInt32 aNameSpaceID, nsIAtom* aAttribute, - PRInt32 aModType); + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, + nsIAtom* aAttribute, PRInt32 aModType); // nsIScrollbarMediator NS_IMETHOD PositionChanged(nsISupports* aScrollbar, PRInt32 aOldIndex, PRInt32& aNewIndex); diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.cpp b/mozilla/layout/xul/base/src/nsMenuFrame.cpp index 116999ab215..30811cf85e6 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuFrame.cpp @@ -674,8 +674,7 @@ nsMenuFrame::ActivateMenu(PRBool aActivateFlag) } NS_IMETHODIMP -nsMenuFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsMenuFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -692,7 +691,7 @@ nsMenuFrame::AttributeChanged(nsPresContext* aPresContext, } } else if (aAttribute == nsHTMLAtoms::checked) { if (mType != eMenuType_Normal) - UpdateMenuSpecialState(aPresContext); + UpdateMenuSpecialState(GetPresContext()); } else if (aAttribute == nsXULAtoms::acceltext) { // someone reset the accelText attribute, so clear the bit that says *we* set it AddStateBits(NS_STATE_ACCELTEXT_IS_DERIVED); @@ -700,7 +699,7 @@ nsMenuFrame::AttributeChanged(nsPresContext* aPresContext, } else if (aAttribute == nsXULAtoms::key) { BuildAcceleratorText(); } else if ( aAttribute == nsHTMLAtoms::type || aAttribute == nsHTMLAtoms::name ) - UpdateMenuType(aPresContext); + UpdateMenuType(GetPresContext()); return NS_OK; } diff --git a/mozilla/layout/xul/base/src/nsMenuFrame.h b/mozilla/layout/xul/base/src/nsMenuFrame.h index 2818293c9c0..ab0ad8fadc1 100644 --- a/mozilla/layout/xul/base/src/nsMenuFrame.h +++ b/mozilla/layout/xul/base/src/nsMenuFrame.h @@ -223,8 +223,7 @@ protected: // Called as a hook just after the menu goes away. PRBool OnDestroyed(); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp b/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp index 75796118368..cdec23688e0 100644 --- a/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp +++ b/mozilla/layout/xul/base/src/nsMenuPopupFrame.cpp @@ -1999,16 +1999,14 @@ nsMenuPopupFrame::IsDisabled(nsIContent* aContent) } NS_IMETHODIMP -nsMenuPopupFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsMenuPopupFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (aAttribute == nsXULAtoms::left || aAttribute == nsXULAtoms::top) MoveToAttributePosition(); diff --git a/mozilla/layout/xul/base/src/nsMenuPopupFrame.h b/mozilla/layout/xul/base/src/nsMenuPopupFrame.h index 16a1d241b4f..6488690a9e9 100644 --- a/mozilla/layout/xul/base/src/nsMenuPopupFrame.h +++ b/mozilla/layout/xul/base/src/nsMenuPopupFrame.h @@ -122,8 +122,7 @@ public: nsStyleContext* aContext, nsIFrame* aPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp index fdfef98fbc9..7c3ddbacee8 100644 --- a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp +++ b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.cpp @@ -198,15 +198,13 @@ nsNativeScrollbarFrame::Reflow(nsPresContext* aPresContext, // our native scrollbar with the correct values. // NS_IMETHODIMP -nsNativeScrollbarFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsNativeScrollbarFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if ( aAttribute == nsXULAtoms::curpos || aAttribute == nsXULAtoms::maxpos || diff --git a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.h b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.h index db00b1e0fc5..4c8e450fbb5 100644 --- a/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.h +++ b/mozilla/layout/xul/base/src/nsNativeScrollbarFrame.h @@ -75,9 +75,8 @@ public: nsIFrame* aParent, nsStyleContext* aContext, nsIFrame* aPrevInFlow); // nsIFrame overrides - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, nsIContent* aChild, - PRInt32 aNameSpaceID, nsIAtom* aAttribute, - PRInt32 aModType); + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, + nsIAtom* aAttribute, PRInt32 aModType); NS_IMETHOD QueryInterface(const nsIID& aIID, void** aInstancePtr); NS_IMETHOD_(nsrefcnt) AddRef() { return NS_OK; } diff --git a/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp b/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp index b57bfa50034..a5566c6f12b 100644 --- a/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsProgressMeterFrame.cpp @@ -98,20 +98,18 @@ nsProgressMeterFrame::SetInitialChildList(nsPresContext* aPresContext, { // Set up our initial flexes. nsresult rv = nsBoxFrame::SetInitialChildList(aPresContext, aListName, aChildList); - AttributeChanged(aPresContext, mContent, kNameSpaceID_None, nsHTMLAtoms::value, 0); + AttributeChanged(mContent, kNameSpaceID_None, nsHTMLAtoms::value, 0); return rv; } NS_IMETHODIMP -nsProgressMeterFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsProgressMeterFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (NS_OK != rv) { return rv; } @@ -139,7 +137,7 @@ nsProgressMeterFrame::AttributeChanged(nsPresContext* aPresContext, barChild->GetContent()->SetAttr(kNameSpaceID_None, nsXULAtoms::flex, leftFlex, PR_TRUE); remainderChild->GetContent()->SetAttr(kNameSpaceID_None, nsXULAtoms::flex, rightFlex, PR_TRUE); - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(GetPresContext()); MarkDirty(state); } return NS_OK; diff --git a/mozilla/layout/xul/base/src/nsProgressMeterFrame.h b/mozilla/layout/xul/base/src/nsProgressMeterFrame.h index 9f62fdbc243..0ae9b36df90 100644 --- a/mozilla/layout/xul/base/src/nsProgressMeterFrame.h +++ b/mozilla/layout/xul/base/src/nsProgressMeterFrame.h @@ -62,8 +62,7 @@ public: nsIAtom* aListName, nsIFrame* aChildList); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsResizerFrame.cpp b/mozilla/layout/xul/base/src/nsResizerFrame.cpp index 161502004cc..4e3071d0408 100644 --- a/mozilla/layout/xul/base/src/nsResizerFrame.cpp +++ b/mozilla/layout/xul/base/src/nsResizerFrame.cpp @@ -329,15 +329,13 @@ nsResizerFrame::GetInitialDirection(eDirection& aDirection) NS_IMETHODIMP -nsResizerFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsResizerFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { - nsresult rv = nsTitleBarFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsTitleBarFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (aAttribute == nsXULAtoms::dir ) { diff --git a/mozilla/layout/xul/base/src/nsResizerFrame.h b/mozilla/layout/xul/base/src/nsResizerFrame.h index 6cdc6d2f10f..eace46c3df4 100644 --- a/mozilla/layout/xul/base/src/nsResizerFrame.h +++ b/mozilla/layout/xul/base/src/nsResizerFrame.h @@ -72,8 +72,7 @@ public: nsStyleContext* aContext, nsIFrame* asPrevInFlow); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsScrollbarFrame.cpp b/mozilla/layout/xul/base/src/nsScrollbarFrame.cpp index 28443a67922..7e4ca230c4a 100644 --- a/mozilla/layout/xul/base/src/nsScrollbarFrame.cpp +++ b/mozilla/layout/xul/base/src/nsScrollbarFrame.cpp @@ -130,15 +130,13 @@ nsScrollbarFrame::IsContainingBlock() const } NS_IMETHODIMP -nsScrollbarFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsScrollbarFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // if the current position changes, notify any nsGfxScrollFrame // parent we may have diff --git a/mozilla/layout/xul/base/src/nsScrollbarFrame.h b/mozilla/layout/xul/base/src/nsScrollbarFrame.h index 440d3108e4d..9f472284f7d 100644 --- a/mozilla/layout/xul/base/src/nsScrollbarFrame.h +++ b/mozilla/layout/xul/base/src/nsScrollbarFrame.h @@ -63,8 +63,7 @@ public: #endif // nsIFrame overrides - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsSliderFrame.cpp b/mozilla/layout/xul/base/src/nsSliderFrame.cpp index e03d7895aed..0a51f162407 100644 --- a/mozilla/layout/xul/base/src/nsSliderFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSliderFrame.cpp @@ -230,18 +230,16 @@ nsSliderFrame::GetIntegerAttribute(nsIContent* content, nsIAtom* atom, PRInt32 d NS_IMETHODIMP -nsSliderFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, - PRInt32 aNameSpaceID, - nsIAtom* aAttribute, - PRInt32 aModType) +nsSliderFrame::AttributeChanged(nsIContent* aChild, + PRInt32 aNameSpaceID, + nsIAtom* aAttribute, + PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // if the current position changes if (aAttribute == nsXULAtoms::curpos) { - rv = CurrentPositionChanged(aPresContext); + rv = CurrentPositionChanged(GetPresContext()); NS_ASSERTION(NS_SUCCEEDED(rv), "failed to change position"); if (NS_FAILED(rv)) return rv; @@ -280,7 +278,7 @@ nsSliderFrame::AttributeChanged(nsPresContext* aPresContext, aAttribute == nsXULAtoms::pageincrement || aAttribute == nsXULAtoms::increment) { - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(GetPresContext()); MarkDirtyChildren(state); } diff --git a/mozilla/layout/xul/base/src/nsSliderFrame.h b/mozilla/layout/xul/base/src/nsSliderFrame.h index 19b6d968497..0d47c15846e 100644 --- a/mozilla/layout/xul/base/src/nsSliderFrame.h +++ b/mozilla/layout/xul/base/src/nsSliderFrame.h @@ -167,8 +167,7 @@ public: nsFramePaintLayer aWhichLayer, PRUint32 aFlags = 0); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp index d7eea9747d9..bbdef6d4133 100644 --- a/mozilla/layout/xul/base/src/nsSplitterFrame.cpp +++ b/mozilla/layout/xul/base/src/nsSplitterFrame.cpp @@ -283,23 +283,21 @@ nsSplitterFrame::GetCursor(const nsPoint& aPoint, } NS_IMETHODIMP -nsSplitterFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsSplitterFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); // if the alignment changed. Let the grippy know if (aAttribute == nsHTMLAtoms::align) { // tell the slider its attribute changed so it can // update itself nsIFrame* grippy = nsnull; - nsScrollbarButtonFrame::GetChildWithTag(aPresContext, nsXULAtoms::grippy, this, grippy); + nsScrollbarButtonFrame::GetChildWithTag(GetPresContext(), nsXULAtoms::grippy, this, grippy); if (grippy) - grippy->AttributeChanged(aPresContext, aChild, aNameSpaceID, aAttribute, aModType); + grippy->AttributeChanged(aChild, aNameSpaceID, aAttribute, aModType); } else if (aAttribute == nsXULAtoms::state) { mInner->UpdateState(); } diff --git a/mozilla/layout/xul/base/src/nsSplitterFrame.h b/mozilla/layout/xul/base/src/nsSplitterFrame.h index 14dac3efaca..98b0b7c76cd 100644 --- a/mozilla/layout/xul/base/src/nsSplitterFrame.h +++ b/mozilla/layout/xul/base/src/nsSplitterFrame.h @@ -63,8 +63,7 @@ public: #endif // nsIFrame overrides - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp b/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp index 0c99cd95a19..88fef28259f 100644 --- a/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp +++ b/mozilla/layout/xul/base/src/nsTextBoxFrame.cpp @@ -120,8 +120,7 @@ NS_NewTextBoxFrame ( nsIPresShell* aPresShell, nsIFrame** aNewFrame ) NS_IMETHODIMP -nsTextBoxFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsTextBoxFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) @@ -129,21 +128,22 @@ nsTextBoxFrame::AttributeChanged(nsPresContext* aPresContext, mState |= NS_STATE_NEED_LAYOUT; PRBool aResize; PRBool aRedraw; + nsPresContext* presContext = GetPresContext(); - UpdateAttributes(aPresContext, aAttribute, aResize, aRedraw); + UpdateAttributes(presContext, aAttribute, aResize, aRedraw); if (aResize) { - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(presContext); MarkDirty(state); } else if (aRedraw) { - nsBoxLayoutState state(aPresContext); + nsBoxLayoutState state(presContext); Redraw(state); } // If the accesskey changed, register for the new value // The old value has been unregistered in nsXULElement::SetAttr if (aAttribute == nsXULAtoms::accesskey || aAttribute == nsXULAtoms::control) - RegUnregAccessKey(aPresContext, PR_TRUE); + RegUnregAccessKey(presContext, PR_TRUE); return NS_OK; } diff --git a/mozilla/layout/xul/base/src/nsTextBoxFrame.h b/mozilla/layout/xul/base/src/nsTextBoxFrame.h index e843b104959..b1517356990 100644 --- a/mozilla/layout/xul/base/src/nsTextBoxFrame.h +++ b/mozilla/layout/xul/base/src/nsTextBoxFrame.h @@ -66,8 +66,7 @@ public: NS_IMETHOD Destroy(nsPresContext* aPresContext); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType); diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.cpp b/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.cpp index aacebd2e42d..e2c71a628f9 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.cpp +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.cpp @@ -181,15 +181,13 @@ nsTreeColFrame::GetFrameForPoint(nsPresContext* aPresContext, } NS_IMETHODIMP -nsTreeColFrame::AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, +nsTreeColFrame::AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType) { - nsresult rv = nsBoxFrame::AttributeChanged(aPresContext, aChild, - aNameSpaceID, aAttribute, - aModType); + nsresult rv = nsBoxFrame::AttributeChanged(aChild, aNameSpaceID, + aAttribute, aModType); if (aAttribute == nsXULAtoms::ordinal || aAttribute == nsXULAtoms::primary) { EnsureColumns(); diff --git a/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.h b/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.h index 6213c3c6809..a10c1b6586e 100644 --- a/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.h +++ b/mozilla/layout/xul/base/src/tree/src/nsTreeColFrame.h @@ -63,8 +63,7 @@ public: nsFramePaintLayer aWhichLayer, nsIFrame** aFrame); - NS_IMETHOD AttributeChanged(nsPresContext* aPresContext, - nsIContent* aChild, + NS_IMETHOD AttributeChanged(nsIContent* aChild, PRInt32 aNameSpaceID, nsIAtom* aAttribute, PRInt32 aModType);