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

The edge of the scroll display area of WebView is not displayed.

XMLWordPrintable

    • web
    • b02
    • x86_64
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      macOS Mojave (10.14.1)

      java version "1.8.0_192"
      Java(TM) SE Runtime Environment (build 1.8.0_192-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.192-b12, mixed mode)

      A DESCRIPTION OF THE PROBLEM :
      As the scroll bar overlaid on the viewport,
      There is a problem that part of the end of the content is not displayed.
      The impact of this problem can not be expected to be small.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Execute the test program.
      2. Check the right and bottom edges of the scroll area.

      * This problem can be reproduced on 8u191 and 8u192.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The entire viewport is drawn.
      ACTUAL -
      The scroll bar hides the edge of the viewport.

      ---------- BEGIN SOURCE ----------
      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.AnchorPane;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebViewScrollBarTest extends Application{
      @Override
      public void start(Stage primaryStage) throws Exception {
      WebView webView = new WebView();
      // System.out.println(webView.getEngine().getUserAgent());
      String content = "[BEIGIN]Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum[END]";
      webView.getEngine().loadContent("<html><body>"
      + "<div><textarea style='height:100; width:400; overflow-x:scroll;overflow-y:scroll;'>"+content+"</textarea><div>"
      + "<div><textarea wrap=off style='width:400; overflow-x:scroll;overflow-y:scroll;'>"+content.replace(".", ".\n")+"</textarea></div>"
      + "</body></html>");
      AnchorPane root = new AnchorPane(webView);
      AnchorPane.setBottomAnchor(webView, 0.);
      AnchorPane.setTopAnchor(webView, 0.);
      AnchorPane.setLeftAnchor(webView, 0.);
      AnchorPane.setRightAnchor(webView, 0.);

      Scene scene = new Scene(root, 850, 650, null);
      primaryStage.setScene(scene);
      primaryStage.show();
      }

      public static void main(String[] args) {
      Application.launch(args);
      }
      }

      ---------- END SOURCE ----------

      FREQUENCY : always


            bchoudhary Bhawesh Choudhary (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: