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

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: 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
Index: Source/core/rendering/RenderMedia.cpp
diff --git a/Source/core/rendering/RenderMedia.cpp b/Source/core/rendering/RenderMedia.cpp
index 08994661a9b5a82362dc2eb6190a23eae6250b35..3b9bef6b8d461841050d85b9a4537533f3e23287 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 set display: inline we would get an inline renderer as a
rune 2014/10/29 10:14:18 "author style sets"
+ // 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&)
{
}
« LayoutTests/media/controls-css-overload-expected.html ('K') | « Source/core/rendering/RenderMedia.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698