Commit e6157bb7 authored by Virender Singh's avatar Virender Singh Committed by Commit Bot

Removing PDFiumPage::GetLinks method

This CL removes PDFiumPage::GetLinks method because there are no callers
of this function.

Bug: 990050
Change-Id: I627dffcde764bec440f2733db162bd3d443072ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1731789Reviewed-by: default avatarKevin Babbitt <kbabbitt@microsoft.com>
Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Kevin Babbitt <kbabbitt@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#683342}
parent 983211bd
......@@ -423,29 +423,6 @@ int PDFiumPage::GetLink(int char_index, LinkTarget* target) {
return -1;
}
std::vector<int> PDFiumPage::GetLinks(pp::Rect text_area,
std::vector<LinkTarget>* targets) {
std::vector<int> links;
if (!available_)
return links;
CalculateLinks();
for (size_t i = 0; i < links_.size(); ++i) {
for (const auto& rect : links_[i].rects) {
if (rect.Intersects(text_area)) {
if (targets) {
LinkTarget target;
target.url = links_[i].url;
targets->push_back(target);
}
links.push_back(i);
}
}
}
return links;
}
void PDFiumPage::CalculateLinks() {
if (calculated_links_)
return;
......
......@@ -133,10 +133,6 @@ class PDFiumPage {
// Returns a link index if the given character index is over a link, or -1
// otherwise.
int GetLink(int char_index, LinkTarget* target);
// Returns the link indices if the given rect intersects a link rect, or an
// empty vector otherwise.
std::vector<int> GetLinks(pp::Rect text_area,
std::vector<LinkTarget>* targets);
// Calculate the locations of any links on the page.
void CalculateLinks();
// Returns link type and fills target associated with a link. Returns
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment