We should not increase the priority when merging two way binding, only when
inlining.
This fixes the iot-dashboard's devices widget which were sometimes not
transparent as they should have been.
This was not deterministic because the order in which the two way binding are
merged is not deterministic because of hash table, and sometimes one binding
ended up having a higher priority as it should have had.
Throw a proper compilation error.
Note that there may be a bit too many error now when the two
branch of a condition are not the same, but it's better than a panic
When an element gets its width and height from the parent through an implicit 100% binding,
those bindings were missing when an animation was pre-defined.
The provided new-type wrapper offers a function to deal with replacing just
binding expression, instead of the
expression *and* the animation.
Fixes#376
When there is an animaiton but no expression, the binding is
left with an invalid expression.
State was keeping that invalid expression as part of sub expression
this is a regression since commit ba32777cab
When images are loaded by the WASM-built interpreter, we do support
loading them asynchronously via the DOM. In that case we have a property
inside the HTMLImage in the GL backend that becomes dirty once loaded
and triggers re-evaluation of depending properties/layouts. However that
only works as long as uses of the image sizes are in property bindings.
BuiltinFunction::ImageSize however is marked as pure in the compiler, so
this may mean that something like this results in an initial assignment
instead of a binding:
Image {
source: ...
height: source.height * 1px;
}
For Rust, etc. that's fine, but when running in the WASM-built
interpreter the expression needs to remain in a binding. Therefore this
hack tries to narrow down this condition to wasm as target.
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
this implies that we need to make sure the property are initialized in
order so that constant properties that depends on other constant properties
are correctly computed
- Mark builtin properties that are modified by the native code as output
- Record wether the property is set by code in the .60
- Add a field that will tell us if a property binding is constant
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
This removes the need to manually register fonts. This is initially
applied to the printer demo, but the other demos and removal of the
public manual registration API will come in follow-up commits.