On Tue, 16 Dec 2025 01:55:15 GMT, Michael Strauß <[email protected]> wrote:
>> modules/javafx.graphics/src/main/docs/javafx/scene/doc-files/cssref.html
>> line 969:
>>
>>> 967: <tr>
>>> 968: <td class="value">display-mode</td>
>>> 969: <td class="value">fullscreen | standalone</td>
>>
>> what does "standalone" mean?
>>
>> also, "fullscreen" applies to a window, but earlier it's mentioned that the
>> media queries apply to Scene.
>>
>> I don't see the fullscreen styles change when I use the monkey tester Stage
>> page (the one that allows me to set the fullscreen `Stage` bit) with the
>> following CSS:
>>
>>
>> @media (display-mode: fullscreen) {
>> .button {
>> -fx-background-color: red;
>> }
>> }
>
> "Standalone" matches when "fullscreen" doesn't match. The relevant part of
> the [specification](https://www.w3.org/TR/mediaqueries-5/#display-modes) says
> that it is a window with "[...] standard system UI elements, such as window
> decorations, a system status bar, and/or a system back button [...]".
>
> "Fullscreen" matches when none of that is available and the scene extends
> across the entire display, which is the case when the scene is hosted in a
> full-screen window.
>
> Note that media queries don't change CSS precedence rules. In your example,
> you could check whether another rule that sets `-fx-background-color` has a
> higher precedence. You could try adding `!important` to quickly figure out
> whether the rule has any effect at all.
What I meant is to explain the meaning in the cssref.html. We can't really
refer to w3.org pages for JavaFX, in my opinion. So, if you want to keep the
standalone term in the values, I think you ought to explain what it is, using
JavaFX or platform terminology.
>> modules/javafx.graphics/src/main/java/com/sun/javafx/css/media/SizeQueryType.java
>> line 60:
>>
>>> 58: }
>>> 59:
>>> 60: private static final SizeQueryType[] VALUES = values();
>>
>> is this really needed?
>
> It's not strictly needed. If we remove it, then the enum will allocate a new
> array on every iteration over its `values()`.
unless this code is in hot path, I'd suggest to remove the static.
>> modules/javafx.graphics/src/main/java/javafx/css/Stylesheet.java line 70:
>>
>>> 68: * Version 8: viewport characteristics media queries
>>> 69: */
>>> 70: final static int BINARY_CSS_VERSION = 8;
>>
>> Does this impact backward compatibility with .bss files?
>> Should it be mentioned in the CSR?
>
> BSS files are not specified to be backwards-compatible in the sense that an
> older version of JavaFX can read a newer BSS file. It is mentioned in the
> CSR, though.
I was expecting it in the description - I could be wrong though.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1844#discussion_r2623983617
PR Review Comment: https://git.openjdk.org/jfx/pull/1844#discussion_r2623987953
PR Review Comment: https://git.openjdk.org/jfx/pull/1844#discussion_r2623995218