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

cssref contains incorrect and insufficient information about url

    Details

      Description

      <URI> section of cssref.html has the following problems:
      1. It suggests to use address without quotes (see screenshot) but that results in the following exceptions when invoked using setStyle method

      WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
      WARNING: com.sun.javafx.css.parser.CSSParser term Unexpected token ':' at ?[1,32]
      WARNING: com.sun.javafx.css.parser.CSSParser reportException Please report java.lang.NullPointerException at:
      com.sun.javafx.css.parser.CSSParser.term(Unknown Source)
      com.sun.javafx.css.parser.CSSParser.expr(Unknown Source)
      com.sun.javafx.css.parser.CSSParser.declaration(Unknown Source)
      com.sun.javafx.css.parser.CSSParser.declarations(Unknown Source)
      com.sun.javafx.css.parser.CSSParser.parseStyle(Unknown Source)

      2. It doesn't specify what is the relative location in case of setStyle() usage. My experiments show that it is relative to the classes root (Not the particular class package which one may expect).
      3. It doesn't specify what is the root (if you start your URI with "/" symbol). For example, when url('img/JavaFX.png') works url('/img/JavaFX.png') doesn't work.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dgrieve David Grieve
                Reporter:
                mrkam Alexander Kuznetcov (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: