WebCore:
[WebKit-https.git] / WebKit / WebView.subproj / WebDefaultUIDelegate.m
index 823e967598ae2ff403a42b82c08e19c3649c5bd4..c830c038fb9348329cfe68972c32d012602f7907 100644 (file)
@@ -10,6 +10,7 @@
 #import <WebKit/WebJavaScriptTextInputPanel.h>
 #import <WebKit/WebView.h>
 #import <WebKit/WebUIDelegatePrivate.h>
+#import <WebKit/DOM.h>
 
 @interface NSApplication (DeclarationStolenFromAppKit)
 - (void)_cycleWindowsReversed:(BOOL)reversed;
@@ -189,6 +190,10 @@ static WebDefaultUIDelegate *sharedDelegate = nil;
 
 - (unsigned)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point;
 {
+    DOMElement *elementAtPoint = [[webView elementAtPoint:point] objectForKey:WebElementDOMNodeKey];
+    if ([elementAtPoint respondsToSelector:@selector(isContentEditable)] && [(id)elementAtPoint isContentEditable])
+        return (WebDragSourceActionAny & ~WebDragSourceActionLink);
+
     return WebDragSourceActionAny;
 }