Index: Source/WebCore/rendering/RenderBoxModelObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 121080) |
+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy) |
@@ -517,11 +517,11 @@ |
LayoutPoint RenderBoxModelObject::adjustedPositionRelativeToOffsetParent(const LayoutPoint& startPoint) const |
{ |
- // If the element is the HTML body element or does not have an associated box |
+ // If the element is the HTML body element or doesn't have a parent |
// return 0 and stop this algorithm. |
- if (isBody()) |
+ if (isBody() || !parent()) |
return LayoutPoint(); |
- |
+ |
LayoutPoint referencePoint = startPoint; |
referencePoint.move(parent()->offsetForColumns(referencePoint)); |