summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-08-12 09:27:39 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-08-12 09:27:39 +0200
commit3749d61e1f7a59f5ec5067e560af1eb610c82015 (patch)
tree73dc228333948738bbe02976cacca8cd382bc978 /Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
parentb32b4dcd9a51ab8de6afc53d9e17f8707e1f7a5e (diff)
downloadqtwebkit-3749d61e1f7a59f5ec5067e560af1eb610c82015.tar.gz
Imported WebKit commit a77350243e054f3460d1137301d8b3faee3d2052 (http://svn.webkit.org/repository/webkit/trunk@125365)
New snapshot with build fixes for latest API changes in Qt and all WK1 Win MSVC fixes upstream
Diffstat (limited to 'Source/WebKit/chromium/src/WebPluginContainerImpl.cpp')
-rw-r--r--Source/WebKit/chromium/src/WebPluginContainerImpl.cpp38
1 files changed, 28 insertions, 10 deletions
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 29489e25a..71361780b 100644
--- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -39,14 +39,7 @@
#include "WebElement.h"
#include "WebInputEvent.h"
#include "WebInputEventConversion.h"
-#include "WebKit.h"
#include "WebPlugin.h"
-#include "platform/WebRect.h"
-#include "platform/WebString.h"
-#include "platform/WebURL.h"
-#include "platform/WebURLError.h"
-#include "platform/WebURLRequest.h"
-#include "platform/WebVector.h"
#include "WebViewImpl.h"
#include "WrappedResourceResponse.h"
@@ -56,6 +49,7 @@
#include "Frame.h"
#include "FrameLoadRequest.h"
#include "FrameView.h"
+#include "GestureEvent.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
#include "HostWindow.h"
@@ -77,6 +71,12 @@
#include "WheelEvent.h"
#include <public/Platform.h>
#include <public/WebClipboard.h>
+#include <public/WebRect.h>
+#include <public/WebString.h>
+#include <public/WebURL.h>
+#include <public/WebURLError.h>
+#include <public/WebURLRequest.h>
+#include <public/WebVector.h>
#if ENABLE(GESTURE_EVENTS)
#include "PlatformGestureEvent.h"
@@ -188,6 +188,8 @@ void WebPluginContainerImpl::handleEvent(Event* event)
handleKeyboardEvent(static_cast<KeyboardEvent*>(event));
else if (eventNames().isTouchEventType(event->type()))
handleTouchEvent(static_cast<TouchEvent*>(event));
+ else if (eventNames().isGestureEventType(event->type()))
+ handleGestureEvent(static_cast<GestureEvent*>(event));
// FIXME: it would be cleaner if Widget::handleEvent returned true/false and
// HTMLPluginElement called setDefaultHandled or defaultEventHandler.
@@ -557,6 +559,11 @@ bool WebPluginContainerImpl::getFormValue(String& value)
return false;
}
+bool WebPluginContainerImpl::supportsKeyboardFocus() const
+{
+ return m_webPlugin->supportsKeyboardFocus();
+}
+
void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver* observer)
{
size_t pos = m_pluginLoadObservers.find(observer);
@@ -566,12 +573,12 @@ void WebPluginContainerImpl::willDestroyPluginLoadObserver(WebPluginLoadObserver
}
#if USE(ACCELERATED_COMPOSITING)
-WebCore::LayerChromium* WebPluginContainerImpl::platformLayer() const
+WebLayer* WebPluginContainerImpl::platformLayer() const
{
if (m_textureId)
- return m_textureLayer.unwrap<LayerChromium>();
+ return const_cast<WebExternalTextureLayer*>(&m_textureLayer);
if (m_ioSurfaceId)
- return m_ioSurfaceLayer.unwrap<LayerChromium>();
+ return const_cast<WebIOSurfaceLayer*>(&m_ioSurfaceLayer);
return 0;
}
#endif
@@ -736,6 +743,17 @@ void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event)
// FIXME: Can a plugin change the cursor from a touch-event callback?
}
+void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event)
+{
+ WebGestureEventBuilder webEvent(this, *event);
+ if (webEvent.type == WebInputEvent::Undefined)
+ return;
+ WebCursorInfo cursorInfo;
+ if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
+ event->setDefaultHandled();
+ // FIXME: Can a plugin change the cursor from a touch-event callback?
+}
+
void WebPluginContainerImpl::calculateGeometry(const IntRect& frameRect,
IntRect& windowRect,
IntRect& clipRect,