diff options
| author | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-16 14:56:46 +0200 |
|---|---|---|
| committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-10-16 14:57:30 +0200 |
| commit | b297e0fa5c217c9467033b7c8b46891a52870120 (patch) | |
| tree | 43fc14689295e9e64f2719d05aad94e3049f6cd7 /Source/WebKit/chromium/src/WebPluginContainerImpl.cpp | |
| parent | 69d517dbfa69903d8593cc1737f0474b21e3251e (diff) | |
| download | qtwebkit-b297e0fa5c217c9467033b7c8b46891a52870120.tar.gz | |
Revert "Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)"
This reverts commit 5466563f4b5b6b86523e3f89bb7f77e5b5270c78.
Caused OOM issues on some CI machines :(
Diffstat (limited to 'Source/WebKit/chromium/src/WebPluginContainerImpl.cpp')
| -rw-r--r-- | Source/WebKit/chromium/src/WebPluginContainerImpl.cpp | 52 |
1 files changed, 6 insertions, 46 deletions
diff --git a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp index 689154058..5c164319e 100644 --- a/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp +++ b/Source/WebKit/chromium/src/WebPluginContainerImpl.cpp @@ -33,7 +33,6 @@ #include "Chrome.h" #include "ChromeClientImpl.h" -#include "ClipboardChromium.h" #include "ScrollbarGroup.h" #include "WebCursorInfo.h" #include "WebDataSourceImpl.h" @@ -74,7 +73,6 @@ #include <public/Platform.h> #include <public/WebClipboard.h> #include <public/WebCompositorSupport.h> -#include <public/WebDragData.h> #include <public/WebExternalTextureLayer.h> #include <public/WebRect.h> #include <public/WebString.h> @@ -117,13 +115,8 @@ void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRec if (!parent()) return; - FloatRect scaledDamageRect = damageRect; - float frameScaleFactor = m_element->document()->page()->mainFrame()->frameScaleFactor(); - scaledDamageRect.scale(frameScaleFactor); - scaledDamageRect.move(-frameRect().x() * (frameScaleFactor - 1), -frameRect().y() * (frameScaleFactor - 1)); - // Don't paint anything if the plugin doesn't intersect the damage rect. - if (!frameRect().intersects(enclosingIntRect(scaledDamageRect))) + if (!frameRect().intersects(damageRect)) return; gc->save(); @@ -139,7 +132,7 @@ void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRec WebCanvas* canvas = gc->platformContext()->canvas(); IntRect windowRect = - IntRect(view->contentsToWindow(enclosingIntRect(scaledDamageRect))); + IntRect(view->contentsToWindow(damageRect.location()), damageRect.size()); m_webPlugin->paint(canvas, windowRect); gc->restore(); @@ -660,16 +653,11 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) { ASSERT(parent()->isFrameView()); - if (event->isDragEvent()) { - handleDragEvent(event); - return; - } - // We cache the parent FrameView here as the plugin widget could be deleted // in the call to HandleEvent. See http://b/issue?id=1362948 FrameView* parentView = static_cast<FrameView*>(parent()); - WebMouseEventBuilder webEvent(this, m_element->renderer(), *event); + WebMouseEventBuilder webEvent(this, *event); if (webEvent.type == WebInputEvent::Undefined) return; @@ -708,35 +696,9 @@ void WebPluginContainerImpl::handleMouseEvent(MouseEvent* event) chromeClient->setCursorForPlugin(cursorInfo); } -void WebPluginContainerImpl::handleDragEvent(MouseEvent* event) -{ - ASSERT(event->isDragEvent()); - - WebDragStatus dragStatus = WebDragStatusUnknown; - if (event->type() == eventNames().dragenterEvent) - dragStatus = WebDragStatusEnter; - else if (event->type() == eventNames().dragleaveEvent) - dragStatus = WebDragStatusLeave; - else if (event->type() == eventNames().dragoverEvent) - dragStatus = WebDragStatusOver; - else if (event->type() == eventNames().dropEvent) - dragStatus = WebDragStatusDrop; - - if (dragStatus == WebDragStatusUnknown) - return; - - ClipboardChromium* clipboard = static_cast<ClipboardChromium*>(event->dataTransfer()); - WebDragData dragData = clipboard->dataObject(); - WebDragOperationsMask dragOperationMask = static_cast<WebDragOperationsMask>(clipboard->sourceOperation()); - WebPoint dragScreenLocation(event->screenX(), event->screenY()); - WebPoint dragLocation(event->absoluteLocation().x() - location().x(), event->absoluteLocation().y() - location().y()); - - m_webPlugin->handleDragStatusUpdate(dragStatus, dragData, dragOperationMask, dragLocation, dragScreenLocation); -} - void WebPluginContainerImpl::handleWheelEvent(WheelEvent* event) { - WebMouseWheelEventBuilder webEvent(this, m_element->renderer(), *event); + WebMouseWheelEventBuilder webEvent(this, *event); if (webEvent.type == WebInputEvent::Undefined) return; @@ -785,9 +747,7 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event) void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event) { - if (!m_isAcceptingTouchEvents) - return; - WebTouchEventBuilder webEvent(this, m_element->renderer(), *event); + WebTouchEventBuilder webEvent(this, *event); if (webEvent.type == WebInputEvent::Undefined) return; WebCursorInfo cursorInfo; @@ -798,7 +758,7 @@ void WebPluginContainerImpl::handleTouchEvent(TouchEvent* event) void WebPluginContainerImpl::handleGestureEvent(GestureEvent* event) { - WebGestureEventBuilder webEvent(this, m_element->renderer(), *event); + WebGestureEventBuilder webEvent(this, *event); if (webEvent.type == WebInputEvent::Undefined) return; WebCursorInfo cursorInfo; |
