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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS | 82 // TODO(philipj): Remove the mutableStyleRef() and depend on CSS |
83 // width/height: inherit to match the media element size. | 83 // width/height: inherit to match the media element size. |
84 layoutBox->mutableStyleRef().setHeight(Length(newSize.height(), Fixed)); | 84 layoutBox->mutableStyleRef().setHeight(Length(newSize.height(), Fixed)); |
85 layoutBox->mutableStyleRef().setWidth(Length(newSize.width(), Fixed)); | 85 layoutBox->mutableStyleRef().setWidth(Length(newSize.width(), Fixed)); |
86 layoutBox->forceLayout(); | 86 layoutBox->forceLayout(); |
87 } | 87 } |
88 | 88 |
89 clearNeedsLayout(); | 89 clearNeedsLayout(); |
90 } | 90 } |
91 | 91 |
92 bool LayoutMedia::isChildAllowed(LayoutObject* child, const LayoutStyle&) const | 92 bool LayoutMedia::isChildAllowed(LayoutObject* child, const ComputedStyle&) cons
t |
93 { | 93 { |
94 // Two types of child layout objects are allowed: media controls | 94 // Two types of child layout objects are allowed: media controls |
95 // and the text track container. Filter children by node type. | 95 // and the text track container. Filter children by node type. |
96 ASSERT(child->node()); | 96 ASSERT(child->node()); |
97 | 97 |
98 // The user agent stylesheet (mediaControls.css) has | 98 // The user agent stylesheet (mediaControls.css) has |
99 // ::-webkit-media-controls { display: flex; }. If author style | 99 // ::-webkit-media-controls { display: flex; }. If author style |
100 // sets display: inline we would get an inline renderer as a child | 100 // sets display: inline we would get an inline renderer as a child |
101 // of replaced content, which is not supposed to be possible. This | 101 // of replaced content, which is not supposed to be possible. This |
102 // check can be removed if ::-webkit-media-controls is made | 102 // check can be removed if ::-webkit-media-controls is made |
103 // internal. | 103 // internal. |
104 if (child->node()->isMediaControls()) | 104 if (child->node()->isMediaControls()) |
105 return child->isFlexibleBox(); | 105 return child->isFlexibleBox(); |
106 | 106 |
107 if (child->node()->isTextTrackContainer()) | 107 if (child->node()->isTextTrackContainer()) |
108 return true; | 108 return true; |
109 | 109 |
110 return false; | 110 return false; |
111 } | 111 } |
112 | 112 |
113 void LayoutMedia::paintReplaced(const PaintInfo&, const LayoutPoint&) | 113 void LayoutMedia::paintReplaced(const PaintInfo&, const LayoutPoint&) |
114 { | 114 { |
115 } | 115 } |
116 | 116 |
117 } // namespace blink | 117 } // namespace blink |
OLD | NEW |