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

8202990: javafx webview css filter property with display scaling #279

Closed
wants to merge 6 commits into from

Conversation

@bhaweshkc
Copy link
Collaborator

@bhaweshkc bhaweshkc commented Aug 11, 2020

ImageJava.cpp ignores CompositeOperator parameter in drawImage function due to which shadow was getting drawn on top of actual image. apply given composite operator to graphics context before drawing image to fix this issue. another issue is into WCGraphicsPrismContext.java. while blending two layers, applying state to the destination layer was missed due to which image was not getting drawn with right scale in hidpi mode. apply state to fix the issue.


Progress

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

Issue

  • JDK-8202990: javafx webview css filter property with display scaling

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jfx pull/279/head:pull/279
$ git checkout pull/279

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Aug 11, 2020

👋 Welcome back bchoudhary! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

bhaweshkc added 2 commits Aug 11, 2020
@openjdk openjdk bot added the rfr label Aug 11, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Aug 11, 2020

Webrevs

Copy link
Member

@kevinrushforth kevinrushforth left a comment

With your patch installed, I see a race condition that manifests in one of two ways:

  • If I load the new .html file with HelloWebView, I see the shadow most of the time, but it is missing some of the time.
  • The new unit test crashes intermittently

I suspect this might be related to the gc.setCompositeOperation call. Are you certain this is being done on the right thread?

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Aug 12, 2020

/reviewers 2

@openjdk
Copy link

@openjdk openjdk bot commented Aug 12, 2020

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

@arun-Joseph
Copy link
Member

@arun-Joseph arun-Joseph commented Aug 26, 2020

With your patch installed, I see a race condition that manifests in one of two ways:

I couldn't reproduce the race condition or crash with the fix.

I suspect this might be related to the gc.setCompositeOperation call.

This may not be the cause as the compositeOperator is pushed to a RenderQueue which is decoded from the java side.

@kevinrushforth kevinrushforth self-requested a review Aug 26, 2020
Copy link
Member

@arun-Joseph arun-Joseph left a comment

The fix and test looks good.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Aug 29, 2020

I spent some time this afternoon going over the fix in more detail and doing extensive testing on both Windows and Mac.

I believe the fix is good. Both by inspection and by instrumenting the code, there are no race conditions or other problems that I can see.

The problem appears to be in the test, or else somewhere in the test harness or the SW pipeline exposed by the test. If I run the new CSSTest in a loop on either Mac or Windows, it will crash intermittently. I then reverted your fix, running the new test (which will throw an expected assertion error), and it still crashes intermittently.

My recommendation is to use a system test, similar to what SVGTest.java does, rather than a unit test in the javafx.web module, which uses WebPage::paint.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Aug 31, 2020

I believe that the problem noted above is with the test harness, specifically the WebPageShim::paint method. I filed JDK-8252596 to track fixing the tests.

So the fix for this PR should avoid using it, as suggested above.

@bhaweshkc bhaweshkc requested a review from arun-Joseph Sep 1, 2020
Copy link
Member

@kevinrushforth kevinrushforth left a comment

Looks good. I verified that the system test still catches the bug (that is, it fails without the fix and passes with the fix). I ran it in a loop 100 times on both Mac and Windows without crashing.

@bhaweshkc bhaweshkc requested review from kevinrushforth and arun-Joseph Sep 3, 2020
Copy link
Member

@arun-Joseph arun-Joseph left a comment

The fix and test looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Sep 3, 2020

@bhaweshkc This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type /integrate in a new comment to proceed. After integration, the commit message will be:

8202990: javafx webview css filter property with display scaling

Reviewed-by: kcr, ajoseph
  • If you would like to add a summary, use the /summary command.
  • To credit additional contributors, use the /contributor command.
  • To add additional solved issues, use the /issue command.

Since the source branch of this PR was last updated there have been 18 commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid automatic rebasing, please merge master into your branch, and then specify the current head hash when integrating, like this: /integrate a5ecfb68105d3f7dbde8bc08bdbe52164e42743c.

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, @arun-Joseph) 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 label Sep 3, 2020
@bhaweshkc
Copy link
Collaborator Author

@bhaweshkc bhaweshkc commented Sep 3, 2020

/integrate

@openjdk openjdk bot added the sponsor label Sep 3, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 3, 2020

@bhaweshkc
Your change (at version 62dc459) is now ready to be sponsored by a Committer.

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented Sep 3, 2020

/sponsor

@openjdk openjdk bot closed this Sep 3, 2020
@openjdk openjdk bot added integrated and removed sponsor ready rfr labels Sep 3, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Sep 3, 2020

@kevinrushforth @bhaweshkc The following commits have been pushed to master since your change was applied:

  • a5ecfb6: 8252387: Deprecate for removal css Selector and ShapeConverter constructors
  • 8e3616c: 8252062: WebKit build fails with recent VS 2019 compiler
  • 87ad57f: 8251858: Update to Xcode 11.3.1
  • 88c0f97: 8252381: Cherry pick GTK WebKit 2.28.4 changes
  • c86bd35: 8251941: ListCell: visual artifact when items contain null values
  • 23ad8f4: 8251353: Many javafx scenegraph classes have implicit no-arg constructors
  • 7a4bd9b: 8252060: gstreamer fails to build with gcc 10
  • ddf8814: 8251555: Remove unused focusedWindow field in glass Window to avoid leak
  • c3fb321: 8252107: Media pipeline initialization can crash if audio or video bin state change fails
  • eb9886a: Merge
  • 41ff3fa: 8249537: Update copyright header for files modified in 2020
  • 85821ca: 8251241: macOS: iconify property doesn't change after minimize when resizable is false
  • b25ffc7: 8251352: Many javafx.base classes have implicit no-arg constructors
  • 2aed5ad: 8240969: WebView does not allow to load style sheet in modularized applications
  • 1c54e61: 8241840: Memoryleak: Closed focused Stages are not collected with Monocle.
  • f50d218: Merge
  • 208d828: 8228570: Add various documentation clarifications
  • 7a8708b: 8250799: NumberStringConverter and its subclasses are missing documentation for all their constructors

Your commit was automatically rebased without conflicts.

Pushed as commit 3cb3ca8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants