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

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

Issue 716733002: Merge 184652 "Disallow non-flexbox child renderers for RenderMedia" (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/2171/
Patch Set: Created 6 years, 1 month 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
===================================================================
--- 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&)
{
}
« 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