OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 | 70 |
71 LayoutState state(*this, locationOffset()); | 71 LayoutState state(*this, locationOffset()); |
72 | 72 |
73 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou tSize(paddingLeft(), paddingTop())); | 73 controlsRenderer->setLocation(LayoutPoint(borderLeft(), borderTop()) + Layou tSize(paddingLeft(), paddingTop())); |
74 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); | 74 controlsRenderer->style()->setHeight(Length(newSize.height(), Fixed)); |
75 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); | 75 controlsRenderer->style()->setWidth(Length(newSize.width(), Fixed)); |
76 controlsRenderer->forceLayout(); | 76 controlsRenderer->forceLayout(); |
77 clearNeedsLayout(); | 77 clearNeedsLayout(); |
78 } | 78 } |
79 | 79 |
80 bool RenderMedia::isChildAllowed(RenderObject* child, RenderStyle*) const | |
81 { | |
82 // The only allowed child is the media controls. The user agent stylesheet | |
83 // (mediaControls.css) has ::-webkit-media-controls { display: flex; }. If | |
84 // author style sets display: inline we would get an inline renderer as a | |
85 // child of replaced content, which is not supposed to be possible. This | |
86 // 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!
| |
87 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
| |
88 } | |
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
| |
89 | |
80 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&) | 90 void RenderMedia::paintReplaced(PaintInfo&, const LayoutPoint&) |
81 { | 91 { |
82 } | 92 } |
83 | 93 |
84 } // namespace blink | 94 } // namespace blink |
OLD | NEW |