Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Unified Diff: Source/WebCore/dom/Document.cpp

Issue 8218020: Merge 95371 - Don't detach elements from the render tree when entering fullscreen mode (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « LayoutTests/plugins/fullscreen-plugins-dont-reload-expected.txt ('k') | Source/WebCore/dom/NodeRenderingContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698