Skip to content
Permalink
Browse files
[BlackBerry] Upstream BlackBerry WebCoreSupport drag client and conte…
…xt menu client

https://bugs.webkit.org/show_bug.cgi?id=74643

Patch by Jacky Jiang <zhajiang@rim.com> on 2011-12-15
Reviewed by Rob Buis.

Initial upstream, no new tests.

* blackberry/WebCoreSupport/ContextMenuClientBlackBerry.cpp: Added.
* blackberry/WebCoreSupport/ContextMenuClientBlackBerry.h: Added.
* blackberry/WebCoreSupport/DragClientBlackBerry.cpp: Added.
* blackberry/WebCoreSupport/DragClientBlackBerry.h: Added.

Canonical link: https://commits.webkit.org/91386@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@103022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Jacky Jiang authored and webkit-commit-queue committed Dec 16, 2011
1 parent 873f040 commit 559875f8b180b589e8375229dd7b1e03f1e7c172
@@ -1,3 +1,17 @@
2011-12-15 Jacky Jiang <zhajiang@rim.com>

[BlackBerry] Upstream BlackBerry WebCoreSupport drag client and context menu client
https://bugs.webkit.org/show_bug.cgi?id=74643

Reviewed by Rob Buis.

Initial upstream, no new tests.

* blackberry/WebCoreSupport/ContextMenuClientBlackBerry.cpp: Added.
* blackberry/WebCoreSupport/ContextMenuClientBlackBerry.h: Added.
* blackberry/WebCoreSupport/DragClientBlackBerry.cpp: Added.
* blackberry/WebCoreSupport/DragClientBlackBerry.h: Added.

2011-12-15 Jacky Jiang <zhajiang@rim.com>

[BlackBerry] Regression: lots of checkerboarding
@@ -0,0 +1,74 @@
/*
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
* Copyright (C) 2011 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "config.h"
#include "ContextMenuClientBlackBerry.h"

#include "NotImplemented.h"

namespace WebCore {

void ContextMenuClientBlackBerry::contextMenuDestroyed()
{
delete this;
}

void* ContextMenuClientBlackBerry::getCustomMenuFromDefaultItems(ContextMenu*)
{
notImplemented();
return 0;
}

void ContextMenuClientBlackBerry::contextMenuItemSelected(ContextMenuItem*, const ContextMenu*)
{
notImplemented();
}

void ContextMenuClientBlackBerry::downloadURL(const KURL&)
{
notImplemented();
}

void ContextMenuClientBlackBerry::searchWithGoogle(const Frame*)
{
notImplemented();
}

void ContextMenuClientBlackBerry::lookUpInDictionary(Frame*)
{
notImplemented();
}

bool ContextMenuClientBlackBerry::isSpeaking()
{
notImplemented();
return false;
}

void ContextMenuClientBlackBerry::speak(const String&)
{
notImplemented();
}

void ContextMenuClientBlackBerry::stopSpeaking()
{
notImplemented();
}

} // namespace WebCore
@@ -0,0 +1,42 @@
/*
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
* Copyright (C) 2011 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef ContextMenuClientBlackBerry_h
#define ContextMenuClientBlackBerry_h

#include "ContextMenuClient.h"

namespace WebCore {

class ContextMenuClientBlackBerry : public ContextMenuClient {
public:
virtual void contextMenuDestroyed();
virtual void* getCustomMenuFromDefaultItems(ContextMenu*);
virtual void contextMenuItemSelected(ContextMenuItem*, const ContextMenu*);
virtual void downloadURL(const KURL&);
virtual void searchWithGoogle(const Frame*);
virtual void lookUpInDictionary(Frame*);
virtual bool isSpeaking();
virtual void speak(const String&);
virtual void stopSpeaking();
};

} // WebCore

#endif // ContextMenuClientBlackBerry_h
@@ -0,0 +1,59 @@
/*
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
* Copyright (C) 2011 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#include "config.h"
#include "DragClientBlackBerry.h"

#include "NotImplemented.h"

namespace WebCore {

void DragClientBlackBerry::willPerformDragDestinationAction(DragDestinationAction, DragData*)
{
notImplemented();
}

void DragClientBlackBerry::willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*)
{
notImplemented();
}

DragDestinationAction DragClientBlackBerry::actionMaskForDrag(DragData*)
{
notImplemented();
return DragDestinationActionNone;
}

DragSourceAction DragClientBlackBerry::dragSourceActionMaskForPoint(const IntPoint&)
{
notImplemented();
return DragSourceActionNone;
}

void DragClientBlackBerry::startDrag(void*, const IntPoint&, const IntPoint&, Clipboard*, Frame*, bool)
{
notImplemented();
}

void DragClientBlackBerry::dragControllerDestroyed()
{
delete this;
}

} // namespace WebCore
@@ -0,0 +1,39 @@
/*
* Copyright (C) 2009 Torch Mobile Inc. http://www.torchmobile.com/
* Copyright (C) 2011 Research In Motion Limited. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

#ifndef DragClientBlackBerry_h
#define DragClientBlackBerry_h

#include "DragClient.h"

namespace WebCore {

class DragClientBlackBerry : public DragClient {
public:
virtual void willPerformDragDestinationAction(DragDestinationAction, DragData*);
virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, Clipboard*);
virtual DragDestinationAction actionMaskForDrag(DragData*);
virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&);
virtual void startDrag(void* dragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, Clipboard*, Frame*, bool linkDrag = false);
virtual void dragControllerDestroyed();
};

} // WebCore

#endif // DragClientBlackBerry_h

0 comments on commit 559875f

Please sign in to comment.