Index: Source/WebCore/rendering/RenderFullScreen.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderFullScreen.cpp (revision 97091) |
+++ Source/WebCore/rendering/RenderFullScreen.cpp (working copy) |
@@ -124,13 +124,16 @@ |
void RenderFullScreen::unwrapRenderer() |
{ |
- RenderObject* wrappedRenderer = firstChild(); |
- if (wrappedRenderer) { |
- wrappedRenderer->remove(); |
- RenderObject* holder = placeholder() ? placeholder() : this; |
- RenderObject* parent = holder->parent(); |
- if (parent) |
- parent->addChild(wrappedRenderer, holder); |
+ RenderObject* holder = placeholder() ? placeholder() : this; |
+ RenderObject* parent = holder->parent(); |
+ if (parent) { |
+ RenderObject* child = firstChild(); |
+ while (child) { |
+ RenderObject* nextChild = child->nextSibling(); |
+ child->remove(); |
+ parent->addChild(child, holder); |
+ child = nextChild; |
+ } |
} |
remove(); |
document()->setFullScreenRenderer(0); |