зеркало из https://github.com/mozilla/gecko-dev.git
Correct child widget's view according to parent view's coordinates in AddCoveringWidgetsToOpaqueRegion. Fix for bug 73406. r=kmcclusk,sr=attinasi
This commit is contained in:
Родитель
36ce9910cd
Коммит
9b7ce382fd
|
@ -1148,7 +1148,24 @@ static void AddCoveringWidgetsToOpaqueRegion(nsIRegion* aRgn, nsIDeviceContext*
|
|||
nsRect bounds;
|
||||
view->GetBounds(bounds);
|
||||
if (bounds.width > 0 && bounds.height > 0) {
|
||||
aRgn->Union(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
nsIView* viewParent = nsnull;
|
||||
view->GetParent(viewParent);
|
||||
|
||||
while (viewParent && viewParent != aRootView) {
|
||||
nsRect parentBounds;
|
||||
|
||||
viewParent->GetBounds(parentBounds);
|
||||
bounds.x += parentBounds.x;
|
||||
bounds.y += parentBounds.y;
|
||||
viewParent->GetParent(viewParent);
|
||||
}
|
||||
|
||||
// maybe we couldn't get the view into the coordinate
|
||||
// system of aRootView (maybe it's not a descendant
|
||||
// view of aRootView?); if so, don't use it
|
||||
if (viewParent) {
|
||||
aRgn->Union(bounds.x, bounds.y, bounds.width, bounds.height);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче