Widgets visually respond/depress on right click (45533). r=kerz sr=ben a=asa

This commit is contained in:
blakeross%telocity.com 2001-06-20 05:46:38 +00:00
Родитель fb6f86c450
Коммит 239089d2a4
1 изменённых файлов: 10 добавлений и 8 удалений

Просмотреть файл

@ -1501,6 +1501,10 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
SetContentState(nsnull, NS_EVENT_STATE_FOCUS);
}
// The rest is left button-specific.
if (aEvent->message != NS_MOUSE_LEFT_BUTTON_DOWN)
break;
if (activeContent) {
// The nearest enclosing element goes into the
// :active state. If we fail the QI to DOMElement,
@ -1511,15 +1515,13 @@ nsEventStateManager::PostHandleEvent(nsIPresContext* aPresContext,
if (!elt) {
nsCOMPtr<nsIContent> par;
activeContent->GetParent(*getter_AddRefs(par));
activeContent = par;
}
if (activeContent) {
SetContentState(activeContent, NS_EVENT_STATE_ACTIVE);
nsCOMPtr<nsIDOMHTMLBodyElement> bodyElement(do_QueryInterface(activeContent));
if (bodyElement) {
mSpecialTopOfDoc = PR_TRUE;
}
if (par)
activeContent = par;
}
SetContentState(activeContent, NS_EVENT_STATE_ACTIVE);
nsCOMPtr<nsIDOMHTMLBodyElement> bodyElement(do_QueryInterface(activeContent));
if (bodyElement)
mSpecialTopOfDoc = PR_TRUE;
}
}
else {