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

Unnecessary squares are added when rendering surrogate pair characters in WebView

XMLWordPrintable

    • web
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      macOS BigSur 11.5.2
      OpenJDK 11.0.12
      OpenJFX 18 ea

      A DESCRIPTION OF THE PROBLEM :
      OpenJFX 18(ea)'s WebView may not work correctly with gradient fill. this problem does not occur in OpenJFX 17.

      The impact of this problem is considered to be large, and if you are using WebView, it will be a factor that prevents you from upgrading to 18.

      **************
      (I apologize, but please correct the reproduced environment in another bug report I filed earlier: the version number where the problem occurs in the bug report for the Fill Gradation problem in WebView was wrong. Please make it match the number in this report)

      * OpenJFX17 -> OpenJFX 18(ea)
      * OpenJFX16 -> OpenJFX 17
      ***************

      The following experimental results suggest that the problem is caused by changes in the Native code, not the Java code.

      I was able to avoid this problem by simply replacing it with the libwebkit.dylib file built with the snapshot of 2021-05-05 in my development environment.

      Looks like the effect of one of the following three changes, possibly 8268849.

      * 2021/8/17 - 8272329: Cherry pick GTK WebKit 2.32.3 changes
      * 2021/7/14 - 8268849: Update to 612.1 version of WebKit
      * 2021/6/23 - 8268915: WebKit build fails with Xcode 12.5





      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Launch the attached test application.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The rendering of the attached HTML file matches the web browser.
      ACTUAL -
      Unnecessary squares are added to characters.

      ---------- BEGIN SOURCE ----------
      import java.net.URI;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.layout.BorderPane;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebSurrogatePairTest extends Application{

      @Override
      public void start(Stage primaryStage) throws Exception {

      WebView webView = new WebView();
      BorderPane root = new BorderPane(webView);
      Scene scene = new Scene(root, 900, 800);

      URI uri = this.getClass().getResource("/test-surrogate.html").toURI();

      webView.getEngine().load(uri.toURL().toString());


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

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


      ------------

      <html>
      <head>
      <meta charset="utf-8"/>
      <style>
      </style>
      </head>
      <body>
        <table style="border:1px solid black">
         <tbody>
          <tr>
           <td>U+2000B<br>𠀋</td>
           <td>U+2123D<br>𡈽</td>
           <td>U+2131B<br>𡌛</td>
           <td>U+2146E<br>𡑮</td>
           <td>U+218BD<br>𡢽</td>
           <td>U+20B9F<br>𠮟</td>
           <td>U+216B4<br>𡚴</td>
           <td>U+21E34<br>𡸴</td>
           <td>U+231C4<br>𣇄</td>
           <td>U+235C4<br>𣗄</td>
          </tr>
         </tbody>
        </table>
      </body>
      </html>
      ---------- END SOURCE ----------

      FREQUENCY : always


        1. Capture.PNG
          Capture.PNG
          22 kB
        2. test-surrogate.html
          0.5 kB
        3. WebSurrogatePairTest.java
          0.7 kB

            arapte Ambarish Rapte
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: