fixed bug 958, checkboxes wrong background when not checked, select always multiple, text & texarea not reset. html 4 button work in progress.

git-svn-id: svn://10.0.0.236/trunk@12735 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
karnaze%netscape.com
1998-10-13 21:31:26 +00:00
parent 75b9d4a08c
commit fd96ba4fea
38 changed files with 1417 additions and 80 deletions

View File

@@ -17,6 +17,7 @@
*/
#include "nsFileControlFrame.h"
#include "nsFormFrame.h"
#include "nsButtonControlFrame.h"
#include "nsTextControlFrame.h"
#include "nsIContent.h"
@@ -194,10 +195,14 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
if (0 == numChildren) {
// XXX This code should move to Init(), someday when the frame construction
// changes are all done and Init() is always getting called...
PRBool disabled = nsFormFrame::GetDisabled(this);
nsIHTMLContent* text = nsnull;
nsIAtom* tag = NS_NewAtom("text");
NS_NewHTMLInputElement(&text, tag);
text->SetAttribute("type", "text", PR_FALSE);
if (disabled) {
text->SetAttribute("disabled", "1", PR_FALSE);
}
NS_NewTextControlFrame(text, this, childFrame);
childFrame->SetStyleContext(&aPresContext, mStyleContext);
mTextFrame = (nsTextControlFrame*)childFrame;
@@ -207,6 +212,9 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext,
tag = NS_NewAtom("browse");
NS_NewHTMLInputElement(&browse, tag);
browse->SetAttribute("type", "browse", PR_FALSE);
if (disabled) {
browse->SetAttribute("disabled", "1", PR_FALSE);
}
NS_NewButtonControlFrame(browse, this, childFrame);
((nsButtonControlFrame*)childFrame)->SetFileControlFrame(this);
mBrowseFrame = (nsButtonControlFrame*)childFrame;