Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't skip a containing VIDEO element when marking for layout.
We have special-code in LayoutObject::Container() for legacy floats. Prevent this from kicking in if it's e.g. a VIDEO element that contains a float ("Wait, what?" you say? Indeed. Wait, what.). LayoutVideo isn't LayoutBlock, so ContainingBlock() would skip it. Another option would be to forbid floated ::-webkit-media-controls, but since this is just about disabling code meant for legacy inline formatting contexts, this fix seems reasonable. Besides, if we were to forbid stuff, we should probably forbid a lot of things, such as out-of-flow positioning, etc. Additionally, skip fragments in pre-paint if IsLayoutObjectDestroyedOrMoved(), just like we already do everywhere else when walking the fragment tree, to prevent such crashers in the future. The test included only failed with DCHECKs enabled (AssertLaidOut()). We don't reach the nullptr deref in pre-paint. I couldn't come up with an automatic testcase to trigger this (unless we set a long timeout). Bug: 1308042, 1308811 Change-Id: I77f75bda23573c623dbd91d50c8dfc7564d5f06a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3545149 Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org> Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org> Commit-Queue: Morten Stenshorne <mstensho@chromium.org> Cr-Commit-Position: refs/heads/main@{#984768}
- Loading branch information