-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make <embed>
and <object>
behave like <iframe>
for image loading
#7939
Comments
I am extremely enthusiastic about this, if you think we can get away with it compatibly. The other thing this probably breaks (unless you add back in some different complications) is fallback for |
Hmm I think I misread your proposal as "make embed and object behave as browsing context containers like iframe that get navigated to the target URL", not "continue having their current setup but remove the image special case". In particular the current setup does not use the usual navigation algorithm, but instead uses a separate path to get the response, and then process that response as either an image, bad-response, or nested browsing context case. I guess you are suggesting sticking with the separate get-response and process-response stages, and just having process-response have only bad-response or nested browsing context cases. That could work, and does remove some of the risk of my full-unification plan. However the remaining issue (and also something we're not sure yet how to handle in #4592) is that |
Exactly, only bad-response or that there will be a nested browsing context. I'm looking at this for Firefox in the context of ORB, since nesting an image load in a synthetic document would nicely separate a cross-origin
Implementation-wise, I've managed to perform the hack you describe to let the element know about the intrinsic size of the image, and I've also been able to implement propagation of The thing that's stumped me is what to do about This is only my opinion, but I'd much rather have What to do about styling I'm not that sure of though. |
In general I'd be happy to adjust the spec to anything web-compatible that moves embed/object closer to iframe. That includes |
@mfreed7 maybe you or your team could help determine the compat impact of removing the auto-sizing, by adding a use counter? My understanding based on some quick tests is that This is an information leak from the hosted content to the outer page that we would like to remove. And it also makes embed/object extra-complicated. And it gives embed/object extra capabilities over iframe, which makes it harder to tell people to stop using embed/object. Could we add a use counter to tell in what situations this intrinsic size information affects the outer page? E.g. calculate the size without it (which would normally be 300x150, or whatever the |
We can probably tackle that at some point soon. It might be a tricky thing to use count, since it might require doing extra layout work. But we can take a look. Tracking bug here: https://crbug.com/1340033 |
I'd like to propose that we change how
<embed>
and<object>
load resources with a type that starts withimage/
to be like that what we have for media resources (e.g.<video>
), and behave like "7.11.6 Page load processing model for media". This essentially means removing the special case for images in the<embed>
and<object>
setup steps, and will make<embed>
and<object>
behave more like<iframe>
when loading images.Making
<embed>
and<object>
behave more like <iframe> has been a topic before and feels like a pretty safe change now that we're considering deprecating<object>
and<embed>
for images.The text was updated successfully, but these errors were encountered: