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

WebEngine.getDocument().getDocumentURI() no longer returns null for loading a String of HTML

    XMLWordPrintable

    Details

    • Subcomponent:
      web
    • Introduced In Version:
    • CPU:
      x86
    • OS:
      windows

      Backports

        Description

        In Java 8 U121 and earlier, if you called WebView.loadContent on an Html String and called javafx.scene.web.WebEngine.getDocument().getDocumentUri() the answer was always null, now the answer is "about:blank". Previously this result was reserved for pages were loaded with "about:blank" directly.

        Attached is a reproducible test case that shows the change in behavior between Java 8 U121 and Java 8 U131 which broke our application.

        Is this something you can put back?
        Is this a documented change?
        If you can't put it back, how do we now tell the difference between a page that was loaded with "about:blank" and an html string that was passed into the WebEngine.loadContent("Html String")?

        We have customers using webstart who will have their JREs automatically upgraded to Java 8 U 131 and our application will break because of this change.

          Attachments

          1. JavaFxDocumentUriChange.class
            2 kB
            Guixin Cheng
          2. JavaFxDocumentUriChange.java
            4 kB
            Guixin Cheng
          3. JavaFxDocumentUriChange$Browser.class
            4 kB
            Guixin Cheng

            Issue Links

              Activity

                People

                • Assignee:
                  arajkumar Arunprasad Rajkumar
                  Reporter:
                  gucheng Guixin Cheng
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Due:
                    Created:
                    Updated:
                    Resolved: