diff options
author | Lei Zhang <thestig@chromium.org> | 2015-02-27 19:58:08 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-02-27 19:58:08 -0800 |
commit | fb3eea5323bf59884659510a6743037cc1d546cd (patch) | |
tree | db36ab04eb62594e03e41d12c22af2c5c01a7c41 /core/src | |
parent | 346a1a9fe42a04dd04fb2bd2dbd2b43377cca9a3 (diff) | |
download | pdfium-fb3eea5323bf59884659510a6743037cc1d546cd.tar.xz |
Merge to XFA: Do hit tests against Annots in reverse order.
Original Review URL: https://codereview.chromium.org/952423002
(cherry picked from commit 944ccad72d028ed5e37f53c5c8c0888866905bc3)
Review URL: https://codereview.chromium.org/970523002
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/fpdfdoc/doc_link.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp index c27333e08b..964b84e549 100644 --- a/core/src/fpdfdoc/doc_link.cpp +++ b/core/src/fpdfdoc/doc_link.cpp @@ -56,7 +56,7 @@ CPDF_Link CPDF_LinkList::GetLinkAtPoint(CPDF_Page* pPage, FX_FLOAT pdf_x, FX_FLO return NULL; } int size = pPageLinkList->GetSize(); - for (int i = 0; i < size; i ++) { + for (int i = size - 1; i >= 0; --i) { CPDF_Link Link = (CPDF_Dictionary*)pPageLinkList->GetAt(i); CPDF_Rect rect = Link.GetRect(); if (rect.Contains(pdf_x, pdf_y)) { |