diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-21 23:07:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-21 23:07:21 +0000 |
commit | bcdbeaea96d53800ee806f463108f54f79a19347 (patch) | |
tree | e302a98da36cd67b709c6d75a4940c2975edfa0e /xfa/fwl/cfwl_edit.cpp | |
parent | 1a3e186e975aa8eb6a6e42f2626b6f8ca980db19 (diff) | |
download | pdfium-bcdbeaea96d53800ee806f463108f54f79a19347.tar.xz |
Use UnownedPtr<> to theme provider in cfwl_widgetproperties.h
Mark two other fields which must remain raw.
Change-Id: Idcd9b074aad23f35dc6607feeaa4fa6701efffaa
Reviewed-on: https://pdfium-review.googlesource.com/40916
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fwl/cfwl_edit.cpp')
-rw-r--r-- | xfa/fwl/cfwl_edit.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xfa/fwl/cfwl_edit.cpp b/xfa/fwl/cfwl_edit.cpp index fc6ce094ea..07d3b0728a 100644 --- a/xfa/fwl/cfwl_edit.cpp +++ b/xfa/fwl/cfwl_edit.cpp @@ -95,7 +95,7 @@ CFX_RectF CFWL_Edit::GetAutosizedWidgetRect() { if (m_EdtEngine.GetLength() > 0) { CFX_SizeF size = CalcTextSize( - m_EdtEngine.GetText(), m_pProperties->m_pThemeProvider, + m_EdtEngine.GetText(), m_pProperties->m_pThemeProvider.Get(), !!(m_pProperties->m_dwStyleExes & FWL_STYLEEXT_EDT_MultiLine)); rect = CFX_RectF(0, 0, size); } @@ -147,14 +147,15 @@ FWL_WidgetHit CFWL_Edit::HitTest(const CFX_PointF& point) { void CFWL_Edit::DrawWidget(CXFA_Graphics* pGraphics, const CFX_Matrix& matrix) { if (!pGraphics) return; - if (!m_pProperties->m_pThemeProvider) - return; + if (m_rtClient.IsEmpty()) return; - IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider; - DrawContent(pGraphics, pTheme, &matrix); + IFWL_ThemeProvider* pTheme = m_pProperties->m_pThemeProvider.Get(); + if (!pTheme) + return; + DrawContent(pGraphics, pTheme, &matrix); if (HasBorder()) DrawBorder(pGraphics, CFWL_Part::Border, pTheme, matrix); } |