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

Unified Diff: Source/core/rendering/RenderVideo.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/RenderVideo.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderVideo.cpp
diff --git a/Source/core/rendering/RenderVideo.cpp b/Source/core/rendering/RenderVideo.cpp
index b156fca11c4b0fcabe90479283608a80aaf48eee..57374941d833f6cb3a6f6a78b8220fe6df4f58c9 100644
--- a/Source/core/rendering/RenderVideo.cpp
+++ b/Source/core/rendering/RenderVideo.cpp
@@ -34,6 +34,7 @@
#include "core/frame/FrameView.h"
#include "core/rendering/LayoutRectRecorder.h"
#include "core/rendering/PaintInfo.h"
+#include "core/rendering/RenderFullScreen.h"
#include "platform/graphics/media/MediaPlayer.h"
#include "public/platform/WebLayer.h"
@@ -234,4 +235,45 @@
return !!mediaElement()->platformLayer();
}
+static const RenderBlock* rendererPlaceholder(const RenderObject* renderer)
+{
+ RenderObject* parent = renderer->parent();
+ if (!parent)
+ return 0;
+
+ RenderFullScreen* fullScreen = parent->isRenderFullScreen() ? toRenderFullScreen(parent) : 0;
+ if (!fullScreen)
+ return 0;
+
+ return fullScreen->placeholder();
+}
+
+LayoutUnit RenderVideo::offsetLeft() const
+{
+ if (const RenderBlock* block = rendererPlaceholder(this))
+ return block->offsetLeft();
+ return RenderMedia::offsetLeft();
+}
+
+LayoutUnit RenderVideo::offsetTop() const
+{
+ if (const RenderBlock* block = rendererPlaceholder(this))
+ return block->offsetTop();
+ return RenderMedia::offsetTop();
+}
+
+LayoutUnit RenderVideo::offsetWidth() const
+{
+ if (const RenderBlock* block = rendererPlaceholder(this))
+ return block->offsetWidth();
+ return RenderMedia::offsetWidth();
+}
+
+LayoutUnit RenderVideo::offsetHeight() const
+{
+ if (const RenderBlock* block = rendererPlaceholder(this))
+ return block->offsetHeight();
+ return RenderMedia::offsetHeight();
+}
+
} // namespace WebCore
« no previous file with comments | « Source/core/rendering/RenderVideo.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698