diff --git a/layout/forms/nsComboboxControlFrame.cpp b/layout/forms/nsComboboxControlFrame.cpp index 0f57b329c71d..5f107987ee5a 100644 --- a/layout/forms/nsComboboxControlFrame.cpp +++ b/layout/forms/nsComboboxControlFrame.cpp @@ -530,7 +530,9 @@ nsComboboxControlFrame::PositionDropdown(nsIPresContext& aPresContext, dropdownFrame->GetRect(currentRect); //if (currentRect != dropdownRect) { dropdownFrame->SetRect(dropdownRect); +#ifdef DEBUG_rods printf("%d Position Dropdown at: %d %d %d %d\n", counter++, dropdownRect.x, dropdownRect.y, dropdownRect.width, dropdownRect.height); +#endif //} return rv; @@ -637,6 +639,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { +#ifdef DEBUG_rods printf("nsComboboxControlFrame::Reflow %d Reason: ", myCounter++); switch (aReflowState.reason) { case eReflowReason_Initial:printf("eReflowReason_Initial\n");break; @@ -644,6 +647,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext& aPresContext, case eReflowReason_Resize:printf("eReflowReason_Resize\n");break; case eReflowReason_StyleChange:printf("eReflowReason_StyleChange\n");break; } +#endif nsresult rv = NS_OK; nsIFrame* buttonFrame = GetButtonFrame(aPresContext); diff --git a/layout/forms/nsListControlFrame.cpp b/layout/forms/nsListControlFrame.cpp index 9ac63f16706a..a0e909533d2a 100644 --- a/layout/forms/nsListControlFrame.cpp +++ b/layout/forms/nsListControlFrame.cpp @@ -163,6 +163,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { +#ifdef DEBUG_rods printf("nsListControlFrame::Reflow Reason: "); switch (aReflowState.reason) { case eReflowReason_Initial:printf("eReflowReason_Initial\n");break; @@ -170,6 +171,8 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext, case eReflowReason_Resize:printf("eReflowReason_Resize\n");break; case eReflowReason_StyleChange:printf("eReflowReason_StyleChange\n");break; } +#endif // DEBUG_rods + // Strategy: Let the inherited reflow happen as though the width and height of the // ScrollFrame are big enough to allow the listbox to // shrink to fit the longest option element line in the list. @@ -1934,13 +1937,15 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent, nsIContent * content; stateManager->GetEventTargetContent(&content); /////////////////// - { - nsCOMPtr optElem; - if (NS_SUCCEEDED(content->QueryInterface(nsCOMTypeInfo::GetIID(),(void**) getter_AddRefs(optElem)))) { - nsAutoString val; - optElem->GetValue(val); - printf("val [%s]\n", val.ToNewCString()); - } + { + nsCOMPtr optElem; + if (NS_SUCCEEDED(content->QueryInterface(nsCOMTypeInfo::GetIID(),(void**) getter_AddRefs(optElem)))) { + nsAutoString val; + optElem->GetValue(val); +#ifdef DEBUG_rods + printf("val [%s]\n", val.ToNewCString()); +#endif + } } /////////////////// nsIContent * optionContent = GetOptionFromContent(content); diff --git a/layout/html/forms/src/nsComboboxControlFrame.cpp b/layout/html/forms/src/nsComboboxControlFrame.cpp index 0f57b329c71d..5f107987ee5a 100644 --- a/layout/html/forms/src/nsComboboxControlFrame.cpp +++ b/layout/html/forms/src/nsComboboxControlFrame.cpp @@ -530,7 +530,9 @@ nsComboboxControlFrame::PositionDropdown(nsIPresContext& aPresContext, dropdownFrame->GetRect(currentRect); //if (currentRect != dropdownRect) { dropdownFrame->SetRect(dropdownRect); +#ifdef DEBUG_rods printf("%d Position Dropdown at: %d %d %d %d\n", counter++, dropdownRect.x, dropdownRect.y, dropdownRect.width, dropdownRect.height); +#endif //} return rv; @@ -637,6 +639,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { +#ifdef DEBUG_rods printf("nsComboboxControlFrame::Reflow %d Reason: ", myCounter++); switch (aReflowState.reason) { case eReflowReason_Initial:printf("eReflowReason_Initial\n");break; @@ -644,6 +647,7 @@ nsComboboxControlFrame::Reflow(nsIPresContext& aPresContext, case eReflowReason_Resize:printf("eReflowReason_Resize\n");break; case eReflowReason_StyleChange:printf("eReflowReason_StyleChange\n");break; } +#endif nsresult rv = NS_OK; nsIFrame* buttonFrame = GetButtonFrame(aPresContext); diff --git a/layout/html/forms/src/nsListControlFrame.cpp b/layout/html/forms/src/nsListControlFrame.cpp index 9ac63f16706a..a0e909533d2a 100644 --- a/layout/html/forms/src/nsListControlFrame.cpp +++ b/layout/html/forms/src/nsListControlFrame.cpp @@ -163,6 +163,7 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext, const nsHTMLReflowState& aReflowState, nsReflowStatus& aStatus) { +#ifdef DEBUG_rods printf("nsListControlFrame::Reflow Reason: "); switch (aReflowState.reason) { case eReflowReason_Initial:printf("eReflowReason_Initial\n");break; @@ -170,6 +171,8 @@ nsListControlFrame::Reflow(nsIPresContext& aPresContext, case eReflowReason_Resize:printf("eReflowReason_Resize\n");break; case eReflowReason_StyleChange:printf("eReflowReason_StyleChange\n");break; } +#endif // DEBUG_rods + // Strategy: Let the inherited reflow happen as though the width and height of the // ScrollFrame are big enough to allow the listbox to // shrink to fit the longest option element line in the list. @@ -1934,13 +1937,15 @@ nsListControlFrame::GetIndexFromDOMEvent(nsIDOMEvent* aMouseEvent, nsIContent * content; stateManager->GetEventTargetContent(&content); /////////////////// - { - nsCOMPtr optElem; - if (NS_SUCCEEDED(content->QueryInterface(nsCOMTypeInfo::GetIID(),(void**) getter_AddRefs(optElem)))) { - nsAutoString val; - optElem->GetValue(val); - printf("val [%s]\n", val.ToNewCString()); - } + { + nsCOMPtr optElem; + if (NS_SUCCEEDED(content->QueryInterface(nsCOMTypeInfo::GetIID(),(void**) getter_AddRefs(optElem)))) { + nsAutoString val; + optElem->GetValue(val); +#ifdef DEBUG_rods + printf("val [%s]\n", val.ToNewCString()); +#endif + } } /////////////////// nsIContent * optionContent = GetOptionFromContent(content);