summaryrefslogtreecommitdiff
path: root/Source/WebCore/rendering/RenderVideo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/rendering/RenderVideo.cpp')
-rw-r--r--Source/WebCore/rendering/RenderVideo.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/Source/WebCore/rendering/RenderVideo.cpp b/Source/WebCore/rendering/RenderVideo.cpp
index 11269e252..61ec6f244 100644
--- a/Source/WebCore/rendering/RenderVideo.cpp
+++ b/Source/WebCore/rendering/RenderVideo.cpp
@@ -38,6 +38,7 @@
#include "Page.h"
#include "PaintInfo.h"
#include "RenderView.h"
+#include <wtf/StackStats.h>
#if ENABLE(FULLSCREEN_API)
#include "RenderFullScreen.h"
@@ -229,8 +230,7 @@ void RenderVideo::layout()
HTMLVideoElement* RenderVideo::videoElement() const
{
- ASSERT(node()->hasTagName(videoTag));
- return static_cast<HTMLVideoElement*>(node());
+ return toHTMLVideoElement(node());
}
void RenderVideo::updateFromElement()
@@ -262,9 +262,9 @@ void RenderVideo::updatePlayer()
mediaPlayer->setVisible(true);
}
-LayoutUnit RenderVideo::computeReplacedLogicalWidth(bool includeMaxWidth) const
+LayoutUnit RenderVideo::computeReplacedLogicalWidth(ShouldComputePreferred shouldComputePreferred) const
{
- return RenderReplaced::computeReplacedLogicalWidth(includeMaxWidth);
+ return RenderReplaced::computeReplacedLogicalWidth(shouldComputePreferred);
}
LayoutUnit RenderVideo::computeReplacedLogicalHeight() const
@@ -338,6 +338,14 @@ LayoutUnit RenderVideo::offsetHeight() const
}
#endif
+bool RenderVideo::foregroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect, unsigned maxDepthToTest) const
+{
+ if (videoElement()->shouldDisplayPosterImage())
+ return RenderImage::foregroundIsKnownToBeOpaqueInRect(localRect, maxDepthToTest);
+
+ return videoBox().contains(enclosingIntRect(localRect));
+}
+
} // namespace WebCore
#endif