On Mon, 19 Aug 2024 18:14:53 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Hima Bindu Meda has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove duplicate call
>
> modules/javafx.web/src/main/native/Source/WebKitLegacy/java/WebCoreSupport/WebPage.cpp
>  line 2254:
> 
>> 2252:             return 0;
>> 2253:         case com_sun_webkit_WebPage_DND_DST_ENTER:
>> 2254:             return 
>> dragOperationToDragCursor(std::get<std::optional<WebCore::DragOperation>>(dc.dragEnteredOrUpdated(*localMainFrame,
>>  WTFMove(dragData))));
> 
> This is identical to the body of the two cases below. It might be clearer to 
> remove this return statement (line 2254) to avoid duplication.
> 
> Speaking of which, I presume that it is intentional to call 
> `dragOperationToDragCursor` for all three of `DND_DST_ENTER`, `DND_DST_OVER`, 
> and `DND_DST_CHANGE`?

Yes, removed the duplicate call. In webkit-617.1, there were  calls to 
**dragEntered**  and **dragUpdated** for DND calls as follows:

      ` case com_sun_webkit_WebPage_DND_DST_ENTER:
            return 
dragOperationToDragCursor(dc.dragEntered(WTFMove(dragData)));`

       `case com_sun_webkit_WebPage_DND_DST_OVER:
        case com_sun_webkit_WebPage_DND_DST_CHANGE:
            return 
dragOperationToDragCursor(dc.dragUpdated(WTFMove(dragData)));`

In the current webkit-619.1 update, there has been refactoring and the apis 
**dragEntered**  and **dragUpdated** have been removed and instead 
**dragEnteredOrUpdated** has been used.  For our JAVA port adaptation, these 
changes have been missed and hence, the issue is observed. This fix addresses 
the issue.

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1538#discussion_r1723371767

Reply via email to