Index: Source/WebCore/rendering/RenderObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderObject.cpp (revision 120098) |
+++ Source/WebCore/rendering/RenderObject.cpp (working copy) |
@@ -710,8 +710,14 @@ |
{ |
RenderObject* o = parent(); |
if (!isText() && m_style->position() == FixedPosition) { |
- while (o && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) |
+ while (o && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) { |
+#if ENABLE(SVG) |
+ // foreignObject is the containing block for its contents. |
+ if (o->isSVGForeignObject()) |
+ break; |
+#endif |
o = o->parent(); |
+ } |
} else if (!isText() && m_style->position() == AbsolutePosition) { |
while (o && (o->style()->position() == StaticPosition || (o->isInline() && !o->isReplaced())) && !o->isRenderView() && !(o->hasTransform() && o->isRenderBlock())) { |
// For relpositioned inlines, we return the nearest non-anonymous enclosing block. We don't try |
@@ -2246,6 +2252,11 @@ |
while (o && o->parent() && !(o->hasTransform() && o->isRenderBlock())) { |
if (repaintContainerSkipped && o == repaintContainer) |
*repaintContainerSkipped = true; |
+#if ENABLE(SVG) |
+ // foreignObject is the containing block for its contents. |
+ if (o->isSVGForeignObject()) |
+ break; |
+#endif |
o = o->parent(); |
} |
} else if (pos == AbsolutePosition) { |