Honor replaced visual methods and correct event contracts
Verify Tessera GUI / verify (push) Failing after 7m43s

This commit is contained in:
2026-10-22 19:08:28 +08:00
parent 8d0dbbce29
commit 2b20976658
10 changed files with 349 additions and 44 deletions
+10 -11
View File
@@ -119,13 +119,12 @@ impl NativeCallable for Step {
.store()
.lookup_method(definition, self.phase.method())?
.ok_or(invalid("missing layout method"))?;
let native = cx
.store()
.lookup_method(
desktop_type(cx.store(), "Block", self.desktop)?,
self.phase.method(),
)?
.ok_or(invalid("missing native layout method"))?;
let intrinsic = crate::native_visual::is_intrinsic(
cx.store(),
method,
self.phase.method(),
self.desktop,
)?;
let (node, children, bounds, native_size) = {
let mut plan = self
.plan
@@ -142,9 +141,9 @@ impl NativeCallable for Step {
None
};
if matches!(self.phase, Phase::Measure) {
plan.custom_measure[self.index] = method != native;
plan.custom_measure[self.index] = !intrinsic;
}
let native_size = if matches!(self.phase, Phase::Measure) && method == native {
let native_size = if matches!(self.phase, Phase::Measure) && intrinsic {
let constraints = plan.constraints[self.index];
Some(
plan.runtime
@@ -152,7 +151,7 @@ impl NativeCallable for Step {
.map_err(|_| invalid("native measurement exceeds layout limits"))?,
)
} else {
if method != native {
if !intrinsic {
plan.custom = true;
}
if matches!(self.phase, Phase::Measure) {
@@ -194,7 +193,7 @@ impl NativeCallable for Step {
};
if matches!(self.phase, Phase::Arrange) {
plan.runtime.arranged += 1;
plan.custom_arrange[self.index] = method != native;
plan.custom_arrange[self.index] = !intrinsic;
}
(node, children, bounds, native_size)
};