diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-16 21:22:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-16 21:22:42 +0000 |
commit | aa5769a417251214d1a8b3ebb5153a9251f50448 (patch) | |
tree | 683409eb8a036de68e0934ef540ee7baf2e41620 /fpdfsdk | |
parent | df4e68c5eb293c9929c7d66e59d08afc21b04c86 (diff) | |
download | pdfium-aa5769a417251214d1a8b3ebb5153a9251f50448.tar.xz |
Replace optional bool bDrawFocus with enum type.
Change-Id: Ide4a972337afaf346e46edc4ede48140cd4544c1
Reviewed-on: https://pdfium-review.googlesource.com/40390
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r-- | fpdfsdk/cpdfsdk_xfawidgethandler.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp index a395eef038..82eda21469 100644 --- a/fpdfsdk/cpdfsdk_xfawidgethandler.cpp +++ b/fpdfsdk/cpdfsdk_xfawidgethandler.cpp @@ -79,17 +79,17 @@ void CPDFSDK_XFAWidgetHandler::ReleaseAnnot(CPDFSDK_Annot* pAnnot) { CFX_FloatRect CPDFSDK_XFAWidgetHandler::GetViewBBox(CPDFSDK_PageView* pPageView, CPDFSDK_Annot* pAnnot) { - ASSERT(pAnnot); - CXFA_Node* node = pAnnot->GetXFAWidget()->GetNode(); ASSERT(node->IsWidgetReady()); CFX_RectF rcBBox; - if (node->GetFFWidgetType() == XFA_FFWidgetType::kSignature) - rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_Visible, true); - else - rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_None); - + if (node->GetFFWidgetType() == XFA_FFWidgetType::kSignature) { + rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_Visible, + CXFA_FFWidget::kDrawFocus); + } else { + rcBBox = pAnnot->GetXFAWidget()->GetBBox(XFA_WidgetStatus_None, + CXFA_FFWidget::kDoNotDrawFocus); + } CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width, rcBBox.top + rcBBox.height); rcWidget.left -= 1.0f; |