Index: Source/WebCore/dom/Document.cpp |
=================================================================== |
--- Source/WebCore/dom/Document.cpp (revision 97090) |
+++ Source/WebCore/dom/Document.cpp (working copy) |
@@ -4882,6 +4882,9 @@ |
ASSERT(element); |
ASSERT(page() && page()->settings()->fullScreenEnabled()); |
+ if (m_fullScreenRenderer) |
+ m_fullScreenRenderer->unwrapRenderer(); |
+ |
m_fullScreenElement = element; |
// Create a placeholder block for a the full-screen element, to keep the page from reflowing |
@@ -4896,7 +4899,7 @@ |
} |
if (m_fullScreenElement != documentElement()) |
- m_fullScreenElement->detach(); |
+ RenderFullScreen::wrapRenderer(renderer, this); |
m_fullScreenElement->setContainsFullScreenElementOnAncestorsCrossingFrameBoundaries(true); |
@@ -4947,15 +4950,11 @@ |
{ |
m_areKeysEnabledInFullScreen = false; |
setAnimatingFullScreen(false); |
- |
- if (m_fullScreenRenderer) |
- m_fullScreenRenderer->remove(); |
- if (m_fullScreenElement != documentElement()) |
- m_fullScreenElement->detach(); |
+ if (m_fullScreenRenderer) |
+ m_fullScreenRenderer->unwrapRenderer(); |
m_fullScreenChangeEventTargetQueue.append(m_fullScreenElement.release()); |
- setFullScreenRenderer(0); |
#if USE(ACCELERATED_COMPOSITING) |
page()->chrome()->client()->setRootFullScreenLayer(0); |
#endif |