diff --git a/layout/forms/nsFormControlFrame.cpp b/layout/forms/nsFormControlFrame.cpp index 3c2aa0d5d6dd..0add45ae6497 100644 --- a/layout/forms/nsFormControlFrame.cpp +++ b/layout/forms/nsFormControlFrame.cpp @@ -607,6 +607,9 @@ NS_METHOD nsFormControlFrame::HandleEvent(nsIPresContext& aPresContext, case NS_MOUSE_EXIT: mLastMouseState = eMouseNone; break; + case NS_CONTROL_CHANGE: + ControlChanged(&aPresContext); + break; } } diff --git a/layout/forms/nsFormControlFrame.h b/layout/forms/nsFormControlFrame.h index b16067c6e10c..dd21114c59e8 100644 --- a/layout/forms/nsFormControlFrame.h +++ b/layout/forms/nsFormControlFrame.h @@ -133,6 +133,11 @@ public: */ virtual void MouseClicked(nsIPresContext* aPresContext) {} + /** + * Respond to a control change (e.g. combo box close-up) + */ + virtual void ControlChanged(nsIPresContext* aPresContext) {} + /** * Perform opertations after the widget associated with this frame has been * created. diff --git a/layout/html/forms/src/nsFormControlFrame.cpp b/layout/html/forms/src/nsFormControlFrame.cpp index 3c2aa0d5d6dd..0add45ae6497 100644 --- a/layout/html/forms/src/nsFormControlFrame.cpp +++ b/layout/html/forms/src/nsFormControlFrame.cpp @@ -607,6 +607,9 @@ NS_METHOD nsFormControlFrame::HandleEvent(nsIPresContext& aPresContext, case NS_MOUSE_EXIT: mLastMouseState = eMouseNone; break; + case NS_CONTROL_CHANGE: + ControlChanged(&aPresContext); + break; } } diff --git a/layout/html/forms/src/nsFormControlFrame.h b/layout/html/forms/src/nsFormControlFrame.h index b16067c6e10c..dd21114c59e8 100644 --- a/layout/html/forms/src/nsFormControlFrame.h +++ b/layout/html/forms/src/nsFormControlFrame.h @@ -133,6 +133,11 @@ public: */ virtual void MouseClicked(nsIPresContext* aPresContext) {} + /** + * Respond to a control change (e.g. combo box close-up) + */ + virtual void ControlChanged(nsIPresContext* aPresContext) {} + /** * Perform opertations after the widget associated with this frame has been * created.