< prev index next >
modules/javafx.web/src/main/native/Source/WebCore/platform/java/DragClientJava.cpp
Print this page
@@ -131,21 +131,22 @@
const IntPoint& dragImageOrigin,
const IntPoint& eventPos,
const FloatPoint&,
DataTransfer& DataTransfer,
Frame&,
- DragSourceAction)
+ DragSourceAction dragSourceAction)
{
JNIEnv* env = WebCore_GetJavaEnv();
static jmethodID mid = env->GetMethodID(
PG_GetWebPageClass(env),
"fwkStartDrag", "("
"Ljava/lang/Object;"
"II"
"II"
"[Ljava/lang/String;"
"[Ljava/lang/Object;"
+ "Z"
")V");
ASSERT(mid);
static JGClass clsString(env->FindClass("java/lang/String"));
static JGClass clsObject(env->FindClass("java/lang/Object"));
@@ -187,16 +188,19 @@
// Attention! [jimage] can be the instance of WCImage or WCImageFrame class.
// The nature of raster is too different to make a conversion inside the native code.
jobject jimage = dragImage.get() && dragImage.get()->javaImage()
? jobject(*(dragImage.get()->javaImage())) : nullptr;
+ bool isImageSource = dragSourceAction & DragSourceActionImage;
+
env->CallVoidMethod(m_webPage, mid, jimage,
eventPos.x() - dragImageOrigin.x(),
eventPos.y() - dragImageOrigin.y(),
eventPos.x(),
eventPos.y(),
jobjectArray(jmimeTypes),
- jobjectArray(jvalues) );
+ jobjectArray(jvalues),
+ bool_to_jbool(isImageSource));
CheckAndClearException(env);
}
} // namespace WebCore
< prev index next >