summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-02-16 19:31:39 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-02-16 19:31:39 +0000
commit1087ebcd9a2b59c540b80f8a1f3275ae1ff6bcc9 (patch)
tree053701c6995e05691215637d2630bbb2d487a565 /fpdfsdk
parent728127c396dbb0d3c9cd9bc1a745f550d46e095a (diff)
downloadpdfium-1087ebcd9a2b59c540b80f8a1f3275ae1ff6bcc9.tar.xz
Fix mouse pointer in XFA forms.
This CL changes the XFA code in FPDFPage_HasFormFieldAtPoint() to return the actual form field the mouse is over, and not always FormFieldType::kXFA. Bug: chromium:811331 Change-Id: I4157f58d057972dc2f4e79036493e079c611c9ec Reviewed-on: https://pdfium-review.googlesource.com/26970 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdfformfill.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp
index eba1ac5656..2f219f2f9d 100644
--- a/fpdfsdk/fpdfformfill.cpp
+++ b/fpdfsdk/fpdfformfill.cpp
@@ -253,7 +253,10 @@ FPDFPage_HasFormFieldAtPoint(FPDF_FORMHANDLE hHandle,
CXFA_FFWidget* pXFAAnnot;
while ((pXFAAnnot = pWidgetIterator->MoveToNext()) != nullptr) {
- CFX_RectF rcBBox = pXFAAnnot->GetBBox(0);
+ if (pXFAAnnot->GetFormFieldType() == FormFieldType::kXFA)
+ continue;
+
+ CFX_RectF rcBBox = pXFAAnnot->GetWidgetRect();
CFX_FloatRect rcWidget(rcBBox.left, rcBBox.top, rcBBox.left + rcBBox.width,
rcBBox.top + rcBBox.height);
rcWidget.Inflate(1.0f, 1.0f);