RFR: 8358450: Viewport characteristics media features [v10]
Michael Strauß
mstrauss at openjdk.org
Tue Dec 16 02:09:50 UTC 2025
On Mon, 15 Dec 2025 22:29:11 GMT, Andy Goryachev <angorya at openjdk.org> wrote:
>> Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits:
>>
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>> - resolve merge conflicts
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>>
>> # Conflicts:
>> # modules/javafx.graphics/src/test/java/test/javafx/css/CssParser_mediaQuery_Test.java
>> - update cssref.html
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>> - whitespace, add final modifier
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>> - Refactor context awareness
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>> - Merge branch 'master' into feature/media-features-viewport-characteristics
>> - ... and 4 more: https://git.openjdk.org/jfx/compare/32e667df...19cdaeaa
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/media/MediaFeatures.java line 229:
>
>> 227: for (int i = 0; i < lowerCaseText.length(); i++) {
>> 228: if (!Character.isDigit(lowerCaseText.charAt(i))) {
>> 229: unitIndex = i;
>
> I think this is the place where the parser fails with fractional numbers...
Yes. It turns out that we need to differentiate `<size>` and `<number>` values, as the latter don't have a unit (and can never have one). I've refactored the code a bit to handle both types of ranges.
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1844#discussion_r2621494309
More information about the openjfx-dev
mailing list