From 22813275bf994982332c9d9e5c09bc2f80e54f97 Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Fri, 27 Aug 1999 14:34:54 +0000 Subject: [PATCH] Added the other GetDesiredSize call overriding the base class call, and making it the existing GetDesiredSize with the last param dummyed out. This makes all the sizing work correctly with the change I put in in nsFormControlFrame --- layout/forms/nsTextControlFrame.cpp | 8 ++++++++ layout/forms/nsTextControlFrame.h | 4 ++++ layout/html/forms/src/nsTextControlFrame.cpp | 8 ++++++++ layout/html/forms/src/nsTextControlFrame.h | 4 ++++ 4 files changed, 24 insertions(+) diff --git a/layout/forms/nsTextControlFrame.cpp b/layout/forms/nsTextControlFrame.cpp index c193d07b50ed..38cceafe85d4 100644 --- a/layout/forms/nsTextControlFrame.cpp +++ b/layout/forms/nsTextControlFrame.cpp @@ -195,6 +195,14 @@ nsTextControlFrame::GetCID() } } +void +nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, + const nsHTMLReflowState& aReflowState, + nsHTMLReflowMetrics& aDesiredLayoutSize) +{ + nsSize widgetSize; + GetDesiredSize(aPresContext, aReflowState, aDesiredLayoutSize, widgetSize); +} #define DEFAULT_PIXEL_WIDTH 20 void diff --git a/layout/forms/nsTextControlFrame.h b/layout/forms/nsTextControlFrame.h index 89a01f3b96ea..581e249d7a9a 100644 --- a/layout/forms/nsTextControlFrame.h +++ b/layout/forms/nsTextControlFrame.h @@ -56,6 +56,10 @@ public: protected: + virtual void GetDesiredSize(nsIPresContext* aPresContext, + const nsHTMLReflowState& aReflowState, + nsHTMLReflowMetrics& aDesiredLayoutSize); + virtual void GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics& aDesiredLayoutSize, diff --git a/layout/html/forms/src/nsTextControlFrame.cpp b/layout/html/forms/src/nsTextControlFrame.cpp index c193d07b50ed..38cceafe85d4 100644 --- a/layout/html/forms/src/nsTextControlFrame.cpp +++ b/layout/html/forms/src/nsTextControlFrame.cpp @@ -195,6 +195,14 @@ nsTextControlFrame::GetCID() } } +void +nsTextControlFrame::GetDesiredSize(nsIPresContext* aPresContext, + const nsHTMLReflowState& aReflowState, + nsHTMLReflowMetrics& aDesiredLayoutSize) +{ + nsSize widgetSize; + GetDesiredSize(aPresContext, aReflowState, aDesiredLayoutSize, widgetSize); +} #define DEFAULT_PIXEL_WIDTH 20 void diff --git a/layout/html/forms/src/nsTextControlFrame.h b/layout/html/forms/src/nsTextControlFrame.h index 89a01f3b96ea..581e249d7a9a 100644 --- a/layout/html/forms/src/nsTextControlFrame.h +++ b/layout/html/forms/src/nsTextControlFrame.h @@ -56,6 +56,10 @@ public: protected: + virtual void GetDesiredSize(nsIPresContext* aPresContext, + const nsHTMLReflowState& aReflowState, + nsHTMLReflowMetrics& aDesiredLayoutSize); + virtual void GetDesiredSize(nsIPresContext* aPresContext, const nsHTMLReflowState& aReflowState, nsHTMLReflowMetrics& aDesiredLayoutSize,