New issue
Advanced search Search tips

Issue 877504 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner: ----
Closed: Nov 16
Cc:
Components:
EstimatedDays: ----
NextAction: 2018-11-27
OS: Windows
Pri: 2
Type: Bug-Regression



Sign in to add a comment

iFrame content not loaded from Chrome extension

Reported by aleksej....@gmail.com, Aug 24

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36 OPR/55.0.2994.44

Steps to reproduce the problem:
1. Create iFrame with some url (not same as site domain)
2. Append it to document.body

What is the expected behavior?
It is expected to open content of iframe and display it to end user.

What went wrong?
It shows sometimes fully white content of window (nothing in it), or sometimes on hover it displays background or something similar.

P.S. It works okay on Chrome Dev v70.0.3528.4

Did this work before? Yes 68.0.3440.106

Chrome version: 69.0.3497.57  Channel: stable
OS Version: 10.0
Flash Version:
 
I've forgot to say, creating and appending is done from content script.

Code snippet:

        const innerFrame = document.createElement('iframe');

        innerFrame.setAttribute('id', frameId);
        innerFrame.setAttribute('src', url);
        innerFrame.setAttribute('frameborder', '0');
        innerFrame.setAttribute('scrolling', 'no');
        innerFrame.setAttribute('marginwidth', '0');
        innerFrame.setAttribute('marginheight', '0');
        innerFrame.setAttribute('allowtransparency', 'true');
        innerFrame.setAttribute('width', `${width}px`);
        innerFrame.setAttribute('height', `${height}px`);

        document.body.insertAdjacentElement('afterbegin', innerFrame);
Labels: Needs-Bisect Needs-Triage-M69
Components: -Blink Platform>Extensions Blink>HTML>IFrame
Cc: swarnasree.mukkala@chromium.org
Labels: Triaged-ET Needs-Feedback
Tried testing the issue on reported chrome version #69.0.3497.57,using Windows 10 by following below steps.

Steps:
=====
1.Launched chrome.
2.As per comment #1, copied code snippet in a notepad as code.html.
3.Opened the file in chrome observed that the code snippet on the screen.

Attached screenshot for reference.
@reporter : Could you please provide a sample file/URL that reproduces the issue, so that it would be really helpful for further triaging.

Thanks.!
877504.png
335 KB View Download
Is it injected via content script  and my file is hosted on domain.
Project Member

Comment 6 by sheriffbot@chromium.org, Aug 27

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: Needs-Feedback
Tried testing the issue on chrome version #68.0.3440.106 and reported version #69.0.3497.57 on windows 10 by following below steps.

Steps:
=====
1.Launched chrome.
2.Created html file with name 'a.html'.
3.As per comment #1, copied code snippet in notepad within script tag and given link of a.html page as a value of url.
3.Saved the notepad file as 'code_iframe.html'.
4.Opened the code_iframe.html with chrome observed that the iframe contents got displayed in both chrome versions #68.0.3440.106 and #69.0.3497.57.

Attached screencast  for reference.
NOTE: The files of code_iframe.html and a.html are also attached.

@Reporter: Could you please review the attached screen-cast and html pages,let us know if anything being missed from our end.

Thanks.!
code_iframe.html
725 bytes View Download
a.html
77 bytes View Download
877504.mp4
2.9 MB View Download
You are doing it wrong.

What I am trying to do is to inject iFrame (with source hosted on some other domain) to body of page USING content script in Chrome Extension.
If I do anything to DOM after injection, like removing some element or something similar, the iframe content suddenly shows up.
Project Member

Comment 9 by sheriffbot@chromium.org, Aug 28

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Needs-Bisect TE-NeedsTriageHelp
As per comment #4 and comment #7 the issue is not getting reproduced at TE end, hence removing Needs-Bisect label.
Note : As per comment#7 tried writing the code, it was wrong as mentioned in comment#8 by reporter.Unable to write the proper code. Hence adding TE-NeedsTriageHelp label for further triaging of the issue.

Requesting anyone from Blink>HTML>IFrame>Platform>Extensions team to look into the issue.
Thanks.!
Cc: pbomm...@chromium.org
aleksej.todorovic@ if possible can you please provide a sample extension which demonstrates the issue.
I've figured out what the problem is...

Since wrapping element is set to display: none, rendering of child (in this case iFrame) did not go so well (not showing iFrame content, after display is set to block). When I set visibility: hidden instead display: none everything works fine.

I think this is some bug with rendering, since it is working on 68 and 69.
It could affect some other things I assume.


The flow is, after content of iFrame is loaded it sends me a post message that it has loaded up, and then I set display to block, but suddenly it does not show content of iFrame.
Labels: Needs-Feedback
NextAction: 2018-11-27
Reporter, can you disclose a complete set of the code which we need to reproduce this issue?
Can you reproduce this issue without the extension?
Origins of the 'document' and the 'url' in Comment 1 are different?

This bug has been resolved, thank you for your care.

Project Member

Comment 15 by sheriffbot@chromium.org, Nov 14

Cc: tkent@chromium.org
Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)
The NextAction date has arrived: 2018-11-27

Sign in to add a comment