summaryrefslogtreecommitdiff
path: root/testing/embedder_test.cpp
diff options
context:
space:
mode:
authorJane Liu <janeliulwq@google.com>2017-06-21 12:18:37 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-06-22 13:56:38 +0000
commite17011dc1f5d046dc60c3347b89c0aad7d674dff (patch)
tree8624d9b8d6c156b64f0da291890478d1f9e0cb5a /testing/embedder_test.cpp
parent4b95360b7611aa73f928de2dc47390f78573c6cc (diff)
downloadpdfium-e17011dc1f5d046dc60c3347b89c0aad7d674dff.tar.xz
Minor change to AP generation logic
Current behavior: Our CPVT_GenerateAP::Generate*AP() functions do not get called as long as the annotation dictionary has an "AP" entry. Problem: We always need the "N" entry in AP dictionary to display an annotation. Even though the spec requires "AP" dictionary to have an "N" entry for normal mode appearance, in case of a malformed pdf with "AP" but without "N" in "AP", we won't be able to display the annotation at all. Fix: Always check if "AP" has "N" entry to decide whether AP needs to be generated. If not, then we still need to generate AP, and add to the AP dictionary under the key "N". Bug=pdfium:778 Change-Id: Icf0c6a681b3c8c22b0b67bf8d16ce6fefdc2c45b Reviewed-on: https://pdfium-review.googlesource.com/6692 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Jane Liu <janeliulwq@google.com>
Diffstat (limited to 'testing/embedder_test.cpp')
-rw-r--r--testing/embedder_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/testing/embedder_test.cpp b/testing/embedder_test.cpp
index f818091cb7..7e34260e60 100644
--- a/testing/embedder_test.cpp
+++ b/testing/embedder_test.cpp
@@ -266,7 +266,7 @@ FPDF_BITMAP EmbedderTest::RenderPageWithFlags(FPDF_PAGE page, int flags) {
FPDF_DWORD fill_color = alpha ? 0x00000000 : 0xFFFFFFFF;
FPDFBitmap_FillRect(bitmap, 0, 0, width, height, fill_color);
FPDF_RenderPageBitmap(bitmap, page, 0, 0, width, height, 0, flags);
- FPDF_FFLDraw(form_handle_, bitmap, page, 0, 0, width, height, 0, 0);
+ FPDF_FFLDraw(form_handle_, bitmap, page, 0, 0, width, height, 0, flags);
return bitmap;
}