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

WebView 3D rotation hangs if no effect applied

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 7-pool
    • Fix Version/s: 7-pool
    • Component/s: javafx
    • Labels:
    • Environment:

      b45 32bits Win7

    • Subcomponent:
      web

      Description

      Hi,
      If a 3D rotation is applied to a WebView the following exception is thrown.
      There is no issue if there an effect applied to the WebView.
      No reproducible with a simple Button instead of a WebView.

      Moreover, when the 3D rotation works (with an effect applied) the mouse coordinates are no longer trigger the correct "hyperlink" of the WebView content. The WebView seems to stay in a 2D environment.
      Thanks.


      --

      package com.labs;

      import javafx.application.Application;
      import javafx.geometry.Insets;
      import javafx.geometry.Point3D;
      import javafx.scene.PerspectiveCamera;
      import javafx.scene.Scene;
      import javafx.scene.control.Label;
      import javafx.scene.control.Slider;
      import javafx.scene.layout.BorderPane;
      import javafx.scene.layout.FlowPane;
      import javafx.scene.paint.Color;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebView3DRotation extends Application {

          WebView webView;

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

          @Override
          public void start(Stage primaryStage) {

              primaryStage.setTitle("Effects on WebView Pane");
              BorderPane root = new BorderPane();
              Scene scene = new Scene(root, 800, 650, Color.WHITE);
              scene.setFill(Color.BLACK);
              scene.setCamera(new PerspectiveCamera());

              webView = new WebView();
              webView.getEngine().load("http://javafx.com");
              webView.setRotationAxis(new Point3D(20, 30, 20));
              
              // Uncomment this line to make it work
      // webView.setEffect(new BoxBlur());
        

              FlowPane flow = new FlowPane();
              flow.setPadding(new Insets(10, 10, 10, 10));
              
              
              // 3D Rotation
              Slider sliderRotation = new Slider(0, 359, 0);
              sliderRotation.setValue(0);
              sliderRotation.setBlockIncrement(1);
              sliderRotation.setMajorTickUnit(1);
              sliderRotation.setMinorTickCount(1);
              sliderRotation.setSnapToTicks(true);
              webView.rotateProperty().bind(sliderRotation.valueProperty());
               
              flow.getChildren().add(new Label("Rotation:"));
              flow.getChildren().add(sliderRotation);


              // Root
              root.setCenter(webView);
              
              root.setPadding(new Insets(10, 10, 10, 10));
              root.setBottom(flow);

              primaryStage.setScene(scene);
              primaryStage.show();
          }
      }


      Output console:


      [I] OS Version = OS_VISTA or newer
      (I) CheckAdaptersInfo
      (I) ------------------
      (I) Adapter Ordinal : 0
      (I) Adapter Handle : 0x10001
      (I) Description : Intel(R) HD Graphics
      (I) GDI Name, Driver : \\.\DISPLAY1, igdumdx32.dll
      (I) Vendor Id : 0x8086
      (I) Device Id : 0x0046
      (I) SubSys Id : 0x215a17aa
      (I) Driver Version : 8.15.10.2353
      [I] GUID : {D7B78E66-4306-11CF-2B7D-5001A2C2C535}
      (I) D3DPPLM::CheckDeviceCaps: adapter 0: Passed
      (I) ------------------
      (I) D3DContext::InitContext device 0
      (I) D3DContext::ConfigureContext device 0
      [V] dwBehaviorFlags=D3DCREATE_FPU_PRESERVE|D3DCREATE_HARDWARE_VERTEXPROCESSING
      (I) D3DContext::ConfigureContext: successfully created device: 0
      (I) D3DContext::InitDevice: device 0
      (I) D3DContext::InitDevice: successfully initialized device 0
      (V) | CAPS_DEVICE_OK
      (V) | CAPS_RT_PLAIN_ALPHA
      (V) | CAPS_RT_TEXTURE_ALPHA
      (V) | CAPS_RT_TEXTURE_OPAQUE
      (V) | CAPS_LCD_SHADER | CAPS_BIOP_SHADER | CAPS_PS20
      (V) | CAPS_AA_SHADER
      (V) | CAPS_PS30
      (V) | CAPS_MULTITEXTURE
      (V) | CAPS_TEXNONPOW2
      (V) | CAPS_TEXNONSQUARE
      Matrix: degree AFFINE_3D
      0.055850223171747315, 0.9072885925351915, -0.41678311197453444, 108.75370098006664
      -0.03576572161680436, 0.4189847527210753, 0.9072885925351915, 196.51015987239433
      0.9977983592534592, -0.03576572161680436, 0.055850223171747315, -378.5189407886582
       is 161
        0.055850223171747315, 0.9072885925351915, -0.41678311197453444, 108.75370098006664
        -0.03576572161680436, 0.4189847527210753, 0.9072885925351915, 196.51015987239433
      java.lang.InternalError: does not support higher than AFFINE_2D operations
        0.9977983592534592, -0.03576572161680436, 0.055850223171747315, -378.5189407886582
      at com.sun.javafx.geom.transform.BaseTransform.degreeError(BaseTransform.java:260)
      at com.sun.javafx.geom.transform.Affine2D.setTransform(Affine2D.java:807)
      at com.sun.javafx.geom.transform.Affine2D.<init>(Affine2D.java:150)
      at com.sun.webpane.sg.prism.WCGraphicsPrismContext.init(WCGraphicsPrismContext.java:70)
      at com.sun.webpane.sg.prism.WCGraphicsPrismContext.<init>(WCGraphicsPrismContext.java:58)
      at com.sun.webpane.sg.prism.FXGraphicsManager.createGraphicsContext(FXGraphicsManager.java:61)
      at com.sun.javafx.sg.prism.NGWebView.renderContent(NGWebView.java:65)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1128)
      at com.sun.javafx.sg.prism.NGGroup.renderContent(NGGroup.java:202)
      at com.sun.javafx.sg.prism.NGRegion.renderContent(NGRegion.java:397)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:185)
      at com.sun.javafx.sg.prism.NGNode.doRender(NGNode.java:39)
      at com.sun.javafx.sg.BaseNode.render(BaseNode.java:1128)
      at com.sun.javafx.tk.quantum.PaintRunnable.doPaint(PaintRunnable.java:217)
      at com.sun.javafx.tk.quantum.PaintRunnable.paintImpl(PaintRunnable.java:148)
      at com.sun.javafx.tk.quantum.PaintRunnable.run(PaintRunnable.java:329)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
      at com.sun.prism.render.RenderJob.run(RenderJob.java:29)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      at com.sun.javafx.tk.quantum.QuantumRenderer$ObservedRunnable.run(QuantumRenderer.java:67)
      at java.lang.Thread.run(Thread.java:662)

        Attachments

          Activity

            People

            • Assignee:
              loneid Leonid Popov (Inactive)
              Reporter:
              anouardjfx arnaud nouard (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: