From dc414889ec855a0a167466839c86c70250f823ba Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Thu, 11 May 2000 14:06:32 +0000 Subject: [PATCH] added comments to ifdef for better explanation git-svn-id: svn://10.0.0.236/trunk@69211 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsComboboxControlFrame.cpp | 6 +++++- mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/forms/nsComboboxControlFrame.cpp b/mozilla/layout/forms/nsComboboxControlFrame.cpp index 4706a7d8104..de19bc1bb1f 100644 --- a/mozilla/layout/forms/nsComboboxControlFrame.cpp +++ b/mozilla/layout/forms/nsComboboxControlFrame.cpp @@ -1694,6 +1694,10 @@ nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext, return NS_ERROR_FAILURE; } + // The button is getting the hover events so... + // This ifdef makes it so none of the children frame of the combobox get + // the events. (like the button frame), that way all event based style rules + // affect the combobox and not the any of the child frames. #if 0 if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) { nsresult rv = GetFrameForPointUsing(aPresContext, aPoint, nsnull, NS_FRAME_PAINT_LAYER_FOREGROUND, PR_FALSE, aFrame); @@ -1701,7 +1705,7 @@ nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext, return GetFrameForPointUsing(aPresContext, aPoint, nsnull, NS_FRAME_PAINT_LAYER_BACKGROUND, PR_TRUE, aFrame); } return NS_ERROR_FAILURE; -#else +#else *aFrame = this; return NS_OK; #endif diff --git a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp index 4706a7d8104..de19bc1bb1f 100644 --- a/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -1694,6 +1694,10 @@ nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext, return NS_ERROR_FAILURE; } + // The button is getting the hover events so... + // This ifdef makes it so none of the children frame of the combobox get + // the events. (like the button frame), that way all event based style rules + // affect the combobox and not the any of the child frames. #if 0 if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) { nsresult rv = GetFrameForPointUsing(aPresContext, aPoint, nsnull, NS_FRAME_PAINT_LAYER_FOREGROUND, PR_FALSE, aFrame); @@ -1701,7 +1705,7 @@ nsComboboxControlFrame::GetFrameForPoint(nsIPresContext* aPresContext, return GetFrameForPointUsing(aPresContext, aPoint, nsnull, NS_FRAME_PAINT_LAYER_BACKGROUND, PR_TRUE, aFrame); } return NS_ERROR_FAILURE; -#else +#else *aFrame = this; return NS_OK; #endif