On Fri, 19 May 2023 23:44:01 GMT, Kevin Rushforth <[email protected]> wrote:

> So it's the binary compatibility we need to consider. The question is: is the 
> `Match::getPseudoClasses` method being called in a useful manner by 
> applications today?
> 
> If not, then the change seems OK.
> 
> If it is, then we might need to consider adding a replacement method and 
> deprecating the existing method for removal. The implementation of the 
> replacement method would be exactly what your PR currently has for the 
> existing method, and the existing method, would create a `PseudoClassState` 
> object to hold a copy of the objects in the set.

I've done some Googling with `"getPseudoClasses" import javafx`, and also 
looked at several code search sites, and if it's used, then I can't find any 
examples at all.  I also searched for `createMatch`, with similar results, no 
uses outside the JavaFX code base.

To call this method, one would to do something like this at a minimum:

     StyleSheet styleSheet = StyleSheet.loadBinary( <input stream> );

     for (Rule rule : styleSheet.getRules()) {
          for (Selector selector : rule.getSelectors()) {
               Match match = selector.createMatch();
 
               match.getPseudoClassStates();  // here...
          }
     }

I did find a few references to `loadBinary`, but nothing for `getRules` which 
would be needed next.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1070#issuecomment-1555403678

Reply via email to