Commit graph

7 commits

Author SHA1 Message Date
Olivier Goffart
95e07ff4fe Fix two way binding to global getting the wrong value
We should not move the expression from a component to a global because
there is a two way binding

Fixes #2064
2023-01-18 14:07:32 +01:00
Olivier Goffart
eee2a3d012 Fix two ways binding between globals
The previous code did not remove two ways binding that were between two
globals. Now we do the remove_aliases pass over the whole document at
once which allos to simplify aliases between globals.
2022-11-28 14:39:47 +01:00
Olivier Goffart
0318b52a4c remove alias pass: make sure to keep priority correctly
Fixes the bug that caused the TextEdit in the gallery to sometimes be
empty.

Generated default value without any priority means it should not be
taken against a real binding if set
2022-11-15 13:19:20 +01:00
Olivier Goffart
be7bc66e6d Add a changelog and fix flacky change_sub_property_indirection test
The test was only failing in some cases with node because of the
inlining in the interpreter, and it depended in which order the property
were processed (they were in a hash)

A test property was added to also test the interpreter
2022-11-04 15:32:20 +01:00
Olivier Goffart
425b477874 Always keep the binding of the right in a two way binding
When having a binding such as
```
  foo <=> bar
```
The default value will always be the value of `bar` regardless what's
the value of foo.

This change of behavior is the only one that makes sense bacause if we
are having repeater or if, this will be a problem. eg:
```
property <xxx> bar;
if (some_cndition) : SomeElement {
   foo <=> bar;
}
```
Then we can't possibly take the default value of foo for the value of
bar since it depends on the condition. (and it is even worse in case of
repeater)

This is a change of behevior, this is why the tests have changed. The
cse of tests/cases/bindings/* were already covered by a warning since
0.3.0 so that should be fine. But the warning did not trigger for
builtin property such as `visible`  (eg, input/visible_mouse test)

Also some internal two way bindings had to be reversed.

cc: #1394
2022-11-04 15:32:20 +01:00
Tobias Hunger
4230ac2572
Update copyright information to reflect name change
Also run resue over the codebase and fix complaints from that tool.
2022-02-09 10:27:47 +01:00
Tobias Hunger
e6b24bceec [reorg]: Set up and populate the internal directory
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.

pre-commit applied some cleanups to the moved files:
 - Consistent newline at end of file policy
 - trimming trailing whitespace
 - Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00
Renamed from sixtyfps_compiler/passes/remove_aliases.rs (Browse further)