diff options
author | Lei Zhang <thestig@chromium.org> | 2015-02-27 16:29:50 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-02-27 16:29:50 -0800 |
commit | 944ccad72d028ed5e37f53c5c8c0888866905bc3 (patch) | |
tree | e50698e58958ad7b9091c21cbe4eb5bc109e898c /core/src/fpdfdoc | |
parent | 5b47dbfe85e8db4122089afa6d00264f1e973af2 (diff) | |
download | pdfium-944ccad72d028ed5e37f53c5c8c0888866905bc3.tar.xz |
Do hit tests against Annots in reverse order.
BUG=chromium:445408
R=jun_fang@foxitsoftware.com
Review URL: https://codereview.chromium.org/952423002
Diffstat (limited to 'core/src/fpdfdoc')
-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)) { |