summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fsdk_mgr.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-25 15:15:31 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-25 15:15:31 -0800
commit1b2462846b5deee5b142251cbe2bb7d7c07df41b (patch)
tree4338992c2fe5d005c0cbbd5d1a68b54eb3fe1709 /fpdfsdk/src/fsdk_mgr.cpp
parent5c4c193fd4b6dd0657abf5e74125f9887f91d720 (diff)
downloadpdfium-1b2462846b5deee5b142251cbe2bb7d7c07df41b.tar.xz
XFA: More underlying types
Precursor to https://codereview.chromium.org/1477583002/ Also: whitespace in fxjs_v8.h Merge where possible. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1472363003 .
Diffstat (limited to 'fpdfsdk/src/fsdk_mgr.cpp')
-rw-r--r--fpdfsdk/src/fsdk_mgr.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/fpdfsdk/src/fsdk_mgr.cpp b/fpdfsdk/src/fsdk_mgr.cpp
index 27cfe514c8..ed2ac1a971 100644
--- a/fpdfsdk/src/fsdk_mgr.cpp
+++ b/fpdfsdk/src/fsdk_mgr.cpp
@@ -638,7 +638,6 @@ void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice,
m_curMatrix = *pUser2Device;
CPDFDoc_Environment* pEnv = m_pSDKDoc->GetEnv();
CPDFXFA_Page* pPage = GetPDFXFAPage();
-
if (pPage == NULL)
return;
@@ -718,8 +717,9 @@ CPDFSDK_Annot* CPDFSDK_PageView::GetFXWidgetAtPoint(FX_FLOAT pageX,
CPDFSDK_AnnotHandlerMgr* pAnnotMgr = pEnv->GetAnnotHandlerMgr();
CPDFSDK_AnnotIterator annotIterator(this, false);
while (CPDFSDK_Annot* pSDKAnnot = annotIterator.Next()) {
- if (pSDKAnnot->GetType() == "Widget" ||
- pSDKAnnot->GetType() == FSDK_XFAWIDGET_TYPENAME) {
+ bool bHitTest = pSDKAnnot->GetType() == "Widget";
+ bHitTest = bHitTest || pSDKAnnot->GetType() == FSDK_XFAWIDGET_TYPENAME;
+ if (bHitTest) {
pAnnotMgr->Annot_OnGetViewBBox(this, pSDKAnnot);
CPDF_Point point(pageX, pageY);
if (pAnnotMgr->Annot_OnHitTest(this, pSDKAnnot, point))
@@ -815,7 +815,6 @@ CPDF_Page* CPDFSDK_PageView::GetPDFPage() {
if (m_page) {
return m_page->GetPDFPage();
}
-
return NULL;
}