Loading layout/forms/nsHTMLButtonControlFrame.cpp +4 −21 Original line number Original line Diff line number Diff line Loading @@ -319,26 +319,9 @@ nsHTMLButtonControlFrame::IsReset(PRInt32 type) } } PRBool PRBool nsHTMLButtonControlFrame::IsSubmit(nsIPresContext* aPresContext, PRInt32 type) nsHTMLButtonControlFrame::IsSubmit(PRInt32 type) { { nsCompatibility mode; if (NS_FORM_BUTTON_SUBMIT == type) { nsFormControlHelper::GetFormCompatibilityMode(aPresContext, mode); if (eCompatibility_Standard == mode && mContent != nsnull) { // The default type for a html4 button is NS_FORM_BUTTON_BUTTON, // but that does not mean that the type was actually set to "button" // so we need to check here to see if a type was actually set // and oif it wasn't explicitly then we we allow to be a submit if (NS_FORM_BUTTON_BUTTON == type) { nsAutoString type; if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::type, type)) { return PR_FALSE; } else { return PR_TRUE; } } } if (NS_FORM_BUTTON_SUBMIT == type || NS_FORM_INPUT_SUBMIT == type) { return PR_TRUE; return PR_TRUE; } else { } else { return PR_FALSE; return PR_FALSE; Loading @@ -358,7 +341,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext) nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_FALSE, PR_FALSE); this, PR_FALSE, PR_FALSE); } } else if (IsSubmit(aPresContext, type) == PR_TRUE) { else if (IsSubmit(type) == PR_TRUE) { // do Submit & Frame processing of event // do Submit & Frame processing of event nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_TRUE, PR_FALSE); this, PR_TRUE, PR_FALSE); Loading layout/forms/nsHTMLButtonControlFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -149,7 +149,7 @@ public: protected: protected: virtual PRBool IsReset(PRInt32 type); virtual PRBool IsReset(PRInt32 type); virtual PRBool IsSubmit(nsIPresContext* aPresContext, PRInt32 type); virtual PRBool IsSubmit(PRInt32 type); NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aSuggestedReflowState); const nsHTMLReflowState& aSuggestedReflowState); NS_IMETHOD_(nsrefcnt) AddRef(void); NS_IMETHOD_(nsrefcnt) AddRef(void); Loading layout/html/forms/src/nsHTMLButtonControlFrame.cpp +4 −21 Original line number Original line Diff line number Diff line Loading @@ -319,26 +319,9 @@ nsHTMLButtonControlFrame::IsReset(PRInt32 type) } } PRBool PRBool nsHTMLButtonControlFrame::IsSubmit(nsIPresContext* aPresContext, PRInt32 type) nsHTMLButtonControlFrame::IsSubmit(PRInt32 type) { { nsCompatibility mode; if (NS_FORM_BUTTON_SUBMIT == type) { nsFormControlHelper::GetFormCompatibilityMode(aPresContext, mode); if (eCompatibility_Standard == mode && mContent != nsnull) { // The default type for a html4 button is NS_FORM_BUTTON_BUTTON, // but that does not mean that the type was actually set to "button" // so we need to check here to see if a type was actually set // and oif it wasn't explicitly then we we allow to be a submit if (NS_FORM_BUTTON_BUTTON == type) { nsAutoString type; if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::type, type)) { return PR_FALSE; } else { return PR_TRUE; } } } if (NS_FORM_BUTTON_SUBMIT == type || NS_FORM_INPUT_SUBMIT == type) { return PR_TRUE; return PR_TRUE; } else { } else { return PR_FALSE; return PR_FALSE; Loading @@ -358,7 +341,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext) nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_FALSE, PR_FALSE); this, PR_FALSE, PR_FALSE); } } else if (IsSubmit(aPresContext, type) == PR_TRUE) { else if (IsSubmit(type) == PR_TRUE) { // do Submit & Frame processing of event // do Submit & Frame processing of event nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_TRUE, PR_FALSE); this, PR_TRUE, PR_FALSE); Loading layout/html/forms/src/nsHTMLButtonControlFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -149,7 +149,7 @@ public: protected: protected: virtual PRBool IsReset(PRInt32 type); virtual PRBool IsReset(PRInt32 type); virtual PRBool IsSubmit(nsIPresContext* aPresContext, PRInt32 type); virtual PRBool IsSubmit(PRInt32 type); NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aSuggestedReflowState); const nsHTMLReflowState& aSuggestedReflowState); NS_IMETHOD_(nsrefcnt) AddRef(void); NS_IMETHOD_(nsrefcnt) AddRef(void); Loading Loading
layout/forms/nsHTMLButtonControlFrame.cpp +4 −21 Original line number Original line Diff line number Diff line Loading @@ -319,26 +319,9 @@ nsHTMLButtonControlFrame::IsReset(PRInt32 type) } } PRBool PRBool nsHTMLButtonControlFrame::IsSubmit(nsIPresContext* aPresContext, PRInt32 type) nsHTMLButtonControlFrame::IsSubmit(PRInt32 type) { { nsCompatibility mode; if (NS_FORM_BUTTON_SUBMIT == type) { nsFormControlHelper::GetFormCompatibilityMode(aPresContext, mode); if (eCompatibility_Standard == mode && mContent != nsnull) { // The default type for a html4 button is NS_FORM_BUTTON_BUTTON, // but that does not mean that the type was actually set to "button" // so we need to check here to see if a type was actually set // and oif it wasn't explicitly then we we allow to be a submit if (NS_FORM_BUTTON_BUTTON == type) { nsAutoString type; if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::type, type)) { return PR_FALSE; } else { return PR_TRUE; } } } if (NS_FORM_BUTTON_SUBMIT == type || NS_FORM_INPUT_SUBMIT == type) { return PR_TRUE; return PR_TRUE; } else { } else { return PR_FALSE; return PR_FALSE; Loading @@ -358,7 +341,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext) nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_FALSE, PR_FALSE); this, PR_FALSE, PR_FALSE); } } else if (IsSubmit(aPresContext, type) == PR_TRUE) { else if (IsSubmit(type) == PR_TRUE) { // do Submit & Frame processing of event // do Submit & Frame processing of event nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_TRUE, PR_FALSE); this, PR_TRUE, PR_FALSE); Loading
layout/forms/nsHTMLButtonControlFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -149,7 +149,7 @@ public: protected: protected: virtual PRBool IsReset(PRInt32 type); virtual PRBool IsReset(PRInt32 type); virtual PRBool IsSubmit(nsIPresContext* aPresContext, PRInt32 type); virtual PRBool IsSubmit(PRInt32 type); NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aSuggestedReflowState); const nsHTMLReflowState& aSuggestedReflowState); NS_IMETHOD_(nsrefcnt) AddRef(void); NS_IMETHOD_(nsrefcnt) AddRef(void); Loading
layout/html/forms/src/nsHTMLButtonControlFrame.cpp +4 −21 Original line number Original line Diff line number Diff line Loading @@ -319,26 +319,9 @@ nsHTMLButtonControlFrame::IsReset(PRInt32 type) } } PRBool PRBool nsHTMLButtonControlFrame::IsSubmit(nsIPresContext* aPresContext, PRInt32 type) nsHTMLButtonControlFrame::IsSubmit(PRInt32 type) { { nsCompatibility mode; if (NS_FORM_BUTTON_SUBMIT == type) { nsFormControlHelper::GetFormCompatibilityMode(aPresContext, mode); if (eCompatibility_Standard == mode && mContent != nsnull) { // The default type for a html4 button is NS_FORM_BUTTON_BUTTON, // but that does not mean that the type was actually set to "button" // so we need to check here to see if a type was actually set // and oif it wasn't explicitly then we we allow to be a submit if (NS_FORM_BUTTON_BUTTON == type) { nsAutoString type; if (NS_CONTENT_ATTR_HAS_VALUE == mContent->GetAttr(kNameSpaceID_HTML, nsHTMLAtoms::type, type)) { return PR_FALSE; } else { return PR_TRUE; } } } if (NS_FORM_BUTTON_SUBMIT == type || NS_FORM_INPUT_SUBMIT == type) { return PR_TRUE; return PR_TRUE; } else { } else { return PR_FALSE; return PR_FALSE; Loading @@ -358,7 +341,7 @@ nsHTMLButtonControlFrame::MouseClicked(nsIPresContext* aPresContext) nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_FALSE, PR_FALSE); this, PR_FALSE, PR_FALSE); } } else if (IsSubmit(aPresContext, type) == PR_TRUE) { else if (IsSubmit(type) == PR_TRUE) { // do Submit & Frame processing of event // do Submit & Frame processing of event nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, nsFormControlHelper::DoManualSubmitOrReset(aPresContext, nsnull, mFormFrame, this, PR_TRUE, PR_FALSE); this, PR_TRUE, PR_FALSE); Loading
layout/html/forms/src/nsHTMLButtonControlFrame.h +1 −1 Original line number Original line Diff line number Diff line Loading @@ -149,7 +149,7 @@ public: protected: protected: virtual PRBool IsReset(PRInt32 type); virtual PRBool IsReset(PRInt32 type); virtual PRBool IsSubmit(nsIPresContext* aPresContext, PRInt32 type); virtual PRBool IsSubmit(PRInt32 type); NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, NS_IMETHOD AddComputedBorderPaddingToDesiredSize(nsHTMLReflowMetrics& aDesiredSize, const nsHTMLReflowState& aSuggestedReflowState); const nsHTMLReflowState& aSuggestedReflowState); NS_IMETHOD_(nsrefcnt) AddRef(void); NS_IMETHOD_(nsrefcnt) AddRef(void); Loading