Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2663)

Unified Diff: core/src/fpdfdoc/doc_link.cpp

Issue 970523002: Merge to XFA: Do hit tests against Annots in reverse order. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfdoc/doc_link.cpp
diff --git a/core/src/fpdfdoc/doc_link.cpp b/core/src/fpdfdoc/doc_link.cpp
index c27333e08be22b5c685c32b9fcd6ba1781606d08..964b84e549e4992bf5852289a4d76cfe0d4d2def 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)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698