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

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: nits 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.
Julien - ping for review 2014/10/29 18:42:15 I really think this is peppering over the fact tha
philipj_slow 2014/10/29 18:54:04 I agree, but failed to convince the API OWNERS. I
philipj_slow 2014/10/29 21:24:24 To be clear, that cannot block fixing the bug itse
Julien - ping for review 2014/10/29 21:27:12 I am definitely supportive of more data on these!
+ return child->isFlexibleBox();
Julien - ping for review 2014/10/29 18:42:15 How about display: inline-flex? I think Elliott's
philipj_slow 2014/10/29 18:54:04 That would break pages that do ::webkit-media-cont
Julien - ping for review 2014/10/29 21:27:12 OK, I thought we could get away with forcing displ
philipj_slow 2014/10/29 21:40:37 Truthfully, I'm not 100% confident that I've corre
+}
Julien - ping for review 2014/10/29 21:27:12 I also forgot: RenderButton is a flexible box so i
philipj_slow 2014/10/29 21:40:37 Ugh, as long as it doesn't crash I don't think it
+
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