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

Unified Diff: Source/core/rendering/RenderInline.cpp

Issue 132333018: Revert of Reland r165710 "Replace RenderFullScreen with top layer" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 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
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderInline.cpp
diff --git a/Source/core/rendering/RenderInline.cpp b/Source/core/rendering/RenderInline.cpp
index 7ddd169949a5ba323cef880bddd90e4aa98af48c..280a5a89f94ad814b2969eb38bd2fffb49cd4184 100644
--- a/Source/core/rendering/RenderInline.cpp
+++ b/Source/core/rendering/RenderInline.cpp
@@ -32,6 +32,7 @@
#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/RenderBlock.h"
#include "core/rendering/RenderFlowThread.h"
+#include "core/rendering/RenderFullScreen.h"
#include "core/rendering/RenderGeometryMap.h"
#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderTheme.h"
@@ -344,6 +345,17 @@
// Create a clone of this inline.
RenderInline* cloneInline = clone();
cloneInline->setContinuation(oldCont);
+
+ // If we're splitting the inline containing the fullscreened element,
+ // |beforeChild| may be the renderer for the fullscreened element. However,
+ // that renderer is wrapped in a RenderFullScreen, so |this| is not its
+ // parent. Since the splitting logic expects |this| to be the parent, set
+ // |beforeChild| to be the RenderFullScreen.
+ if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExists(&document())) {
+ const Element* fullScreenElement = fullscreen->webkitCurrentFullScreenElement();
+ if (fullScreenElement && beforeChild && beforeChild->node() == fullScreenElement)
+ beforeChild = fullscreen->fullScreenRenderer();
+ }
// Now take all of the children from beforeChild to the end and remove
// them from |this| and place them in the clone.
« no previous file with comments | « Source/core/rendering/RenderFullScreen.cpp ('k') | Source/core/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698