Chromium Code Reviews| 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&) |
| { |
| } |