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

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

Issue 689613002: Disallow non-flexbox child renderers for RenderMedia (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: z-index Created 6 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
« no previous file with comments | « Source/core/rendering/RenderMedia.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/RenderMedia.cpp
diff --git a/Source/core/rendering/RenderMedia.cpp b/Source/core/rendering/RenderMedia.cpp
index 08994661a9b5a82362dc2eb6190a23eae6250b35..9be96225cded5b44e413657fd4a37d8fe58c7c1e 100644
--- a/Source/core/rendering/RenderMedia.cpp
+++ b/Source/core/rendering/RenderMedia.cpp
@@ -77,6 +77,16 @@ void RenderMedia::layout()
clearNeedsLayout();
}
+bool RenderMedia::isChildAllowed(RenderObject* child, RenderStyle*) const
+{
+ // The only allowed child is the media controls. The user agent stylesheet
+ // (mediaControls.css) has ::-webkit-media-controls { display: flex; }. If
+ // author style sets display: inline we would get an inline renderer as a
+ // child of replaced content, which is not supposed to be possible. This
+ // check can be removed if ::-webkit-media-controls is made internal.
+ return child->isFlexibleBox();
+}
+
void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&)
{
}
« no previous file with comments | « Source/core/rendering/RenderMedia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698