8367602: Regression: TabPane with wrapped label calculates wrong initial size#1900
8367602: Regression: TabPane with wrapped label calculates wrong initial size#1900hjohn wants to merge 1 commit intoopenjdk:masterfrom
Conversation
|
👋 Welcome back jhendrikx! A progress list of the required criteria for merging this PR into |
|
@hjohn This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 3 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
|
Reviewers: @arapte @andy-goryachev-oracle /reviewers 2 |
|
@kevinrushforth |
There was a problem hiding this comment.
The fix looks good (macOS 15.6.1 M1)
You could have just edited https://bugs.openjdk.org/browse/JDK-8365827 description instead of creating a whole new ticket. Save a virtual tree, I say! :-)
|
Thank you for fixing the issue, @hjohn ! |
Sorry about that, I entered a whole new ticket before realizing that other one existed :) |
|
no harm done, and thanks for fixing it! and yours has more technical insight which is good. |
|
Can't wait for this one to get merged. It's the only thing stopping me from upgrading. |
|
we need one more review. join us, @dlemmermann ! :-) |
kevinrushforth
left a comment
There was a problem hiding this comment.
Looks great. Thanks for fixing this.
|
/integrate |
|
Going to push as commit 7e692bd.
Your commit was automatically rebased without conflicts. |
|
/backport jfx jfx25u |
|
@hjohn The target branch |
|
/backport jfx jfx25 |
|
@hjohn the backport was successfully created on the branch backport-hjohn-7e692bd0-jfx25 in my personal fork of openjdk/jfx. To create a pull request with this backport targeting openjdk/jfx:jfx25, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx: |
That should be: |
Ah, that explains it, thank you! |
|
/backport jfx25u |
|
@hjohn the backport was successfully created on the branch backport-hjohn-7e692bd0-master in my personal fork of openjdk/jfx25u. To create a pull request with this backport targeting openjdk/jfx25u:master, just click the following link: The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:
If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx25u: |
Fix for regression in TabPane size calculation caused by https://bugs.openjdk.org/browse/JDK-8350149 (#1723) between versions 25-ea+8 and 25-ea+10
In Region several height calculations functions were altered to match the behavior and options of their horizontal counterparts to solve discrepancies between the behavior of vertical biased layouts and horizontal biased layouts, which other than their axis, should behave identical.
The height calculations would take a width provided by the caller, but if unavailable (set to -1) and the child was biased, it would just automatically query the child's preferred width and use that as the dependent width.
In contrast, the horizontal functions would only do this if a height was provided by the caller (not -1), and would only override this value if the property fillHeight was false (in which case it would query the child's height directly).
With the change in JDK-8350149, the vertical calculations operate the same as the horizontal ones, as this is generally more flexible. However, the automatic behavior to query the child's size if the dependent size given was set to -1 is no longer there (as this behavior isn't how biased calculations should work).
The TabPaneSkin has chosen to directly call several width/height functions without obeying the content bias contract, which says that in case of bias, the dependent size must be calculated first and then passed to the size calculation one is interested in.
(As an aside, if TabPaneSkin had elected to put all tabs in a single StackPane, then StackPane would have correctly done these calculations, but digging into why it is done this way, with each individual Tab wrapped in its own Node (also a StackPane), is a bit out of scope for this fix).
As it is, TabPaneSkin should check the bias of the tab it is doing calculations for, and if biased, should first query the dependent size before triggering the size calculation it is interested in.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jfx.git pull/1900/head:pull/1900$ git checkout pull/1900Update a local copy of the PR:
$ git checkout pull/1900$ git pull https://git.openjdk.org/jfx.git pull/1900/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 1900View PR using the GUI difftool:
$ git pr show -t 1900Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/1900.diff
Using Webrev
Link to Webrev Comment