Closed Bug 1549749 Opened 1 year ago Closed 2 months ago

CSS Warnings do not match elements in iframe

Categories

(DevTools :: Console, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1578174

People

(Reporter: rcaliman, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

Attached file css-warning.html

Expanded CSS messages in the Console for warnings originating in iframes does not match the affected elements because the element query is done in the host page.

STR:

  • Run this in a new tab:
    data:text/html,<style>iframe {width: 50vw; height: 50vh}</style><iframe src="https://bug1549749.bmoattachments.org/attachment.cgi?id=9063231"/>
    (it runs the attachment in an iframe)
  • Open DevTools > Console
  • Ensure the "CSS" filter is not enabled.
    (if it is, disable it and start all over. See the note below)
  • Enable the "CSS" filter.
  • Click to expand the CSS warning: Error in parsing value for ‘display’. Declaration dropped.

Expected:
There should be a NodeList of matched elements with one <p> element from the iframe.

Actual:
The NodeList is empty because the query is done in the host page, not the iframe.

You can follow the same STR by opening the attachment directly to see the expected result.

Note
There seems to be an issue with CSS warnings not showing consistently for the iframe if the "CSS" filter is enabled when the page is loaded. Disable the "CSS" filter in the Console, reload the page, then enable it to see CSS warnings for iframes.

Attached video css-warning-iframe.mp4
Status: NEW → RESOLVED
Closed: 2 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1578174
You need to log in before you can comment on or make changes to this bug.