Fixing rtm++ bug 54892. The .offsetParent property on the BODY element was incorreclty returning its real parent in stead of null. sr=vidur, r=pierre

This commit is contained in:
jst%netscape.com 2000-10-11 23:11:28 +00:00
Родитель e4420663eb
Коммит 3069f6b20d
2 изменённых файлов: 10 добавлений и 6 удалений

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

@ -587,6 +587,8 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
{
nsresult res = NS_OK;
*aOffsetParent = nsnull;
aRect.x = aRect.y = 0;
aRect.Empty();
@ -634,6 +636,9 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
// If the tag of this frame matches the one passed in, break here
parentContent->GetTag(*getter_AddRefs(tag));
if (tag.get() == aOffsetParentTag) {
*aOffsetParent = parentContent;
NS_IF_ADDREF(*aOffsetParent);
break;
}
}
@ -646,9 +651,6 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
parent->GetParent(&parent);
}
*aOffsetParent = parentContent;
NS_IF_ADDREF(*aOffsetParent);
// For the origin, add in the border for the frame
const nsStyleSpacing* spacing;
nsStyleCoord coord;

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

@ -587,6 +587,8 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
{
nsresult res = NS_OK;
*aOffsetParent = nsnull;
aRect.x = aRect.y = 0;
aRect.Empty();
@ -634,6 +636,9 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
// If the tag of this frame matches the one passed in, break here
parentContent->GetTag(*getter_AddRefs(tag));
if (tag.get() == aOffsetParentTag) {
*aOffsetParent = parentContent;
NS_IF_ADDREF(*aOffsetParent);
break;
}
}
@ -646,9 +651,6 @@ nsGenericHTMLElement::GetOffsetRect(nsRect& aRect,
parent->GetParent(&parent);
}
*aOffsetParent = parentContent;
NS_IF_ADDREF(*aOffsetParent);
// For the origin, add in the border for the frame
const nsStyleSpacing* spacing;
nsStyleCoord coord;