[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756
ap at apple.com
ap at apple.com
Fri Feb 26 22:21:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 4a15c7f014d547de77c5f40b0a9bb4e21066a809
Author: ap at apple.com <ap at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Feb 16 22:16:08 2010 +0000
Reviewed by Geoffrey Garen and Kevin Decker.
https://bugs.webkit.org/show_bug.cgi?id=34989
<rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content
This fixes event dispatch for both Cocoa and Carbon event models (mouseEntered/mouseExited
in the former case, and adjustCursor in the latter).
* Plugins/Hosted/WebHostedNetscapePluginView.mm:
(-[WebHostedNetscapePluginView handleMouseEntered:]):
(-[WebHostedNetscapePluginView handleMouseExited:]):
* Plugins/WebBaseNetscapePluginView.h:
* Plugins/WebBaseNetscapePluginView.mm:
(-[WebBaseNetscapePluginView handleMouseEntered:]):
(-[WebBaseNetscapePluginView handleMouseExited:]):
* Plugins/WebNetscapePluginView.h:
* Plugins/WebNetscapePluginView.mm:
(-[WebNetscapePluginView handleMouseEntered:]):
(-[WebNetscapePluginView handleMouseExited:]):
AppKit cannot reliably dispatch events for overlapping views. We are now asking WebCore to
notify plug-in views of mouse entered/exited as part of DOM event dispatch.
* WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Besides
mouse moved, dispatch plugin mouse entered/exit events in HTMLPlugInElement default event
handler. Other mouse events are passed down by EventHandler.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54829 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index d6a6ddc..7fca995 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,13 @@
+2010-02-16 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Geoffrey Garen and Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34989
+ <rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content
+
+ * html/HTMLPlugInElement.cpp: (WebCore::HTMLPlugInElement::defaultEventHandler): Added some
+ comments about the way we pass events down to plug-ins.
+
2010-02-16 Simon Fraser <simon.fraser at apple.com>
Reviewed by Eric Carlson.
diff --git a/WebCore/html/HTMLPlugInElement.cpp b/WebCore/html/HTMLPlugInElement.cpp
index dafa8fb..a5edc35 100644
--- a/WebCore/html/HTMLPlugInElement.cpp
+++ b/WebCore/html/HTMLPlugInElement.cpp
@@ -151,6 +151,12 @@ bool HTMLPlugInElement::checkDTD(const Node* newChild)
void HTMLPlugInElement::defaultEventHandler(Event* event)
{
+ // Firefox seems to use a fake event listener to dispatch events to plug-in (tested with mouse events only).
+ // This is observable via different order of events - in Firefox, event listeners specified in HTML attributes fires first, then an event
+ // gets dispatched to plug-in, and only then other event listeners fire. Hopefully, this difference does not matter in practice.
+
+ // FIXME: Mouse down and scroll events are passed down to plug-in via custom code in EventHandler; these code paths should be united.
+
RenderObject* r = renderer();
if (!r || !r->isWidget())
return;
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index e786e36..13cc0ea 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,31 @@
+2010-02-16 Alexey Proskuryakov <ap at apple.com>
+
+ Reviewed by Geoffrey Garen and Kevin Decker.
+
+ https://bugs.webkit.org/show_bug.cgi?id=34989
+ <rdar://problem/7417965> Cursor disappears on scroll bars that are over plugin content
+
+ This fixes event dispatch for both Cocoa and Carbon event models (mouseEntered/mouseExited
+ in the former case, and adjustCursor in the latter).
+
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm:
+ (-[WebHostedNetscapePluginView handleMouseEntered:]):
+ (-[WebHostedNetscapePluginView handleMouseExited:]):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView handleMouseEntered:]):
+ (-[WebBaseNetscapePluginView handleMouseExited:]):
+ * Plugins/WebNetscapePluginView.h:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView handleMouseEntered:]):
+ (-[WebNetscapePluginView handleMouseExited:]):
+ AppKit cannot reliably dispatch events for overlapping views. We are now asking WebCore to
+ notify plug-in views of mouse entered/exited as part of DOM event dispatch.
+
+ * WebCoreSupport/WebFrameLoaderClient.mm: (NetscapePluginWidget::handleEvent): Besides
+ mouse moved, dispatch plugin mouse entered/exit events in HTMLPlugInElement default event
+ handler. Other mouse events are passed down by EventHandler.
+
2010-02-15 Alexey Proskuryakov <ap at apple.com>
More build fixing (for what is actually a 64-bit failure, as 32-bit apparently includes
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index 42f0877..0ad76f0 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -285,13 +285,13 @@ extern "C" {
_proxy->mouseEvent(self, event, NPCocoaEventMouseDragged);
}
-- (void)mouseEntered:(NSEvent *)event
+- (void)handleMouseEntered:(NSEvent *)event
{
if (_isStarted && _proxy)
_proxy->mouseEvent(self, event, NPCocoaEventMouseEntered);
}
-- (void)mouseExited:(NSEvent *)event
+- (void)handleMouseExited:(NSEvent *)event
{
if (_isStarted && _proxy)
_proxy->mouseEvent(self, event, NPCocoaEventMouseExited);
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 029a058..18dc004 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -92,7 +92,10 @@ class WebHaltablePlugin;
- (NSMutableURLRequest *)requestWithURLCString:(const char *)URLCString;
// Subclasses must override these.
+// The "handle" prefix is needed to avoid overriding NSView methods.
- (void)handleMouseMoved:(NSEvent *)event;
+- (void)handleMouseEntered:(NSEvent *)event;
+- (void)handleMouseExited:(NSEvent *)event;
- (void)setAttributeKeys:(NSArray *)keys andValues:(NSArray *)values;
- (void)focusChanged;
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 30404b8..04a42ea 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -232,6 +232,16 @@ String WebHaltablePlugin::pluginName() const
ASSERT_NOT_REACHED();
}
+- (void)handleMouseEntered:(NSEvent *)event
+{
+ ASSERT_NOT_REACHED();
+}
+
+- (void)handleMouseExited:(NSEvent *)event
+{
+ ASSERT_NOT_REACHED();
+}
+
- (void)focusChanged
{
ASSERT_NOT_REACHED();
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.h b/WebKit/mac/Plugins/WebNetscapePluginView.h
index 2ee566e..5bc4467 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.h
@@ -143,6 +143,9 @@ typedef union PluginPort {
- (void)didCallPlugInFunction;
- (void)handleMouseMoved:(NSEvent *)event;
+- (void)handleMouseEntered:(NSEvent *)event;
+- (void)handleMouseExited:(NSEvent *)event;
+
- (uint32)checkIfAllowedToLoadURL:(const char*)urlCString frame:(const char*)frameNameCString callbackFunc:(void (*)(NPP npp, uint32 checkID, NPBool allowed, void* context))callbackFunc context:(void*)context;
- (void)cancelCheckIfAllowedToLoadURL:(uint32)checkID;
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index e96abe8..613f235 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -749,7 +749,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
_eventHandler->mouseUp(theEvent);
}
-- (void)mouseEntered:(NSEvent *)theEvent
+- (void)handleMouseEntered:(NSEvent *)theEvent
{
if (!_isStarted)
return;
@@ -757,7 +757,7 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
_eventHandler->mouseEntered(theEvent);
}
-- (void)mouseExited:(NSEvent *)theEvent
+- (void)handleMouseExited:(NSEvent *)theEvent
{
if (!_isStarted)
return;
@@ -769,8 +769,6 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
[[NSCursor arrowCursor] set];
}
-// We can't name this method mouseMoved because we don't want to override
-// the NSView mouseMoved implementation.
- (void)handleMouseMoved:(NSEvent *)theEvent
{
if (!_isStarted)
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index eaec807..1085d9e 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -1493,6 +1493,10 @@ public:
NSEvent* currentNSEvent = frame->eventHandler()->currentNSEvent();
if (event->type() == eventNames().mousemoveEvent)
[(WebBaseNetscapePluginView *)platformWidget() handleMouseMoved:currentNSEvent];
+ else if (event->type() == eventNames().mouseoverEvent)
+ [(WebBaseNetscapePluginView *)platformWidget() handleMouseEntered:currentNSEvent];
+ else if (event->type() == eventNames().mouseoutEvent)
+ [(WebBaseNetscapePluginView *)platformWidget() handleMouseExited:currentNSEvent];
}
};
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list