Posted on May 17, 2024
JxBrowser 7.39.0
Chromium 124.0.6367.221
We upgraded Chromium to a newer version, which introduces security fixes for vulnerabilities that have known exploits:
- CVE-2024-4761: Out of bounds write in V8
- CVE-2024-4947: Type Confusion in V8
- CVE-2024-4671: Use after free in Visuals
For the complete list of Chromium fixes and improvements in 124.0.6367.221
please visit
the product blog posts for the following versions:
Breaking changes
In this version, we have removed the Scaling.fitToPage()
and Scaling.fitToPaper()
methods. These methods were only
useful when printing a PDF file with a system printer. When printing an HTML page or using the built-in PDF
printer, the methods were no-op, confusing developers.
Instead, we introduce a new Fit.fit()
method, which is available only for printing PDF files with system
printers.
Here is how you’d have implemented PrintPdfCallback
callback before:
browser.set(PrintPdfCallback.class, (params, tell) -> {
SystemPrinter<PdfSettings> printer = params.printers().list().get(0);
PdfSettings settings = printer.printJob().settings();
settings.scaling(Scaling.fitToPage());
...
tell.proceed(printer);
});
Here is how PrintPdfCallback
should look in JxBrowser 7.39.0:
browser.set(PrintPdfCallback.class, (params, tell) -> {
SystemPrinter<PdfSettings> printer = params.printers().list().get(0);
PdfSettings settings = printer.printJob().settings();
settings.fit(Fit.FIT_TO_PAGE);
...
tell.proceed(printer);
});
Native keyboard input
In the off-screen rendering mode, any key pressed by a user travels a long way before it reaches the web page. An operating system dispatches the keyboard event to Java UI, which passes it to JxBrowser, which forwards it to Chromium, which delivers it to the web page.
At every stage of this journey, the keyboard event is converted from one data structure to another. And since different keyboard subsystems and their data structures don’t match exactly, the data from the event may be lost or misinterpreted. That means a keyboard interaction in JxBrowser may produce a different JavaScript event than the same interaction in Chromium.
In JxBrowser 7.39.0, we introduce an experimental feature that directly forwards keyboard events from the operating system to Chromium. This way, the JavaScript events generated in JxBrowser should always match those in Chromium.
To activate the feature, use the system property:
System.setProperty("jxbrowser.use.native.keyboard.input", "true");
Please note, that IME doesn’t work in native keyboard input yet.
Quality enhancements
- Web content is now correctly rendered in
TabPane
on JavaFX. - No duplicated JS objects are passed as parameters to
JsFunctionCallback
anymore. - The only supported scenario for the
--force-device-scale-factor
Chromium switch is now the off-screen rendering mode in combination with Swing and Java 8.
Download JxBrowser 7.39.0
Please share your email with us, and we'll send you download instructions.
We were unable to send the email. Please use the direct link to download JxBrowser.
If you are a registered customer you don't need to do anything to use this update.
If you would like to evaluate the product, you need an evaluation license.
Follow @JxBrowserTeam to get notified of the library updates.
Subscribe to our RSS feed to get instant updates on new releases.