Improved the .gitignore file (It's more dynamic now) - #1
Open
ShaunRoselt wants to merge 1 commit into
Open
Conversation
andrevanzuydam
added a commit
that referenced
this pull request
May 11, 2026
…aches diag
Bug 18 (2026-05-10 follow-up): user reports that when Twig.Text is
reassigned with an interpolated brand-colour value in a class rule
(.header { background: <BrandColour>; ... }), subsequent renders
keep the FIRST render's colour. Inline style="" flips cleanly.
Investigated and pinned the underlying mechanic with a focused
test (TestClassRuleReassignmentReflectsNewColour):
1. Parse HTML #1 with `.header { background: #ff8200 }`
2. FStyleSheet.Clear + AddCSS (mirrors what DoLayout does after
FParserDirty fires from a Twig.Text reassign)
3. Layout + capture Style.BackgroundColor → expected #ff8200
4. Parse HTML #2 with `.header { background: #e60000 }`
5. FStyleSheet.Clear + AddCSS again
6. Layout + capture Style.BackgroundColor → expected #e60000
7. Assert the two differ
Result: test passes. The underlying FStyleSheet.Clear +
re-AddCSS path works correctly — including the indexed cascade
(FRulesByKey) added in f7fac5f. So the cache-invalidation chain
that DoLayout takes is sound.
The user's report could still be real but in a path the test
doesn't exercise — most likely candidates:
* Frond template engine caching the rendered output between
Twig.Text reassignments (template engine state, not Tina4
renderer).
* Repaint not actually causing Paint -> DoLayout (FMX layer).
* External-stylesheet file cache (TFileCache) — applies only
if <link rel="stylesheet"> is used.
To unblock anyone hitting this: new InvalidateAllCaches() method
defensively clears the stylesheet, file cache, parsed DOM,
pseudo-class chains, and forces a relayout. Call it after a
Twig.Text reassign if you suspect cached state is masking the
new value:
Render.Twig.Text := NewSource;
Render.InvalidateAllCaches; // belt-and-braces
Test suite: 489/489.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.