Skip to content
Permalink
Browse files
Don't assert when clicking on a plug-in in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42762

Reviewed by Sam Weinig.

WebCore:

Remove a now invalid assert and return false instead.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passMouseDownEventToWidget):

WebKit2:

Add stub for PluginView::handleEvent.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
* WebProcess/Plugins/PluginView.h:

Canonical link: https://commits.webkit.org/54683@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@63846 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Anders Carlsson committed Jul 21, 2010
1 parent 8dc6dbf commit 0ec4ec04aa70fed26915e3058c3ae4d09db3c6a4
Showing with 37 additions and 1 deletion.
  1. +12 −0 WebCore/ChangeLog
  2. +5 −1 WebCore/page/mac/EventHandlerMac.mm
  3. +13 −0 WebKit2/ChangeLog
  4. +6 −0 WebKit2/WebProcess/Plugins/PluginView.cpp
  5. +1 −0 WebKit2/WebProcess/Plugins/PluginView.h
@@ -1,3 +1,15 @@
2010-07-21 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Don't assert when clicking on a plug-in in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42762

Remove a now invalid assert and return false instead.

* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::passMouseDownEventToWidget):

2010-07-21 Anton Muhin <antonm@chromium.org>

Reviewed by Adam Barth.
@@ -215,10 +215,14 @@ static bool lastEventIsMouseUp()
return true;
}

// In WebKit2 we will never have an NSView. Just return early and let the regular event handler machinery take care of
// dispatching the event.
if (!widget->platformWidget())
return false;

BEGIN_BLOCK_OBJC_EXCEPTIONS;

NSView *nodeView = widget->platformWidget();
ASSERT(nodeView);
ASSERT([nodeView superview]);
NSView *view = [nodeView hitTest:[[nodeView superview] convertPoint:[currentNSEvent() locationInWindow] fromView:nil]];
if (!view) {
@@ -1,3 +1,16 @@
2010-07-21 Anders Carlsson <andersca@apple.com>

Reviewed by Sam Weinig.

Don't assert when clicking on a plug-in in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=42762

Add stub for PluginView::handleEvent.

* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
* WebProcess/Plugins/PluginView.h:

2010-07-21 Simon Fraser <simon.fraser@apple.com>

Reviewed by Anders Carlsson.
@@ -27,6 +27,7 @@

#include "Plugin.h"
#include <WebCore/DocumentLoader.h>
#include <WebCore/Event.h>
#include <WebCore/FrameLoadRequest.h>
#include <WebCore/FrameLoaderClient.h>
#include <WebCore/FrameView.h>
@@ -317,6 +318,11 @@ void PluginView::setParent(ScrollView* scrollView)
viewGeometryDidChange();
}

void PluginView::handleEvent(Event*)
{
// FIXME: Implement.
}

void PluginView::viewGeometryDidChange()
{
if (!parent() || !m_plugin || !m_isInitialized)
@@ -85,6 +85,7 @@ class PluginView : public WebCore::Widget, WebCore::MediaCanStartListener, Plugi
virtual void invalidateRect(const WebCore::IntRect&);
virtual void frameRectsChanged();
virtual void setParent(WebCore::ScrollView*);
virtual void handleEvent(WebCore::Event*);

// WebCore::MediaCanStartListener
virtual void mediaCanStart();

0 comments on commit 0ec4ec0

Please sign in to comment.