mirror of
https://github.com/servo/servo
synced 2026-05-14 19:06:31 +02:00
Set default value for overflow property to replaced element. This is based on https://drafts.csswg.org/css-overflow-4/#overflow-control We already implement the first half of the above spec [previously](https://github.com/servo/servo/blob/main/components/layout_2020/style_ext.rs#L574-L587). Note that in chromium, author can change the overflow value of `img`, `video`, and canvas, but not for `iframe`, `embed`, and object. In Firefox, you cannot change the value for all above element. https://jsfiddle.net/7m98gqsk/ There is also a possibility of handling this attribute somewhere in the rust code so that we do not have to change the UA stylesheet for every new replaced element. But for now, I just change the UA stylesheet just like mentioned in the spec. Testing: This change adds a WPT test. Fixes: #35950 Try: http://github.com/PotatoCP/servo/actions/runs/14303000315 cc: @xiaochengh @d-desiatkin Signed-off-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com> Co-authored-by: Kenzie Raditya Tirtarahardja <kenzieradityatirtarahardja.18@gmail.com>