override_from_parent.60 was panicking when compiling rust
because some expression had NamedReference that were relative to another
sub component.
Added a test as well for the case of multiple indirection (SubComp4)
that was also broken
This will allow later to be able to operate on the binding despite the
element is borrowed.
Since the Binding itself is in a RefCell, the analysis don't need to
be anymore.
To do this change, a small change in the binding_analysis logic was required
which means that we will now detect binding loop if a binding was causing
two binding loop. (before, only one binding loop was detected)
The parent commit accidentally removed the case of the generation for
the implicit layout info call where the layout info property is
available on a component (i.e. it is in a layout).
Amends commit ae25dd3d07
Provide a layout_info implementation for sub-components and call it. This
disables the lowering the implicit_layout_info call again,
also to ensure that when this
is installed from the use-site of the sub-component, the self can be used to obtain
the info (by calling the new generated function).
As a result
- The error messages will now show the error with `-` instead of `_`
- The LSP will auto-complete with -
- The interpreter's list of properties will list the property with '-'
(but we made the change so that set_property, get_property, and so on
work also if passed a '-')
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"
This patch does not port the Rust or C++ binding yet
Instead of using a solve_layout function in the component, use property to hold
a layout cache.
This commit only implement the GridLayout and only the interpreter part
Add support for built-in property aliases and rename `color` to
`background` - in preparation for it also changing to type brush.
Right now the alias is silent, a deprecation and overall change
will come in a subsequent change.
Extract the StyleMetrics from the style and pass it to the layout
lowering pass for application.
The tests were adjusted to explicitly specify the padding/spacing to
override the ugly style default.