Re: RFR: 8267551: Support loading images from inline data-URIs [v19]

2021-06-16 Thread Ambarish Rapte
On Mon, 14 Jun 2021 08:50:25 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v19]

2021-06-14 Thread Kevin Rushforth
On Mon, 14 Jun 2021 08:50:25 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v19]

2021-06-14 Thread Michael Strauß
On Mon, 14 Jun 2021 08:50:25 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v19]

2021-06-14 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v18]

2021-06-14 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v17]

2021-06-12 Thread Kevin Rushforth
On Wed, 9 Jun 2021 14:20:41 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v17]

2021-06-09 Thread Michael Strauß
On Wed, 9 Jun 2021 14:20:41 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v16]

2021-06-09 Thread Michael Strauß
On Wed, 9 Jun 2021 13:18:29 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> added comment, simplified DataURI.matchScheme() > >

Re: RFR: 8267551: Support loading images from inline data-URIs [v17]

2021-06-09 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v16]

2021-06-09 Thread Kevin Rushforth
On Sat, 5 Jun 2021 17:31:17 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 16:12:36 GMT, Kevin Rushforth wrote: >> `resource` is never `null` at this point, and it is already trimmed. Also, >> contrary to the comment, I cannot see this method being used anywhere in >> tests, so I made it private. > > If that is guaranteed by all callers of this

Re: RFR: 8267551: Support loading images from inline data-URIs [v16]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 17:31:17 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 22:00:03 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 15:52:01 GMT, Kevin Rushforth wrote: >> My idea was to avoid repeatedly allocating a new String with the data >> contained in the URI. Since `matchScheme` is called at least twice (maybe >> more), that would be a total of at least three copies of the URI data until >> we

Re: RFR: 8267551: Support loading images from inline data-URIs [v16]

2021-06-05 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 17:10:29 GMT, John Hendrikx wrote: >> Maybe add a brief comment to that effect? > > Ok clear thanks I added a comment that explains that. - PR: https://git.openjdk.java.net/jfx/pull/508

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread John Hendrikx
On Sat, 5 Jun 2021 16:10:59 GMT, Kevin Rushforth wrote: >> In this specific case, image loading has failed for some reason. The call to >> `DataURI.tryParse` is only there to potentially call `DataURI.toString()` >> for a truncated log output, instead of logging the entire `url` String. If >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v15]

2021-06-05 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v14]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:42:22 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:44:38 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/javafx/css/converter/URLConverter.java >> line 98: >> >>> 96: } >>> 97: >>> 98: private URL resolve(String stylesheetUrl, String resource) { >> >> Why was this change done? It seems

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:49:16 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/css/StyleManager.java >> line 776: >> >>> 774: } else { >>> 775: logger.warning("Error loading >>> image: " +

Re: RFR: 8267551: Support loading images from inline data-URIs [v14]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:42:22 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:08:29 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/util/DataURI.java line >> 185: >> >>> 183: >>> 184: return originalUri.substring(0, originalUri.length() - >>> originalData.length()) >>> 185: +

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 15:17:09 GMT, Michael Strauß wrote: >> In that case, it might be clearer and simpler to just call `trim()` on the >> input String before doing anything with it, unless there is a reason not to. > > My idea was to avoid repeatedly allocating a new String with the data >

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 08:21:14 GMT, John Hendrikx wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 22:09:09 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v14]

2021-06-05 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 22:14:12 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 22:06:31 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Sat, 5 Jun 2021 15:07:36 GMT, Kevin Rushforth wrote: >> I implemented it in this way so that this requirement is not imposed onto >> the caller, similar to `java.net.URL` does not impose this requirement onto >> its callers. I can imagine that `DataURI` might be used in other places, so >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 22:03:26 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Kevin Rushforth
On Sat, 5 Jun 2021 14:56:15 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/util/DataURI.java line >> 47: >> >>> 45: } >>> 46: >>> 47: int firstNonWhitespace = 0, length = uri.length(); >> >> Why do you need to trim leading spaces? The input

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 21:59:28 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 21:56:32 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread Michael Strauß
On Fri, 4 Jun 2021 21:54:12 GMT, Kevin Rushforth wrote: >> Michael Strauß has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 15 commits: >> >> - Merge branch 'master' into feature/image-datauri >> >># Conflicts: >># >>

Re: RFR: 8267551: Support loading images from inline data-URIs

2021-06-05 Thread Michael Strauß
That's a good question, and probably a valid approach. However, while app developers are certainly used to depending on third-party libraries for things like additional controls, I think it's questionable whether it's a good developer experience to needing to rely on the third-party ecosystem for

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-05 Thread John Hendrikx
On Wed, 26 May 2021 16:36:24 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs

2021-06-05 Thread John Hendrikx
I have a question about this. Why would you make this part of JavaFX directly instead of offering it as a dependency that people can include in their project? As far as I know, it is possible to register custom URL handlers in Java, which should be used automatically by JavaFX assuming it

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-06-04 Thread Kevin Rushforth
On Wed, 26 May 2021 16:36:24 GMT, Michael Strauß 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,

Re: RFR: 8267551: Support loading images from inline data-URIs [v13]

2021-05-26 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v12]

2021-05-26 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v11]

2021-05-25 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v10]

2021-05-24 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v9]

2021-05-22 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v8]

2021-05-22 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v7]

2021-05-22 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v6]

2021-05-22 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v5]

2021-05-21 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v4]

2021-05-21 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v3]

2021-05-21 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs [v2]

2021-05-21 Thread Michael Strauß
> 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

Re: RFR: 8267551: Support loading images from inline data-URIs

2021-05-21 Thread Kevin Rushforth
On Wed, 19 May 2021 20:24:31 GMT, Michael Strauß 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

RFR: 8267551: Support loading images from inline data-URIs

2021-05-21 Thread Michael Strauß
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.