зеркало из https://github.com/mozilla/pjs.git
Bug 243757. Handle cases where this view manager's root view is not an ancestor of the view grabbing the mouse. r+sr=bzbarsky
This commit is contained in:
Родитель
7f6d9d8c2c
Коммит
2e474e6454
|
@ -1917,18 +1917,17 @@ NS_IMETHODIMP nsViewManager::DispatchEvent(nsGUIEvent *aEvent, nsEventStatus *aS
|
|||
nsView *parent;
|
||||
|
||||
parent = baseView;
|
||||
while (mRootView != parent) {
|
||||
while (parent) {
|
||||
parent->ConvertToParentCoords(&offset.x, &offset.y);
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
//Subtract back offset from root of view
|
||||
parent = view;
|
||||
while (mRootView != parent) {
|
||||
while (parent) {
|
||||
parent->ConvertFromParentCoords(&offset.x, &offset.y);
|
||||
parent = parent->GetParent();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Dispatch the event
|
||||
|
|
Загрузка…
Ссылка в новой задаче