nsPresContext.cpp,.h - Added eWidgetRendering_PartialGfx as a rendering mode to PresContext.

ua.css - Added select[multiple] rule for multi-select listboxes without a size
Fixed form submission for gfx checkboxes,radiobuttons, and select by rewriting GetNamesValues.
Added nsListControlFrame::GetSizeAttribute and nsListControlFrame::GetNumberOfRows
Added logic to nsCSSFrameConstructor::ConstructSelectFrame and nsListControlFrame::Reflow
to handle the case of a multiselect select without a size specified.


git-svn-id: svn://10.0.0.236/trunk@40339 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
kmcclusk%netscape.com
1999-07-20 22:32:41 +00:00
parent 451fb50629
commit d08711ed3a
27 changed files with 395 additions and 222 deletions

View File

@@ -176,10 +176,15 @@ nsComboboxControlFrame::InitTextStr(PRBool aUpdate)
// No selection so use the first item in the list box
if ((NS_OK == result) && (nsnull != fcFrame)) {
// Set listbox selection to first item in the list box
fcFrame->SetProperty(nsHTMLAtoms::selectedindex, "0");
// Get the listbox selection as a string
mListControlFrame->GetSelectedItem(mTextStr);
// Find out if there are any options in the list to select
PRInt32 length = 0;
mListControlFrame->GetNumberOfOptions(&length);
if (length > 0) {
// Set listbox selection to first item in the list box
fcFrame->SetProperty(nsHTMLAtoms::selectedindex, "0");
// Get the listbox selection as a string
mListControlFrame->GetSelectedItem(mTextStr);
}
}
}
@@ -722,6 +727,7 @@ nsComboboxControlFrame::GetMaxNumValues()
return 1;
}
/*XXX-REMOVE
PRBool
nsComboboxControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
nsString* aValues, nsString* aNames)
@@ -739,6 +745,21 @@ nsComboboxControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValue
nsresult status = PR_TRUE;
return status;
}
*/
PRBool
nsComboboxControlFrame::GetNamesValues(PRInt32 aMaxNumValues, PRInt32& aNumValues,
nsString* aValues, nsString* aNames)
{
nsIFormControlFrame* fcFrame = nsnull;
nsIFrame* dropdownFrame = GetDropdownFrame();
nsresult result = dropdownFrame->QueryInterface(kIFormControlFrameIID, (void**)&fcFrame);
if ((NS_SUCCEEDED(result)) && (nsnull != fcFrame)) {
return fcFrame->GetNamesValues(aMaxNumValues, aNumValues, aValues, aNames);
}
return PR_FALSE;
}
//--------------------------------------------------------------
NS_IMETHODIMP