Index: xfa/fwl/core/cfwl_scrollbar.cpp |
diff --git a/xfa/fwl/core/cfwl_scrollbar.cpp b/xfa/fwl/core/cfwl_scrollbar.cpp |
index 8b3ce51195f36b02ad6f44b058fbdb952d46a278..f76d4027a20e1c465cb1074deff4b5d675a1c395 100644 |
--- a/xfa/fwl/core/cfwl_scrollbar.cpp |
+++ b/xfa/fwl/core/cfwl_scrollbar.cpp |
@@ -62,23 +62,23 @@ FWL_Type CFWL_ScrollBar::GetClassID() const { |
return FWL_Type::ScrollBar; |
} |
-void CFWL_ScrollBar::GetWidgetRect(CFX_RectF& rect, bool bAutoSize) { |
- if (!bAutoSize) { |
- rect = m_pProperties->m_rtWidget; |
- return; |
- } |
+CFX_RectF CFWL_ScrollBar::GetWidgetRect(bool bAutoSize) { |
+ if (!bAutoSize) |
+ return m_pProperties->m_rtWidget; |
- rect.Set(0, 0, 0, 0); |
+ CFX_RectF rect; |
FX_FLOAT* pfMinWidth = static_cast<FX_FLOAT*>( |
GetThemeCapacity(CFWL_WidgetCapacity::ScrollBarWidth)); |
if (!pfMinWidth) |
- return; |
+ return rect; |
+ |
if (IsVertical()) |
rect.Set(0, 0, (*pfMinWidth), (*pfMinWidth) * 3); |
else |
rect.Set(0, 0, (*pfMinWidth) * 3, (*pfMinWidth)); |
InflateWidgetRect(rect); |
+ return rect; |
} |
void CFWL_ScrollBar::Update() { |