From 0804a24fa621fcafb9c90c4e33e0dd8a6bade2f7 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Tue, 22 Nov 2005 23:39:48 +0000 Subject: [PATCH] Treat inline and block buttons more uniformly. Bug 304004, r+sr=dbaron git-svn-id: svn://10.0.0.236/trunk@185169 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsHTMLButtonControlFrame.cpp | 9 +-------- mozilla/layout/forms/nsHTMLButtonControlFrame.h | 1 - 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 2153d9ed721..75d44781085 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -80,8 +80,6 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell) nsHTMLButtonControlFrame::nsHTMLButtonControlFrame() : nsHTMLContainerFrame() { - mInline = PR_TRUE; - mCacheSize.width = -1; mCacheSize.height = -1; mCachedMaxElementWidth = -1; @@ -107,13 +105,8 @@ nsHTMLButtonControlFrame::Init(nsPresContext* aPresContext, { nsresult rv = nsHTMLContainerFrame::Init(aPresContext, aContent, aParent, aContext, aPrevInFlow); mRenderer.SetFrame(this,aPresContext); - // cache our display type - mInline = (NS_STYLE_DISPLAY_BLOCK != GetStyleDisplay()->mDisplay); - PRUint32 flags = NS_BLOCK_SPACE_MGR; - if (mInline) { - flags |= NS_BLOCK_SHRINK_WRAP; - } + PRUint32 flags = NS_BLOCK_SPACE_MGR | NS_BLOCK_SHRINK_WRAP; nsIPresShell *shell = aPresContext->PresShell(); nsIFrame* areaFrame = NS_NewAreaFrame(shell, flags); diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.h b/mozilla/layout/forms/nsHTMLButtonControlFrame.h index 762a7af84f7..e73c4d17dea 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.h +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.h @@ -171,7 +171,6 @@ protected: NS_IMETHOD_(nsrefcnt) Release(void); PRIntn GetSkipSides() const; - PRBool mInline; nsButtonFrameRenderer mRenderer; //Resize Reflow OpitmizationSize;