diff options
author | Jun Fang <jun_fang@foxitsoftware.com> | 2015-12-02 14:09:28 +0800 |
---|---|---|
committer | Jun Fang <jun_fang@foxitsoftware.com> | 2015-12-02 14:09:28 +0800 |
commit | 2592eaaa19304827ba9dbedbe2075b8c81c9e2cf (patch) | |
tree | 416d2d128f3dc0c42da49111d71a0e634903657f | |
parent | a0217b66d6fb4980bff16167093bc2a79f71bcec (diff) | |
download | pdfium-2592eaaa19304827ba9dbedbe2075b8c81c9e2cf.tar.xz |
Fix overlapped focus widget
BUG=pdfium:294
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1487573002 .
-rw-r--r-- | fpdfsdk/src/fsdk_mgr.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp index 401da497f1..4d2dbc166c 100644 --- a/fpdfsdk/src/fsdk_mgr.cpp +++ b/fpdfsdk/src/fsdk_mgr.cpp @@ -669,7 +669,7 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, #ifdef PDF_ENABLE_XFA CPDFXFA_Page* pPage = GetPDFXFAPage(); - if (pPage == NULL) + if (!pPage) return; if (pPage->GetDocument()->GetDocType() == DOCTYPE_DYNAMIC_XFA) { @@ -686,11 +686,20 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, return; CXFA_RenderOptions renderOptions; renderOptions.m_bHighlight = TRUE; - pRenderContext->StartRender(pPage->GetXFAPageView(), &gs, *pUser2Device, - renderOptions); + IXFA_PageView* xfaView = pPage->GetXFAPageView(); + pRenderContext->StartRender(xfaView, &gs, *pUser2Device, renderOptions); pRenderContext->DoRender(); pRenderContext->StopRender(); pRenderContext->Release(); + IXFA_DocView* docView = xfaView->GetDocView(); + if (!docView) + return; + CPDFSDK_Annot* annot = GetFocusAnnot(); + if (!annot) + return; + // Render the focus widget + docView->GetWidgetHandler()->RenderWidget(annot->GetXFAWidget(), &gs, + pUser2Device, FALSE); return; } #endif // PDF_ENABLE_XFA |