Index: Source/core/rendering/RenderMedia.cpp |
=================================================================== |
--- Source/core/rendering/RenderMedia.cpp (revision 185109) |
+++ Source/core/rendering/RenderMedia.cpp (working copy) |
@@ -77,6 +77,16 @@ |
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&) |
{ |
} |