< prev index next >

modules/javafx.web/src/main/native/Source/WebCore/platform/java/DragClientJava.cpp

Print this page

        

*** 131,151 **** const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint&, DataTransfer& DataTransfer, Frame&, ! 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;" ")V"); ASSERT(mid); static JGClass clsString(env->FindClass("java/lang/String")); static JGClass clsObject(env->FindClass("java/lang/Object")); --- 131,152 ---- const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint&, DataTransfer& DataTransfer, Frame&, ! 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,202 **** // 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; env->CallVoidMethod(m_webPage, mid, jimage, eventPos.x() - dragImageOrigin.x(), eventPos.y() - dragImageOrigin.y(), eventPos.x(), eventPos.y(), jobjectArray(jmimeTypes), ! jobjectArray(jvalues) ); CheckAndClearException(env); } } // namespace WebCore --- 188,206 ---- // 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), ! bool_to_jbool(isImageSource)); CheckAndClearException(env); } } // namespace WebCore
< prev index next >