On Mon, 30 Oct 2023 01:16:58 GMT, Sai Pradeep Dandem <d...@openjdk.org> wrote:
>> **Issue:** >> Using pseudo classes in programmatic query using Node.lookupAll() or >> Node.lookup() gives unexpected results. >> >> **Cause:** >> There is no check for checking the psuedo states matching in the applies() >> method of SimpleSelector.java. So checking for "applies()" alone is not >> sufficient in lookup() method. >> >> **Fix:** >> Included an extra check for the psuedo states to match. > > Sai Pradeep Dandem has updated the pull request incrementally with one > additional commit since the last revision: > > 8185831: Changes to doc as per review comments modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 1988: > 1986: * a pseudo state "myPseudo", then to find all nodes with > "myPseudo" state, the lookupAll method can be used as follows: > 1987: * {@code scene.lookupAll(".myStyle:myPseudo");} or {@code > scene.lookupAll(":myPseudo");}. If no pseudo class is specified > 1988: * by the lookupAll selector, irrespective of the nodes pseudo > states the result will contain all nodes matching the selector. Please make the same change regarding the last sentence that you did in the `lookup` method (move it before the examples and reword to match `lookup`). ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1245#discussion_r1376488282