DioxusLabs / taffy

A high performance rust-powered UI layout library
https://docs.rs/taffy
Other
2.04k stars 102 forks source link

Support "replaced" layout #679

Open nicoburns opened 2 months ago

nicoburns commented 2 months ago

What problem does this solve or what need does it fill?

"replaced" layout is the layout mode for "foreign" content like images, videos, form fields, iframes, etc. These elements act a little differently to regular elements, but have standard (or at least interoperable) algorithms for computing their size.

What solution would you like?

What alternative(s) have you considered?

Additional context

A significant amount of bugs in the Taffy integration with Servo are down to the interaction between Taffy algorithms and replaced nodes. I'm currently thinking that making replaced nodes a first-class concept in Taffy would be the best way to fix that.