PageInfo doesn't open on some about:blank tabs |
||||||
Issue descriptionChrome Version: 60.3112, 61.3153 OS: Mac and Windows at least What steps will reproduce the problem? (1) Visit https://bayden.com/test/data.htm# (2) Click Try It link at the bottom of the page (3) Click the Security Icon What is the expected result? PageInfo opens What happens instead? Page info icon shows activation but no page info bubble appears
,
Jul 10 2017
This is pretty funny.
// Works.
var a= window.open("about:blank");
// Fails.
var a= window.open("");
This fails inside browser_commands.cc's ShowPageInfo function:
bool ShowPageInfo(Browser* browser, content::WebContents* web_contents) {
content::NavigationEntry* entry =
web_contents->GetController().GetVisibleEntry();
if (!entry) {
return false;
}
That, in turn, fails because GetVisibleEntry() returns null because GetLastCommittedEntry() returns null in the case where the window.open went to an empty string rather than about:blank.
,
Jul 10 2017
Interesting. It's probably worth updating ShowPageInfo to handle this case, but I'll also mention that I have some long term plans to make sure there's a NavigationEntry for the initial empty page in issue 524208. (I tried a while ago, and I ran into too many odd tests and dependencies at the time. I'll probably give it a try again in the future.)
,
Jul 10 2017
I'll mark this as low-priority for now. Happy to reprioritize if there are security inplications.
,
Jul 10 2017
This is issue 547982 .
,
Jul 10 2017
Re #5: It's certainly related, in that it's another example of a downstream consequence of Issue 524208. To me, the surprising part of this is that window.open("") and window.open("about:blank") aren't being handled in exactly the same way.
,
Nov 10 2017
,
Feb 18 2018
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by elawrence@chromium.org
, Jul 10 2017