RFR: 8277133: Dragboard contents retrieved all over again during a DND process on WebView
Kevin Rushforth
kcr at openjdk.java.net
Wed Nov 24 17:29:14 UTC 2021
On Wed, 24 Nov 2021 10:35:50 GMT, Jose Pereda <jpereda at openjdk.org> wrote:
> This PR improves drag and drop events on a WebView node, by generating the content from the dragboard only when the drag events starts, and not for every drag over event.
>
> A manual test is included that shows how the drag and drop experience improves, especially when dragging online images, as the time between each consecutive drag over event drops from hundreds of ms to tens of ms or even lower.
>
> This PR is somehow blocked by #668, as dragging some images fails on macOS.
The fix looks good with one question, although it's likely fine as is. The manual test looks good, too (with one minor formatting issue).
modules/javafx.web/src/main/java/javafx/scene/web/WebView.java line 1291:
> 1289: setOnDragDone(event -> {
> 1290: mimes = null;
> 1291: values = null;
Is it possible for `OnDragDone` to be missed? If so, I wonder if it is a good idea to also set `mimes` and `values` to `null` in the `OnDragDetected` handler?
tests/manual/web/dnd/drag.html line 13:
> 11: </a>
> 12: </body>
> 13: </html>
Minor: missing newline at end of file.
-------------
PR: https://git.openjdk.java.net/jfx/pull/680
More information about the openjfx-dev
mailing list