Reviewed by Darin.
[WebKit-https.git] / WebCore / bridge / mac / FrameMac.mm
index a02685d5eb54fe079476efa34294662e450546b4..f6f0996b33ae7cf2ce0fc3af556dcb40a3bdd44c 100644 (file)
@@ -1831,24 +1831,13 @@ void FrameMac::handleMouseReleaseEvent(const MouseEventWithHitTestResults& event
     _sendingEventToSubview = false;
 }
 
-bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults &event)
+bool FrameMac::passSubframeEventToSubframe(MouseEventWithHitTestResults& event, Frame* subframePart)
 {
     BEGIN_BLOCK_OBJC_EXCEPTIONS;
 
     switch ([_currentEvent type]) {
         case NSMouseMoved: {
-            Node *node = event.innerNode();
-            if (!node)
-                return false;
-            RenderObject *renderer = node->renderer();
-            if (!renderer || !renderer->isWidget())
-                return false;
-            Widget *widget = static_cast<RenderWidget *>(renderer)->widget();
-            if (!widget || !widget->isFrameView())
-                return false;
-            Frame *subframePart = static_cast<FrameView *>(widget)->frame();
-            if (!subframePart)
-                return false;
+            ASSERT(subframePart);
             [Mac(subframePart)->bridge() mouseMoved:_currentEvent];
             return true;
         }