Posted on April 13, 2017
JxBrowser 6.14 includes several long-awaited new features such as CSS injection and getting
Browser instance that initiated URL request in
NetworkDelegate.Apart from extending JxBrowser API with new functionality, this update addresses a lot of fixes and improvements.
Injecting custom style sheet (CSS)
Now you can inject a custom style sheet into every web page loaded in JxBrowser. In order to inject CSS use the
Browser.setCustomStyleSheet(String customStyleSheet) method. Once you set a string that represents CSS, all web pages loaded in this
Browser instance will be updated with the given CSS.
Injecting custom SSL certificate
DialogHandler.onSelectCertificate(CertificatesDialogParams params) method allows selecting SSL certificate from the list of installed certificates. Now, you can tell Chromium engine to use SSL certificate that is not installed in your environment.
Accessing Browser in NetworkDelegate events
A lot of developers requested that we provide an ability to associate
Browser instance with HTTP request/response. Now you can do that. See the
The following functionality got better in v6.14:
- Added Chromium profile directory validator. In general, Chromium engine does not allow running several processes or
BrowserContextinstances configured to the same profile directory. Sharing profile directory between different native processes and
BrowserContextinstances may lead to unexpected behavior including crashes in Chromium engine. To protect Java application from the unexpected crash in Chromium engine, since 6.14 version JxBrowser checks whether Chromium profile directory is already used by another
BrowserContextinstance or native process, and throws an exception if
Browserinstance cannot be configured to use the given profile directory.
- Improved Chromium binaries validation. JxBrowser allows configuring the path to the directory where it should find/extract Chromium binaries. If the directory already contained Chromium binaries, then old validator implementation simply checked the existence of the required Chromium files. Now, JxBrowser validates that the Chromium binaries in the directory not only exist but also correspond to the current JxBrowser version. So, the situation when old Chromium binaries are used with new JxBrowser library will not happen.
Here’s what has been resolved in this update:
- The issue when the
- The issue when some CSS cursors such as zoom in, zoom out, etc. are not supported in heavyweight rendering mode.
- Wrong scrolling in SWT-JavaFX applications on macOS.
- Wrong cursor location in JavaFX applications with enabled lightweight rendering mode.
- The issue when the drop down does not work in JavaFX TabPane with enabled lightweight rendering mode.
- Wrong scaling in the multi HiDPI/Non-HiDPI monitor environment on macOS and Windows in both lightweight and heavyweight rendering modes in JavaFX and Swing.
- Improved stability in the multi-threaded environment.
- Smooth font rendering in heavyweight and lightweight rendering modes on Windows.
BrowserViewlocation in JavaFX SplitPane in heavyweight rendering mode on Windows.
- Memory leak when using
- Native crash when calling
- The “Go Forward” button in JxBrowser Demo is disabled when should be enabled.
- Broken rendering in drop downs in JavaFX and Swing with enabled lightweight rendering mode.
- Java 9 is not recognized properly. Now you can launch JxBrowser on Java 9 without unexpected environment validator exceptions.
- Broken file upload functionality.
- File chooser dialog is not displayed in IFRAMEs.
- Broken JavaFX lightweight rendering with low RAM.
- Broken JavaFX lightweight rendering when resizing
- Default print dialog allows printing only 100 pages.
BrowserPreferences.setDefaultEncoding()method should be marked as deprecated because Chromium 55 ignores encoding settings.
- Drop down is not closed when moving JavaFX window in heavyweight rendering mode.
Write us at firstname.lastname@example.org to download JxBrowser 6.14.
Subscribe to @JxBrowserTeam on Twitter to get notified of the library updates.