Bug 382595: SVG image is covered with horizonal lines when scrolled. r+sr=roc.

This commit is contained in:
sharparrow1@yahoo.com 2007-06-27 23:02:05 -07:00
Родитель 7f1a2ef618
Коммит 4e959d3ba7
2 изменённых файлов: 5 добавлений и 2 удалений

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

@ -820,7 +820,7 @@ nsIWidget* nsIView::GetNearestWidget(nsPoint* aOffset) const
// not coincide with v's origin
if (aOffset) {
nsRect vBounds = v->GetBounds();
*aOffset = pt + v->GetPosition() - nsPoint(vBounds.x, vBounds.y) -
*aOffset = pt + v->GetPosition() - nsPoint(vBounds.x, vBounds.y) +
v->ViewToWidgetOffset();
}
return v->GetWidget();

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

@ -847,6 +847,7 @@ NS_IMETHODIMP nsViewManager::UpdateView(nsIView *aView, const nsRect &aRect, PRU
nsView* view = NS_STATIC_CAST(nsView*, aView);
nsRect damagedRect(aRect);
NS_ASSERTION(damagedRect.IsEmpty() || view->GetDimensions().Contains(damagedRect),"");
// If the rectangle is not visible then abort
// without invalidating. This is a performance
@ -1939,7 +1940,9 @@ void nsViewManager::ViewToWidget(nsView *aView, nsView* aWidgetView, nsRect &aRe
// account for the view's origin not lining up with the widget's
aRect.x -= bounds.x;
aRect.y -= bounds.y;
aRect += aView->ViewToWidgetOffset();
// finally, convert to device coordinates.
aRect.ScaleRoundOut(1.0f / mContext->AppUnitsPerDevPixel());
}