0

Enable noshadowing in pdf/

Rename shadowed variables in PDFiumPage::GetLinkTarget()

Bug: 993548
Change-Id: I88e660b6df99c4f3e2140014e1bb5e6626d56ddc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1893504
Commit-Queue: Daniel Hosseinian <dhoss@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#711589}
This commit is contained in:
Daniel Hosseinian
2019-11-01 01:45:04 +00:00
committed by Commit Bot
parent 7793d41b38
commit 919ab0d6e4
2 changed files with 10 additions and 6 deletions

@ -20,6 +20,8 @@ if (enable_pdf) {
pdf_engine = 0 # 0 PDFium
config("pdf_common_config") {
configs = [ "//build/config/compiler:noshadowing" ]
if (pdf_engine == 0) {
include_dirs = [ "//third_party/pdfium" ]
}
@ -155,6 +157,8 @@ if (enable_pdf) {
"test/test_utils.h",
]
configs += [ "//build/config/compiler:noshadowing" ]
deps = [
":pdf",
"//base",

@ -660,9 +660,9 @@ int PDFiumPage::GetCharCount() {
}
PDFiumPage::Area PDFiumPage::GetLinkTarget(FPDF_LINK link, LinkTarget* target) {
FPDF_DEST dest = FPDFLink_GetDest(engine_->doc(), link);
if (dest)
return GetDestinationTarget(dest, target);
FPDF_DEST dest_link = FPDFLink_GetDest(engine_->doc(), link);
if (dest_link)
return GetDestinationTarget(dest_link, target);
FPDF_ACTION action = FPDFLink_GetAction(link);
if (!action)
@ -670,9 +670,9 @@ PDFiumPage::Area PDFiumPage::GetLinkTarget(FPDF_LINK link, LinkTarget* target) {
switch (FPDFAction_GetType(action)) {
case PDFACTION_GOTO: {
FPDF_DEST dest = FPDFAction_GetDest(engine_->doc(), action);
if (dest)
return GetDestinationTarget(dest, target);
FPDF_DEST dest_action = FPDFAction_GetDest(engine_->doc(), action);
if (dest_action)
return GetDestinationTarget(dest_action, target);
// TODO(crbug.com/55776): We don't fully support all types of the
// in-document links.
return NONSELECTABLE_AREA;