[API Review] RT-20906: Support setting min/pref/max sizes via css
david.grieve at oracle.com
Thu Jan 24 09:40:48 PST 2013
Several options. Of these, I lean toward the second.
1. Catch it in the parser which would skip the style and spit out a parse error.
I'm loath to add more to the parser just to special case these properties, especially when the syntax is already handled. But the parser does spit out a more useful error message.
2. Throw an IllegalArgumentException from the StyleConverter
This exception is caught in StyleHelper where a message is logged. The property is skipped thereafter for that node in that pseudo-class state. This would require a new converter that only accepts absolute and relative lengths, which is easy enough. The downside here is that the error message will spit out for every node that hits the bad value. If the logger is set to WARNING (which it is by default), then this should tell you the matching styles which would help narrow down where the problem is.
3. Do nothing.
The UI would look really funky, but why?
On Jan 24, 2013, at 11:37 AM, Richard Bair <richard.bair at oracle.com> wrote:
> Sounds good.
> BTW I have a duplicate issue RT-21564, which is also duplicate of RT-27785. I'll close RT-21564 as duplicate of 27785 and 20906.
>> Percentage values are not allowed since the actual value would need to be computed from the width and/or height of the Node's parent before the parent is laid out.
> What happens if somebody uses a percentage?
More information about the openjfx-dev