Only apply the constraint to the parent with the new syntax

Also attempt to document it
This commit is contained in:
Olivier Goffart 2023-01-24 17:24:44 +01:00 committed by Olivier Goffart
parent ee672d65f5
commit 7c55b9f925
5 changed files with 16 additions and 9 deletions

View file

@ -144,6 +144,9 @@ fn gen_layout_info_prop(elem: &ElementRc) {
.clone()
.map(|(h, v)| (Expression::PropertyReference(h), Expression::PropertyReference(v)))
.or_else(|| {
if c.borrow().is_legacy_syntax {
return None;
}
if c.borrow().repeated.is_some() {
// FIXME: we should ideally add runtime code to merge layout info of all elements that are repeated (same as #407)
return None;