mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-15 22:44:13 +00:00
Fix for 5693. r=saari,a=waterson
This commit is contained in:
parent
ff08774a52
commit
032e7132f4
@ -1516,8 +1516,16 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
|
||||
targetContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
||||
if ( status != nsEventStatus_eConsumeNoDefault )
|
||||
if ( status != nsEventStatus_eConsumeNoDefault ) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(targetContent));
|
||||
if (!elt) {
|
||||
// Only elements can be placed into :hover. Instead of putting
|
||||
// ourselves into :hover, put our parent element into :hover instead.
|
||||
nsCOMPtr<nsIContent> child = targetContent;
|
||||
child->GetParent(*getter_AddRefs(targetContent));
|
||||
}
|
||||
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
|
||||
//Now dispatch to the frame
|
||||
if (mCurrentTarget) {
|
||||
@ -1571,7 +1579,6 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
|
||||
SetContentState(nsnull, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
|
||||
|
||||
//Now dispatch to the frame
|
||||
if (nsnull != mLastMouseOverFrame) {
|
||||
//XXX Get the new frame
|
||||
|
@ -1516,8 +1516,16 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
|
||||
targetContent->HandleDOMEvent(aPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);
|
||||
}
|
||||
|
||||
if ( status != nsEventStatus_eConsumeNoDefault )
|
||||
if ( status != nsEventStatus_eConsumeNoDefault ) {
|
||||
nsCOMPtr<nsIDOMElement> elt(do_QueryInterface(targetContent));
|
||||
if (!elt) {
|
||||
// Only elements can be placed into :hover. Instead of putting
|
||||
// ourselves into :hover, put our parent element into :hover instead.
|
||||
nsCOMPtr<nsIContent> child = targetContent;
|
||||
child->GetParent(*getter_AddRefs(targetContent));
|
||||
}
|
||||
SetContentState(targetContent, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
|
||||
//Now dispatch to the frame
|
||||
if (mCurrentTarget) {
|
||||
@ -1571,7 +1579,6 @@ nsEventStateManager::GenerateMouseEnterExit(nsIPresContext* aPresContext, nsGUIE
|
||||
SetContentState(nsnull, NS_EVENT_STATE_HOVER);
|
||||
}
|
||||
|
||||
|
||||
//Now dispatch to the frame
|
||||
if (nsnull != mLastMouseOverFrame) {
|
||||
//XXX Get the new frame
|
||||
|
Loading…
x
Reference in New Issue
Block a user