Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8267551: Support loading images from inline data-URIs #508

Closed
wants to merge 21 commits into from

Conversation

mstr2
Copy link
Collaborator

@mstr2 mstr2 commented May 19, 2021

This PR adds support for loading images from inline data URIs, 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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8267551: Support loading images from inline data-URIs

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/508/head:pull/508
$ git checkout pull/508

Update a local copy of the PR:
$ git checkout pull/508
$ git pull https://git.openjdk.java.net/jfx pull/508/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 508

View PR using the GUI difftool:
$ git pr show -t 508

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/508.diff

@bridgekeeper
Copy link

bridgekeeper bot commented May 19, 2021

👋 Welcome back mstrauss! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@mstr2 mstr2 changed the title Support loading images from inline data-URIs 8267551: Support loading images from inline data-URIs May 21, 2021
@mstr2 mstr2 marked this pull request as ready for review May 21, 2021 17:53
@openjdk openjdk bot added the rfr Ready for review label May 21, 2021
@mlbridge
Copy link

mlbridge bot commented May 21, 2021

@kevinrushforth
Copy link
Member

/csr
/reviewers 2

@kevinrushforth
Copy link
Member

I'd like to see this documented somewhere in the Image class docs.

@openjdk openjdk bot added the csr Need approved CSR to integrate pull request label May 21, 2021
@openjdk
Copy link

openjdk bot commented May 21, 2021

@kevinrushforth has indicated that a compatibility and specification (CSR) request is needed for this pull request.
@mstr2 please create a CSR request for issue JDK-8267551. This pull request cannot be integrated until the CSR request is approved.

@openjdk
Copy link

openjdk bot commented May 21, 2021

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

@openjdk
Copy link

openjdk bot commented May 26, 2021

@mstr2 this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout feature/image-datauri
git fetch https://git.openjdk.java.net/jfx master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label May 26, 2021
# Conflicts:
#	modules/javafx.graphics/src/test/java/test/com/sun/javafx/iio/ImageStorageTest.java
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label May 26, 2021
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs updates look good, with a few minor comments.

@mstr2
Copy link
Collaborator Author

mstr2 commented Jun 5, 2021

Since this implementation doesn't surface any new API, it will not prevent us from removing it at any future time when the "data" protocol might be supported by the JDK.

@kevinrushforth kevinrushforth self-requested a review June 9, 2021 13:17
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs look good. I left one minor comment inline.

You can update the CSR when ready. As I mentioned in a comment in the CSR, the Specification section should consist of the diffs to the API documentation. Make sure you note what API element (e.g., class doc, Image(String url) constructor, and so forth) each change is for, if it isn't clear from the diffs. You can omit the removal of the </p> html tags and the change from example. to example: from the diffs in the CSR.

@mstr2
Copy link
Collaborator Author

mstr2 commented Jun 9, 2021

I've updated the CSR with the documentation diffs.

@kevinrushforth kevinrushforth self-requested a review June 11, 2021 21:38
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed and tested the implementation. I left a couple questions inline.

@mstr2
Copy link
Collaborator Author

mstr2 commented Jun 14, 2021

Made changes as per review.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

I reviewed the CSR, so you can move that to Finalized now.

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me too.

@openjdk openjdk bot removed the csr Need approved CSR to integrate pull request label Jun 17, 2021
@openjdk
Copy link

openjdk bot commented Jun 17, 2021

@mstr2 This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8267551: Support loading images from inline data-URIs

Reviewed-by: kcr, arapte

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 11 new commits pushed to the master branch:

  • 98138c8: 8268219: hlsprogressbuffer should provide PTS after GStreamer update
  • c81a722: 8264139: Suppress removal warnings for Security Manager methods
  • 0ffa8e2: 8244075: Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene
  • e6cf1df: 8267094: TreeCell: cancelEvent must return correct editing location
  • ca25036: 8267858: Document that title property in WebEngine gets updated asynchronously
  • 59cf4de: 8267505: {List,Set,Map}PropertyBase::bind should check against identity
  • fe81b9c: 8268120: Allow hardware cursor to be used on Monocle-EGL platforms
  • ee03238: 8268152: gstmpegaudioparse does not provides timestamps for HLS MP3 streams
  • 47700d8: 8267819: CoInitialize/CoUninitialize should be called on same thread
  • 526f990: 8239138: StyleManager should use a BufferedInputStream
  • ... and 1 more: https://git.openjdk.java.net/jfx/compare/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kevinrushforth, @arapte) but any other Committer may sponsor as well.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Ready to be integrated label Jun 17, 2021
@mstr2
Copy link
Collaborator Author

mstr2 commented Jun 17, 2021

/integrate

@openjdk openjdk bot added the sponsor Ready to sponsor label Jun 17, 2021
@openjdk
Copy link

openjdk bot commented Jun 17, 2021

@mstr2
Your change (at version 8023fb8) is now ready to be sponsored by a Committer.

@kevinrushforth
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jun 17, 2021

Going to push as commit 171e484.
Since your change was applied there have been 11 commits pushed to the master branch:

  • 98138c8: 8268219: hlsprogressbuffer should provide PTS after GStreamer update
  • c81a722: 8264139: Suppress removal warnings for Security Manager methods
  • 0ffa8e2: 8244075: Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene
  • e6cf1df: 8267094: TreeCell: cancelEvent must return correct editing location
  • ca25036: 8267858: Document that title property in WebEngine gets updated asynchronously
  • 59cf4de: 8267505: {List,Set,Map}PropertyBase::bind should check against identity
  • fe81b9c: 8268120: Allow hardware cursor to be used on Monocle-EGL platforms
  • ee03238: 8268152: gstmpegaudioparse does not provides timestamps for HLS MP3 streams
  • 47700d8: 8267819: CoInitialize/CoUninitialize should be called on same thread
  • 526f990: 8239138: StyleManager should use a BufferedInputStream
  • ... and 1 more: https://git.openjdk.java.net/jfx/compare/7b7050c46299c0e6771ae02fbb5ceaf22104d3e4...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 17, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Ready to be integrated rfr Ready for review sponsor Ready to sponsor labels Jun 17, 2021
@openjdk
Copy link

openjdk bot commented Jun 17, 2021

@kevinrushforth @mstr2 Pushed as commit 171e484.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@mstr2 mstr2 deleted the feature/image-datauri branch January 22, 2023 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants