Roll up popups if nsIRollupListener::ShouldRollupOnMouseWheelEvent says to do so. Patch by Masayuki Nakano (Mozilla Japan). b=330999 r=josh rs=pinkerton a=josh

git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@193148 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
joshmoz%gmail.com
2006-03-28 20:20:27 +00:00
parent a978041c69
commit 33d66ee2fb

View File

@@ -1391,6 +1391,13 @@ nsMacEventHandler::Scroll(EventMouseWheelAxis inAxis, PRInt32 inDelta,
if (!widgetToScroll)
return PR_FALSE;
if (gRollupListener && gRollupWidget && gRollupWidget != widgetToScroll) {
PRBool rollup = PR_FALSE;
gRollupListener->ShouldRollupOnMouseWheelEvent(&rollup);
if (rollup)
gRollupListener->Rollup();
}
nsMouseScrollEvent scrollEvent(PR_TRUE, NS_MOUSE_SCROLL, widgetToScroll);
// The direction we get from the carbon event is opposite from the way