diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-09-19 16:45:10 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-19 20:57:21 +0000 |
commit | 89bf9ce294d83669922443dd17391e8c38e720a8 (patch) | |
tree | be25cbf3163ba80ce36347600b5093014d293a6b /fpdfsdk | |
parent | e9d6834588b77d8cd5d14fc81309276ddcc1c3ec (diff) | |
download | pdfium-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.cpp | 7 | ||||
-rw-r--r-- | fpdfsdk/cpdfsdk_baannot.h | 2 |
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; }; |