On Mon, 17 Nov 2025 16:23:13 GMT, Andy Goryachev <[email protected]> wrote:
> > I think the `invalidateWidthHeight` and `NodeHelper.geomChanged` lines need
> > to be removed as part of this PR.
>
> This explains why my Canvas-based table cell implementation resulted in a
> continuous layout.
Maybe, but I doubt it, I don't think `Canvas` interacts with `Image` /
`WritableImage`. You may have hit on a similar bug.
> This looks like a bug to me, and I think we should fix it separately.
Yeah, this is a bug no doubt, and can be fixed separately also.
> Also, perhaps we need to add a condition to suppress invalidateWidthHeight
> and NodeHelper.geomChanged only when it's the same image - we do need to
> handle the actual image change.
There should not be an image change, this is some internal platform image, and
it changes, but not in the way we normally think of it for Change listeners
(the reference does not change, but the contents do). It seems that in `Image`
this was added:
void pixelsDirty() { // called by WritableImage / PixelWriter to signal
pixels were modified
platformImagePropertyImpl().fireValueChangedEvent();
}
Basically it just fires a change event (directly) but without there actually
being a change in the value of that property (it's a bit dirty, but luckily
internal code). So I'm pretty sure there is never a geometry change via this
route (I mean, `WritableImage` is basically constructed with a fixed size, so
how could there be?)
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1969#issuecomment-3542921834