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. |
| 87 return child->isFlexibleBox(); |
| 88 } |
| 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 |