fix(compose): honor ordinary draw modifiers in view dispatch - #112
Conversation
SOURCE/TEST PASS (diagnostic tooth) — sole full exact
|
| field | value |
|---|---|
| head | 784df4a297d6b4d83bd4e07bbc961fd91061469b |
| parent / staging2 | c5730e286ba1134a4a479c7e212376a915cde450 |
| tree | 88451fa5b3e7953c062ce97dc4ecf3eb1cceebbe |
| paths | 2 +71/-1 |
| stable patch-id | d73ff6458e5ebee31a57d7ff34bbce6e5726eb0 |
| sign-off | MingQi |
| PR | OPEN / MERGEABLE |
Dispatch / recursion — PASS
- Production change is one line: default
ContentDrawScope.draw(view)goes fromdrawContent()→draw()(no-arg ordinary path). - No mutual recursion: default
draw()is empty{}and does not calldraw(view). Ordinary-only overrides implementdraw(); explicitdraw(view)overrides (Background/Border/Painter/Alpha/DrawBehind) still take precedence and never enter the new default body. - Unit teeth lock: ordinary
draw()runs once underdraw(view)dispatch; explicit view override runs alone (ordinaryDraws=0).
Residual semantics (non-blocker for this diagnostic tooth)
Bare DrawModifierNode that overrides neither method previously still painted children via default drawContent(); after this change that bare path is a no-op until an ordinary draw() (typically drawWithContent) supplies drawContent(). Existing production view-aware overrides are unchanged. This is the intended “honor ordinary draw modifiers” tradeoff for the diagnostic tooth — not a product root-cause close.
Non-claims
- Hosted matrix
30814859939not bound by this SOURCE comment. - Not unique white-screen / fix(compose): redraw restored lazy descendants #110 root-cause; 0 land / pin / Mobile carrier from LiBai.
Verdict: SOURCE/TEST PASS on full exact 784df4a297d6b4d83bd4e07bbc961fd91061469b (dispatch+recursion only).
ff49485 to
95eaef2
Compare
Signed-off-by: MingQi <raft-mobile-mingqi@mail.build>
95eaef2 to
bfa1a1d
Compare
SOURCE/TEST PASS (diagnostic dispatch) — sole exact
|
| field | value |
|---|---|
| head | bfa1a1d388426118e6d0ed9e81a49e89a0e65979 |
| parent / staging2 | c5730e286ba1134a4a479c7e212376a915cde450 |
| tree | e2d109bf7144f06794590b98982f823dd8cba793 |
| commits | 1 (single-commit identity) |
| paths | 4 +267/-2 |
| stable patch-id | 62fb5a7e31da4c6b53fac0625241497af4373cdf |
| sign-off | MingQi |
Default-method / recursion — PASS
draw() default → drawContent() // bare passthrough (LiquidGlass*)
draw(view) default → draw() // honor ordinary overrides
- No mutual recursion: ordinary default never re-enters
draw(view). - bare nodes: view path →
draw()→drawContent()once (unit tooth). - ordinary-only: ordinary and view-aware dispatch both hit
draw()(equivalence tooth). - explicit
draw(view): precedence only (Background/Border/Painter/Alpha untouched).
Production wiring — PASS
tools/check-draw-modifier-view-dispatch.py (required source-contracts):
- parses live
LayoutNodeDrawScope.drawDirectbody with comment/string mask - requires exactly one
draw(kView)and forbids ordinarydraw()bypass - self-test rejects ordinary / removed / comment-only mutants
- local
--self-test+ live check both pass on this tree
Non-claims
- Hosted matrix
30816612458not bound here. - Not fix(compose): redraw restored lazy descendants #110 / white-screen product root-cause (diagnostic reliability only).
- 0 land / pin / Mobile carrier from LiBai.
Verdict: SOURCE/TEST PASS on exact bfa1a1d388426118e6d0ed9e81a49e89a0e65979.
Summary
DrawModifierNode.draw(view)default to the ordinarydraw()contractIncident evidence
Task Tencent-TDS#183 VC1000134 physical Huawei evidence showed
Modifier.drawWithContentplacement callback running 18 times while its draw callback remained at zero. Source review foundLayoutNodeDrawScopedispatchesdraw(kView), but ordinary modifiers such asDrawWithContentModifier, indication, and lazy item animation override onlydraw(); the old default skipped those overrides and calleddrawContent()directly.This PR repairs the framework dispatch contract. It does not claim the white-screen product root cause: Mobile PixelCopy lifetime remains a separate diagnostic gap, and a fresh physical carrier is still required.
Validation
git diff --checkSigned-off-by: MingQi raft-mobile-mingqi@mail.build