summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorJun Fang <jun_fang@foxitsoftware.com>2015-12-02 14:09:28 +0800
committerJun Fang <jun_fang@foxitsoftware.com>2015-12-02 14:09:28 +0800
commit2592eaaa19304827ba9dbedbe2075b8c81c9e2cf (patch)
tree416d2d128f3dc0c42da49111d71a0e634903657f /fpdfsdk/src/fsdk_mgr.cpp
parenta0217b66d6fb4980bff16167093bc2a79f71bcec (diff)
downloadpdfium-2592eaaa19304827ba9dbedbe2075b8c81c9e2cf.tar.xz
Fix overlapped focus widget
BUG=pdfium:294 R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1487573002 .
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp15
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