New issue
Advanced search Search tips

Issue 836849 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: ----
Type: Bug


Previous locations:
monorail:3734


Sign in to add a comment

Dev Tools > Elements > relative iFrame src has domain:port from parent window

Reported by emanuel....@googlemail.com, Apr 24 2018

Issue description

(1) Empty parent page <html><body>... hosted: //localhost:5000
(2) Generate iFrame with src //localhost:14417 in the parent page.
(3) iFrame contain script tag -> src relative to the iFrame src ../../example.js
(4) Open "Dev tools" 
(5) Dev tools > Elements (tab) -> Mouse interactions to scripts src (domain/port) are wrong. Tooltip is also wrong -> domain/path.

What is the expected output?
Dev tool > Elements (tab): The script tag in the iFrame should have the domain:port from the iFrame, tooltip should contain iframe domain:port/path.

What do you see instead?
Dev tool > Elements (tab): The script tag is linked with the domain/port from the parent window of the iFrame. Tooltip url/path is also wrong.



 
chrome-iframe-relative-script-src-bug.PNG
38.0 KB View Download
Sorry wrong project please delete
Project: chromium
Moved issue monorail:3734 to now be  issue chromium:836849 .
Components: Platform>DevTools
Labels: -Type-Defect Type-Bug
Status: Untriaged (was: New)

Comment 4 by l...@chromium.org, Jun 11 2018

Owner: l...@chromium.org
Status: Assigned (was: Untriaged)
Project Member

Comment 5 by bugdroid1@chromium.org, Jun 25 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/79d9b2689c2b7161ffd0c786163d2977c4216fe2

commit 79d9b2689c2b7161ffd0c786163d2977c4216fe2
Author: Erik Luo <luoe@chromium.org>
Date: Mon Jun 25 19:10:50 2018

DevTools: contentDocument should build with DOMDocument instead of DOMNode

Originally, payloads with 'contentDocument' created a new SDK.DOMDocument on
the frontend. When we prepared DevTools to render iframes inline [1], we
switched it to use SDK.DOMNode, which lacks
- isInShadowTree reset
- documentURL, baseURL

'contentDocument' differs from 'templates' and 'importedDocuments' in that the
latter two do not affect shadow tree/documentURL/baseURL.

[1] https://crrev.com/d16260bf91889bb7ead1fe490d087bc2ed02d58b

Bug:  836849 
Change-Id: I9c242720c3d0c37bf8170b1b87d8b31a2f52d2ff
Reviewed-on: https://chromium-review.googlesource.com/1102156
Commit-Queue: Erik Luo <luoe@chromium.org>
Reviewed-by: Dmitry Gozman <dgozman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#570122}
[add] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-iframe-base-url-expected.txt
[add] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-iframe-base-url.js
[modify] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-rewrite-href-expected.txt
[modify] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/WebKit/LayoutTests/http/tests/devtools/elements/elements-panel-rewrite-href.js
[add] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/WebKit/LayoutTests/http/tests/devtools/elements/resources/elements-empty-iframe.html
[modify] https://crrev.com/79d9b2689c2b7161ffd0c786163d2977c4216fe2/third_party/blink/renderer/devtools/front_end/sdk/DOMModel.js

Comment 6 by l...@chromium.org, Jun 28 2018

Status: Fixed (was: Assigned)

Sign in to add a comment