8390440: Region.layoutInArea measures content-biased children against an unsnapped value - #2261
Open
mstr2 wants to merge 2 commits into
Open
8390440: Region.layoutInArea measures content-biased children against an unsnapped value#2261mstr2 wants to merge 2 commits into
mstr2 wants to merge 2 commits into
Conversation
|
👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
The total number of required reviews for this PR has been set to 2 based on the presence of this label: |
Collaborator
|
Will review soon, but I agree that this makes sense. |
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.
Region.layoutInArea()callsRegion.boundedNodeSizeWithBias(), which derives the dependent value from a potentially unsnapped value, after whichlayoutInArea()assigns a potentially different, snapped value to the child. This is wrong, because the dependent value is effectively computed against a value that might not be assigned to the child.For a horizontally biased child, the current sequence is effectively:
The correct sequence would be:
This snapping bug can only be observed when all of the following conditions are met:
This came out of the "snapping rules" I've compiled for PR #2260, specifically the rule Use the same snapped dependent dimension for measurement and layout.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/2261/head:pull/2261$ git checkout pull/2261Update a local copy of the PR:
$ git checkout pull/2261$ git pull https://git.openjdk.org/jfx.git pull/2261/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 2261View PR using the GUI difftool:
$ git pr show -t 2261Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/2261.diff
Using Webrev
Link to Webrev Comment