diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-06-22 11:51:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-06-22 18:36:57 +0000 |
commit | 84d8eb9b6fdd2afd43f5970b3544d63aa990d30e (patch) | |
tree | bd3fa0035ada7a7578522ab7470ca3ff72aa10e5 /core/fpdfdoc | |
parent | 7726a581626bbb72d6ab294ae1adbad4ca10dfb0 (diff) | |
download | pdfium-84d8eb9b6fdd2afd43f5970b3544d63aa990d30e.tar.xz |
Avoid regenerating appearance stream when already present.
Since cpdfsdk_widget.cpp already generates it, we can expect that
FPDF_GenerateAP will not be called. That implementation does not
work with widgets with a shared field.
Bug: chromium:733528
Change-Id: Ia436b4e8bc87ca86b67a02cf7301ac2328339128
Reviewed-on: https://pdfium-review.googlesource.com/6752
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/cpdf_annotlist.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfdoc/cpdf_annotlist.cpp b/core/fpdfdoc/cpdf_annotlist.cpp index 1427c85616..1f94779c15 100644 --- a/core/fpdfdoc/cpdf_annotlist.cpp +++ b/core/fpdfdoc/cpdf_annotlist.cpp @@ -86,7 +86,7 @@ CPDF_AnnotList::CPDF_AnnotList(CPDF_Page* pPage) pAnnots->ConvertToIndirectObjectAt(i, m_pDocument); m_AnnotList.push_back(pdfium::MakeUnique<CPDF_Annot>(pDict, m_pDocument)); if (bRegenerateAP && subtype == "Widget" && - CPDF_InterForm::IsUpdateAPEnabled()) { + CPDF_InterForm::IsUpdateAPEnabled() && !pDict->GetDictFor("AP")) { FPDF_GenerateAP(m_pDocument, pDict); } } |