 Chromium Code Reviews
 Chromium Code Reviews Issue 1350073002:
  PDFs viewed inside a <webview> should navigate the same as PDFs in tabs.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1350073002:
  PDFs viewed inside a <webview> should navigate the same as PDFs in tabs.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/browser/resources/pdf/pdf.js | 
| diff --git a/chrome/browser/resources/pdf/pdf.js b/chrome/browser/resources/pdf/pdf.js | 
| index c8753e14a6207dca698cd16144c70cb57dba82f9..86f00660064b37e2f559c85474f89594bb6b40d0 100644 | 
| --- a/chrome/browser/resources/pdf/pdf.js | 
| +++ b/chrome/browser/resources/pdf/pdf.js | 
| @@ -44,12 +44,12 @@ function getFilenameFromURL(url) { | 
| * @param {string} url The url to be opened in the current tab. | 
| */ | 
| function onNavigateInCurrentTab(url) { | 
| - // Prefer the tabs API because it can navigate from one file:// URL to | 
| - // another. | 
| - if (chrome.tabs) | 
| 
Sam McNally
2015/09/18 01:03:47
Could we change this to
  if (chrome.tabs && this.
 
wjmaclean
2015/09/18 16:20:45
Yes, but in this context |this| is a "Navigator" a
 | 
| - chrome.tabs.update({url: url}); | 
| - else | 
| - window.location.href = url; | 
| + // chrome.tabs.update should not be used here, since it blocks the ability | 
| + // of an app embedding a PDF viewer inside a webview to perform in-place | 
| + // navigations (e.g. to the current tab). In these cases chrome.tabs.update | 
| + // just refers the navigation to the current browser, causing the navigation | 
| + // to occur in a new tab in the browser window, which is unexpected. | 
| + window.location.href = url; | 
| } | 
| /** |