From 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:15 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- WebCore/dom/Clipboard.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'WebCore/dom/Clipboard.cpp') diff --git a/WebCore/dom/Clipboard.cpp b/WebCore/dom/Clipboard.cpp index 152f403..f7a52ef 100755 --- a/WebCore/dom/Clipboard.cpp +++ b/WebCore/dom/Clipboard.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. + * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -30,7 +30,6 @@ #include "Frame.h" #include "FrameLoader.h" #include "Image.h" -#include "PluginInfoStore.h" namespace WebCore { @@ -124,15 +123,20 @@ void Clipboard::setDestinationOperation(DragOperation op) void Clipboard::setDropEffect(const String &effect) { - if (m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable) { + if (!m_forDragging) + return; + + if (m_policy == ClipboardReadable || m_policy == ClipboardTypesReadable) m_dropEffect = effect; - } } void Clipboard::setEffectAllowed(const String &effect) { + if (!m_forDragging) + return; + if (m_policy == ClipboardWritable) m_effectAllowed = effect; } -} +} // namespace WebCore -- cgit v1.1