summaryrefslogtreecommitdiff
path: root/fpdfsdk
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2017-09-19 16:45:10 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-19 20:57:21 +0000
commit89bf9ce294d83669922443dd17391e8c38e720a8 (patch)
treebe25cbf3163ba80ce36347600b5093014d293a6b /fpdfsdk
parente9d6834588b77d8cd5d14fc81309276ddcc1c3ec (diff)
downloadpdfium-89bf9ce294d83669922443dd17391e8c38e720a8.tar.xz
Fix draw order of popup annotations.
Bug: chromium:765375 Change-Id: Ifdbd33ca92ec7105778788f891095eaf280c18cf Reviewed-on: https://pdfium-review.googlesource.com/14370 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fpdfsdk')
-rw-r--r--fpdfsdk/cpdfsdk_baannot.cpp7
-rw-r--r--fpdfsdk/cpdfsdk_baannot.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/fpdfsdk/cpdfsdk_baannot.cpp b/fpdfsdk/cpdfsdk_baannot.cpp
index 711d228ec3..c551fee799 100644
--- a/fpdfsdk/cpdfsdk_baannot.cpp
+++ b/fpdfsdk/cpdfsdk_baannot.cpp
@@ -353,3 +353,10 @@ void CPDFSDK_BAAnnot::SetOpenState(bool bOpenState) {
if (CPDF_Annot* pAnnot = m_pAnnot->GetPopupAnnot())
pAnnot->SetOpenState(bOpenState);
}
+
+int CPDFSDK_BAAnnot::GetLayoutOrder() const {
+ if (m_pAnnot->GetSubtype() == CPDF_Annot::Subtype::POPUP)
+ return 1;
+
+ return CPDFSDK_Annot::GetLayoutOrder();
+}
diff --git a/fpdfsdk/cpdfsdk_baannot.h b/fpdfsdk/cpdfsdk_baannot.h
index 1d71585a35..c7300c46e5 100644
--- a/fpdfsdk/cpdfsdk_baannot.h
+++ b/fpdfsdk/cpdfsdk_baannot.h
@@ -92,6 +92,8 @@ class CPDFSDK_BAAnnot : public CPDFSDK_Annot {
void SetOpenState(bool bState);
+ int GetLayoutOrder() const override;
+
protected:
CFX_UnownedPtr<CPDF_Annot> const m_pAnnot;
};