From a47fe715d13531b3c41276ff00b728d265f47740 Mon Sep 17 00:00:00 2001 From: Heilig Benedek Date: Thu, 8 Jun 2017 02:12:52 +0200 Subject: [PATCH] pass ref part of url to allow #page= for pdf viewer --- atom/browser/atom_web_ui_controller_factory.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/atom/browser/atom_web_ui_controller_factory.cc b/atom/browser/atom_web_ui_controller_factory.cc index a73eed19a115..ef8b2785ae55 100644 --- a/atom/browser/atom_web_ui_controller_factory.cc +++ b/atom/browser/atom_web_ui_controller_factory.cc @@ -57,6 +57,9 @@ AtomWebUIControllerFactory::CreateWebUIControllerForURL(content::WebUI* web_ui, src = param.second; } } + if (url.has_ref()) { + src = src + '#' + url.ref(); + } auto browser_context = web_ui->GetWebContents()->GetBrowserContext(); return new PdfViewerUI(browser_context, web_ui, src); }