Skip to content
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

One layout thread per script thread? #14885

Open
asajeffrey opened this issue Jan 6, 2017 · 11 comments
Open

One layout thread per script thread? #14885

asajeffrey opened this issue Jan 6, 2017 · 11 comments

Comments

@asajeffrey
Copy link
Member

At the moment, every document gets its own layout thread, which is wasteful as most of them are frozen. Can we have one layout thread per script thread instead?

This is related to #14719. cc @emilio

@emilio
Copy link
Member

emilio commented Jan 6, 2017

I think yes, also, that's the only way to properly handle iframe resizes from layout's point of view.

@asajeffrey
Copy link
Member Author

It may be a bit tricky to do iframe resizes this way, since the iframe's parent may be in a different process. The constellation is probably going to need to mediate, which may cause issues for synchronous size queries.

@emilio
Copy link
Member

emilio commented Jan 6, 2017

Yeah, but visible effects are only on same-origin iframes, check out boris's comment in the other issue.

@asajeffrey
Copy link
Member Author

True, but we might have an A:B:A situation, where the root document and its grandchild are same-origin, but the grandchild is in a cross-origin iframe, so its size depends on a layout thread in another process.

@emilio
Copy link
Member

emilio commented Jan 7, 2017

Yeah, but in that case the two same-origin iframes can't have any relationship right? (You can't reach via script the contentDocument of the other, for example, right?)

@jdm
Copy link
Member

jdm commented Jan 7, 2017

window.frames[0].contentDocument is totally valid.

@emilio
Copy link
Member

emilio commented Jan 7, 2017

Even cross-origin? huh

@asajeffrey
Copy link
Member Author

It allows a grandchild to access it's same-origin grandparent even if it's parent is cross-origin.

@nox
Copy link
Contributor

nox commented Oct 7, 2017

@asajeffrey Are you actually still working on this?

@asajeffrey asajeffrey removed their assignment Oct 9, 2017
@asajeffrey
Copy link
Member Author

Not actively. @emilio?

@emilio
Copy link
Member

emilio commented Oct 9, 2017

This would be nice, but requires significant rework I'm not actively looking into.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants