RFR: 8267551: Support loading images from inline data-URIs [v14]
Kevin Rushforth
kcr at openjdk.java.net
Sat Jun 5 16:24:59 UTC 2021
On Sat, 5 Jun 2021 15:42:22 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:
>> This PR adds support for loading images from [inline data URIs](https://en.wikipedia.org/wiki/Data_URI_scheme), which is also widely supported by web browsers. This enables developers to package small images in CSS files, rather than separately deploying the images alongside the CSS file.
>
> Michael Strauß has updated the pull request incrementally with one additional commit since the last revision:
>
> Addressed review comments
The docs updates look good, with a few minor comments.
modules/javafx.graphics/src/main/java/javafx/scene/image/Image.java line 68:
> 66: * images from a specified URL.
> 67: *
> 68: * <p>Supported image formats are:
Can you revert this formatting change to avoid unnecessary diffs? (I mean the one that moved the sentence up to be on the same line as the `<p>`. The removal of the unneeded `</p>` is fine)
The reason for this is to avoid extra diffs in public API. It will make it easier to see what needs to go into the CSR.
modules/javafx.graphics/src/main/java/javafx/scene/image/Image.java line 76:
> 74: * </ul>
> 75: *
> 76: * <p>Images can be resized as they are loaded (for example to reduce the amount of
Revert
modules/javafx.graphics/src/main/java/javafx/scene/image/Image.java line 619:
> 617: * Constructs an {@code Image} with content loaded from the specified URL.
> 618: *
> 619: * @param url a resource path, file path or URL
Please add a comma after `file path` (we prefer the Oxford comma in our docs).
modules/javafx.graphics/src/main/java/javafx/scene/image/Image.java line 632:
> 630: * using the specified parameters.
> 631: *
> 632: * @param url a resource path, file path or URL
Comma after `file path`
modules/javafx.graphics/src/main/java/javafx/scene/image/Image.java line 647:
> 645: * using the specified parameters.
> 646: *
> 647: * @param url a resource path, file path or URL
Comma after `file path`
-------------
PR: https://git.openjdk.java.net/jfx/pull/508
More information about the openjfx-dev
mailing list