Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8106443

Certain 3-character combinations at the start of an id cause ParseException in the CSS parser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx1.3
    • fx1.0
    • javafx
    • Mac OS X, Java 6, JFX SDK 1.0

      Any id that starts with three characters that are all in the range of a-f will cause a ParseException in the CSS parser. For example, any of the following will cause an exception: aaa, add, bad, faa, fab.

      The exception will be thrown regardless of what characters follow the first three: fabulous and addIsBad will cause the exception. An id with 1 or 2 characters are unaffected: a and aa are fine.

      This does not affect style classes.

      Test code:

      // Main.fx
      Stage {
          title: "CSS Bug Test"
          scene: Scene {
              width: 100
              height: 100
              stylesheets: ["{__DIR__}addtest.css"]
              content: Circle {
                  id: "addIsBad"
                  styleClass: "aaaIsFine"
                  centerX: 50
                  centerY: 50
                  radius: 40
              }
          }
      }

      // addtest.css
      Circle {
          fill: cornflowerblue;
          stroke: blue;
      }

      Circle.aaaIsFine {
          fill: yellowgreen;
          stroke: green;
      }

      Circle#addIsBad {
          fill: pink;
          stroke: red;
      }

            dgrieve David Grieve
            diversonjfx Dean Iverson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: