Closed Bug 1497126 Opened 2 years ago Closed 2 years ago

Firefox fails to load nested equal iframes

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(2 files, 1 obsolete file)

Firefox blocks the loading of an iframe with the same URL of the current context ignoring the ref parts. This happens because MAX_SAME_URL_CONTENT_FRAMES is set to 1 here:

https://searchfox.org/mozilla-central/rev/5786b9be9f887ed371c804e786081b476a403104/dom/base/nsFrameLoader.cpp#133

and it's used here:

https://searchfox.org/mozilla-central/rev/5786b9be9f887ed371c804e786081b476a403104/dom/base/nsFrameLoader.cpp#2272-2290

We should allow the first level of recursion. This is needed by some WPTs:

https://searchfox.org/mozilla-central/rev/5786b9be9f887ed371c804e786081b476a403104/testing/web-platform/tests/feature-policy/resources/featurepolicy.js#98-104
Attached patch iframe2.patchSplinter Review
Attachment #9015187 - Flags: review?(bugs)
Blocks: 1497141
Attached patch WPT + tests (obsolete) — Splinter Review
Attachment #9015202 - Flags: review?(bugs)
Comment on attachment 9015187 [details] [diff] [review]
iframe2.patch

Yeah, I think we can increase the limit.
Attachment #9015187 - Flags: review?(bugs) → review+
Comment on attachment 9015202 [details] [diff] [review]
WPT + tests

I'd rather understand why the crashtest starts to timeout
Comment on attachment 9015202 [details] [diff] [review]
WPT + tests

ok, I think we'll just get the test fixed.
Attachment #9015202 - Flags: review?(bugs)
Attached patch WPT + testsSplinter Review
Attachment #9015202 - Attachment is obsolete: true
Attachment #9015209 - Flags: review?(bugs)
Attachment #9015209 - Flags: review?(bugs) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/dc46a5f43a47
Allow 1 level of recursion when loading nested iframes with same URL, r=smaug
https://hg.mozilla.org/integration/mozilla-inbound/rev/70f63648a0f6
Fix WPTs for 1 level of recursion when loading nested iframes with same URL, r=smaug
https://hg.mozilla.org/mozilla-central/rev/dc46a5f43a47
https://hg.mozilla.org/mozilla-central/rev/70f63648a0f6
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Component: DOM → DOM: Core & HTML
Regressions: 1566582
You need to log in before you can comment on or make changes to this bug.