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

Side by Side Diff: pdf/pdfium/pdfium_page.cc

Issue 1711753004: Cleanup misc nits in the PDF plugin. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "pdf/pdfium/pdfium_page.h" 5 #include "pdf/pdfium/pdfium_page.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 double new_y; 310 double new_y;
311 FPDF_DeviceToPage(GetPage(), 0, 0, rect_.width(), rect_.height(), 311 FPDF_DeviceToPage(GetPage(), 0, 0, rect_.width(), rect_.height(),
312 rotation, point2.x(), point2.y(), &new_x, &new_y); 312 rotation, point2.x(), point2.y(), &new_x, &new_y);
313 313
314 int rv = FPDFText_GetCharIndexAtPos( 314 int rv = FPDFText_GetCharIndexAtPos(
315 GetTextPage(), new_x, new_y, kTolerance, kTolerance); 315 GetTextPage(), new_x, new_y, kTolerance, kTolerance);
316 *char_index = rv; 316 *char_index = rv;
317 317
318 FPDF_LINK link = FPDFLink_GetLinkAtPoint(GetPage(), new_x, new_y); 318 FPDF_LINK link = FPDFLink_GetLinkAtPoint(GetPage(), new_x, new_y);
319 int control = 319 int control =
320 FPDPage_HasFormFieldAtPoint(engine_->form(), GetPage(), new_x, new_y); 320 FPDFPage_HasFormFieldAtPoint(engine_->form(), GetPage(), new_x, new_y);
321 321
322 // If there is a control and link at the same point, figure out their z-order 322 // If there is a control and link at the same point, figure out their z-order
323 // to determine which is on top. 323 // to determine which is on top.
324 if (link && control > FPDF_FORMFIELD_UNKNOWN) { 324 if (link && control > FPDF_FORMFIELD_UNKNOWN) {
325 int control_z_order = FPDFPage_FormFieldZOrderAtPoint( 325 int control_z_order = FPDFPage_FormFieldZOrderAtPoint(
326 engine_->form(), GetPage(), new_x, new_y); 326 engine_->form(), GetPage(), new_x, new_y);
327 int link_z_order = FPDFLink_GetLinkZOrderAtPoint(GetPage(), new_x, new_y); 327 int link_z_order = FPDFLink_GetLinkZOrderAtPoint(GetPage(), new_x, new_y);
328 DCHECK_NE(control_z_order, link_z_order); 328 DCHECK_NE(control_z_order, link_z_order);
329 if (control_z_order > link_z_order) { 329 if (control_z_order > link_z_order) {
330 *form_type = control; 330 *form_type = control;
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 page_->loading_count_--; 566 page_->loading_count_--;
567 } 567 }
568 568
569 PDFiumPage::Link::Link() { 569 PDFiumPage::Link::Link() {
570 } 570 }
571 571
572 PDFiumPage::Link::~Link() { 572 PDFiumPage::Link::~Link() {
573 } 573 }
574 574
575 } // namespace chrome_pdf 575 } // namespace chrome_pdf
OLDNEW
« no previous file with comments | « pdf/pdfium/pdfium_engine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698