chromiumembedded / java-cef

Java Chromium Embedded Framework (JCEF). A simple framework for embedding Chromium-based browsers in other applications using the Java programming language.
https://bitbucket.org/chromiumembedded/java-cef
Other
605 stars 135 forks source link

Missing dragend events on Linux with OSR #429

Closed magreenblatt closed 1 year ago

magreenblatt commented 1 year ago

Original report by Dave Tarkowski (Bitbucket: David Tarkowski).


With JCEF build from the current version as of 20-Dec-2022 I am not seeing dragend events with running on linux64 with off-screen rendering enabled.

Reproduction steps:

  1. Get and build the current version of JCEF
  2. Start the detailed test: ”run.sh linux64 Release detailed --off-screen-rendering-enabled”
  3. Navigate to https://jsfiddle.net/cb9d6swf/
  4. Drag the “This div is draggable” div to another of the purple squares. When the drag starts, you will see the background going to 50% opacity and appearing purple. When you drop the div on one of the purple targets, the background should revert to white, but it does not.

This works fine in the detailed test with windowed rendering available. It also works fine in the current version of Chromium run with a default configuration.

magreenblatt commented 1 year ago

Testing with openjdk11 on Ubuntu 18, when dragging/dropping the element:

With off-screen rendering:

DRAG:
  flags: MOVE
  CefDragData_N [isLink()=false, isFragment()=true, isFile()=false, getLinkURL()=, getLinkTitle()=, getLinkMetadata()=, getFragmentText()=null, getFragmentHtml()=, getFragmentBaseURL()=, getFileName()=, getFileNames(vector)={}]
[0124/103230.095439:ERROR:validation_errors.cc(117)] Invalid message: VALIDATION_ERROR_UNKNOWN_ENUM_VALUE
[0124/103230.096043:ERROR:interface_endpoint_client.cc(695)] Message [282818484 (bb)](https://bitbucket.org/chromiumembedded/java-cef/commits/282818484) rejected by interface blink.mojom.FrameWidget

Without off-screen rendering:

DRAG:
  flags: COPY LINK MOVE
  CefDragData_N [isLink()=false, isFragment()=true, isFile()=false, getLinkURL()=, getLinkTitle()=, getLinkMetadata()=, getFragmentText()=null, getFragmentHtml()=, getFragmentBaseURL()=, getFileName()=, getFileNames(vector)={}]
[0124/103054.756520:INFO:CONSOLE(70)] "hi", source: https://fiddle.jshell.net/cb9d6swf/show/?editor_console= (70)

magreenblatt commented 1 year ago

Comparing events between JCEF OSR and cefclient OSR for the drag/drop operation:

JCEF:

dragTargetDragEnter modifiers=2 allowedOps=16
dragTargetDragOver modifiers=2 allowedOps=16
dragTargetDragOver modifiers=2 allowedOps=16
...
dragTargetDrop modifiers=2
dragSourceEndedAt operation=-1
dragSourceSystemDragEnded

cefclient:

DragTargetDragEnter allowed_ops=4294967295
DragTargetDragOver allowed_ops=1
DragTargetDragOver allowed_ops=1
...
DragTargetDragEnter allowed_ops=1
DragTargetDragOver allowed_ops=1
DragTargetDrop
DragSourceEndedAt drag_operation_=1
DragSourceSystemDragEnded

magreenblatt commented 1 year ago

Fix action for OSR drop event (fixes issue #429)

→ <<cset 854af1fb3da9 (bb)>>

magreenblatt commented 1 year ago