[Webkit-unassigned] [Bug 3439] mouseover effects can get stuck sometimes due to missing events

bugzilla-daemon at opendarwin.org bugzilla-daemon at opendarwin.org
Sun Mar 19 21:27:40 PST 2006


http://bugzilla.opendarwin.org/show_bug.cgi?id=3439





------- Comment #15 from ap at nypop.com  2006-03-19 21:27 PDT -------
(In reply to comment #14)
> the subframe function be removed from MouseEventWithHitTestResults.

  Frankly, I didn't really understand why - it's a part of "HitTestResult",
just like innerNode. And FrameView.cpp is huge, so factoring out code into
other files sounds natural...

> New code should put the * next to the class name, not the variable.

  Fixed.

> +    RefPtr<FrameView> protector(this);
> No explanation of why this was added.

  One of the tests crashed without it; the other
FrameView::viewportMouseXXXEvent methods already do protect "this".

> I don't understand the positioning of the call to setCursor in the new code.
> Wouldn't we need a new call to setCursor after passing the event to the new
> subframe?

  Looks like I did get it wrong - it should either pass the event to the new
subframe, or call setCursor if there's none (since
passSubframeEventToSubframe() always returns true for NSMouseMoved now). Going
to land like this:

-    MouseEventWithHitTestResults mev =
m_frame->document()->prepareMouseEvent(d->mousePressed &&
m_frame->mouseDownMayStartSelect(),
-        d->mousePressed, true, xm, ym, mouseEvent);
+    MouseEventWithHitTestResults mev = prepareMouseEvent(d->mousePressed &&
m_frame->mouseDownMayStartSelect(),
+        d->mousePressed, true, mouseEvent);

-    if (!m_frame->passSubframeEventToSubframe(mev))
-        setCursor(selectCursor(mev, m_frame.get(), d->mousePressed));
-        
+    if (d->oldSubframe)
+        m_frame->passSubframeEventToSubframe(mev, d->oldSubframe.get());
+
     bool swallowEvent = dispatchMouseEvent(mousemoveEvent, mev.innerNode(),
false, 0, mouseEvent, true);
     if (!swallowEvent)
         m_frame->khtmlMouseMoveEvent(mev);
+    
+    RefPtr<Frame> newSubframe = subframeForEvent(mev);
+    
+    if (newSubframe && d->oldSubframe != newSubframe)
+        m_frame->passSubframeEventToSubframe(mev, newSubframe.get());
+    else
+        setCursor(selectCursor(mev, m_frame.get(), d->mousePressed));
+    
+    d->oldSubframe = newSubframe;
 }


-- 
Configure bugmail: http://bugzilla.opendarwin.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list