Re-wrote nsComboboxFrame. removed the obsolete nsHTMLAtoms: comboText,comoTextSelected,comTextSelectedFocus,dropDownVisible, dropdownHidden, dropDownBtnOut, dropDownBtnPressed, Added nsHTMLAtoms::combobox, nsLayoutAtoms::popupList Renamed dropDownList to dropDownListPseudo Added "arrow.gif" as to be used the background-image for the combobox button ua.css - added rules for select to differentiate between comboboxes and listboxes. Added style rules to more closely match the XPTOOLKIT XPWidgets look. removed the following :-moz-combobox-text, -moz-combobox-textselected nsIFormControlFrame.h - Added SetSuggestedSize method. nsButtonControlFrame - Implemented SetSuggestedSize. nsCSSFrameConstructor.cpp - Rewrote ConstructSelectFrame. nsIWidget.h -Added GetAbsoluteBounds method. nsWindow.cpp - Implemented GetAbsoluteBounds.
This commit is contained in:
@@ -263,6 +263,11 @@ nsButtonControlFrame::AttributeChanged(nsIPresContext* aPresContext,
|
||||
else {
|
||||
result = nsFormControlFrame::AttributeChanged(aPresContext, aChild, aAttribute, aHint);
|
||||
}
|
||||
} else {
|
||||
if (nsHTMLAtoms::value == aAttribute) {
|
||||
// redraw button with the changed value
|
||||
Invalidate(mRect, PR_TRUE);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
@@ -382,6 +387,28 @@ nsButtonControlFrame::Reflow(nsIPresContext& aPresContext,
|
||||
nsFormFrame::AddFormControlFrame(aPresContext, *this);
|
||||
}
|
||||
|
||||
if ((NS_FORMSIZE_NOTSET != mSuggestedWidth) && (
|
||||
NS_FORMSIZE_NOTSET != mSuggestedHeight))
|
||||
{
|
||||
aDesiredSize.width = mSuggestedWidth;
|
||||
aDesiredSize.height = mSuggestedHeight;
|
||||
aDesiredSize.ascent = mSuggestedHeight;
|
||||
aDesiredSize.descent = 0;
|
||||
if (aDesiredSize.maxElementSize) {
|
||||
aDesiredSize.maxElementSize->width = mSuggestedWidth;
|
||||
aDesiredSize.maxElementSize->height = mSuggestedWidth;
|
||||
}
|
||||
|
||||
if (nsnull != aDesiredSize.maxElementSize) {
|
||||
aDesiredSize.maxElementSize->width = aDesiredSize.width;
|
||||
aDesiredSize.maxElementSize->height = aDesiredSize.height;
|
||||
}
|
||||
|
||||
aStatus = NS_FRAME_COMPLETE;
|
||||
return NS_OK;
|
||||
|
||||
}
|
||||
|
||||
nsSize ignore;
|
||||
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, ignore);
|
||||
|
||||
@@ -421,6 +448,29 @@ nsButtonControlFrame::GetDesiredSize(nsIPresContext* aPresContext,
|
||||
PRInt32 type;
|
||||
GetType(&type);
|
||||
|
||||
|
||||
#if 0
|
||||
if ((NS_FORM_INPUT_HIDDEN != type) && ((NS_FORMSIZE_NOTSET != mSuggestedWidth) && (
|
||||
NS_FORMSIZE_NOTSET != mSuggestedHeight)))
|
||||
{
|
||||
aDesiredLayoutSize.width = mSuggestedWidth;
|
||||
aDesiredLayoutSize.height = mSuggestedHeight;
|
||||
aDesiredLayoutSize.ascent = mSuggestedHeight;
|
||||
aDesiredLayoutSize.descent = 0;
|
||||
if (aDesiredLayoutSize.maxElementSize) {
|
||||
aDesiredLayoutSize.maxElementSize->width = mSuggestedWidth;
|
||||
aDesiredLayoutSize.maxElementSize->height = mSuggestedWidth;
|
||||
}
|
||||
aDesiredWidgetSize.width = aDesiredLayoutSize.width;
|
||||
aDesiredWidgetSize.height= aDesiredLayoutSize.height;
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
if (NS_FORM_INPUT_HIDDEN == type) { // there is no physical rep
|
||||
aDesiredLayoutSize.width = 0;
|
||||
aDesiredLayoutSize.height = 0;
|
||||
|
||||
Reference in New Issue
Block a user