RFR: 8228363: ContextMenu.show with side=TOP does not work the first time in the presence of CSS [v3]
aghaisas at openjdk.java.net
Wed Jan 27 11:24:48 UTC 2021
On Mon, 25 Jan 2021 11:40:08 GMT, Robert Lichtenberger <rlichten at openjdk.org> wrote:
>> By using the anchor location facility of PopupWindows we can avoid miscalculation of the
>> menu's height entirely.
>> This fix also cleans up some documentation issues.
>> This fix introduces tests that check the correct positioning (test_position_)
>> test_position_withCSS reproduces the problem that is fixed with this patch.
>> The other test_position_ cases serve as "proof" that no regressions are introduces.
>> They work before and after the fix is introduced.
> Robert Lichtenberger has updated the pull request incrementally with one additional commit since the last revision:
> 8228363: ContextMenu.show with side=TOP does not work the first time in the presence of CSS
> Removed node orientation from API doc.
> Removed extra blank lines.
modules/javafx.controls/src/test/java/test/javafx/scene/control/ContextMenuTest.java line 49:
> 47: import static com.sun.javafx.scene.control.ContextMenuContentShim.*;
> 49: import java.io.File;
These 3 imports are unused. Remove them.
modules/javafx.controls/src/main/java/javafx/scene/control/ContextMenu.java line 312:
> 310: if (getItems().size() == 0) return;
> 311: getScene().setNodeOrientation(anchor.getEffectiveNodeOrientation());
> 312: setAnchorLocation(AnchorLocation.CONTENT_TOP_LEFT);
Do we need to handle RTL case here?
More information about the openjfx-dev