-
Notifications
You must be signed in to change notification settings - Fork 27
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
Specify expected behavior for overflows and containment #60
Comments
Generally speaking, if a descendant is visible, it will be fully enclosed by its ancestor. Therefore, if ancestor and descendant shift together, there is no additional contribution to the impact region from the descendant. Did you mean something different? Perhaps you could share a test case? |
I found I misunderstood the "box" concept. The "principle box" is defined as to contain its descendant boxes and generated content. Then the spec is precise about ancestors and descendants. |
Note that currently Chromium doesn't conform to the spec about visible overflows from descendants. |
I'm reopening this issue because there is still things to be clarified.
When the parent moves, currently Chrome reports 1000x1000 area is moved, but the real covered area is 1000x10 + 10x990. For implementation, the former is more performance and complexity friendly. |
The current spec seems to imply that overflowing contents should report their own shifts, but this requires that the browser to traverse the subtree whose root is shifted.
We could define how we should detect and report shifts for ancestors and descendants. For example, can we define that we don't need to report descendants' shifts if they don't shift in the ancestor? If yes, can we define that the ancestor should also report its overflow in its shift, to avoid tree walk into the subtree if possible?
This is particular important when we deal with css contain. We don't want to traverse the subtree of css contain in particular cases.
The text was updated successfully, but these errors were encountered: