OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 void RenderVideo::updatePlayer() | 118 void RenderVideo::updatePlayer() |
119 { | 119 { |
120 MediaPlayer* mediaPlayer = player(); | 120 MediaPlayer* mediaPlayer = player(); |
121 if (!mediaPlayer) | 121 if (!mediaPlayer) |
122 return; | 122 return; |
123 if (!mediaElement()->inActiveDocument()) { | 123 if (!mediaElement()->inActiveDocument()) { |
124 mediaPlayer->setVisible(false); | 124 mediaPlayer->setVisible(false); |
125 return; | 125 return; |
126 } | 126 } |
127 | 127 |
128 // FIXME: This doesn't work correctly with transforms. | |
129 FloatPoint absPos = localToAbsolute(); | |
130 IntRect videoBounds = videoBox(); | 128 IntRect videoBounds = videoBox(); |
131 videoBounds.move(absPos.x(), absPos.y()); | |
132 mediaPlayer->setFrameView(document()->view()); | 129 mediaPlayer->setFrameView(document()->view()); |
133 mediaPlayer->setRect(videoBounds); | 130 mediaPlayer->setSize(IntSize(videoBounds.width(), videoBounds.height())); |
134 mediaPlayer->setVisible(true); | 131 mediaPlayer->setVisible(true); |
135 } | 132 } |
136 | 133 |
137 bool RenderVideo::isWidthSpecified() const | 134 bool RenderVideo::isWidthSpecified() const |
138 { | 135 { |
139 switch (style()->width().type()) { | 136 switch (style()->width().type()) { |
140 case Fixed: | 137 case Fixed: |
141 case Percent: | 138 case Percent: |
142 return true; | 139 return true; |
143 case Auto: | 140 case Auto: |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 m_minPrefWidth = 0; | 227 m_minPrefWidth = 0; |
231 else | 228 else |
232 m_minPrefWidth = m_maxPrefWidth; | 229 m_minPrefWidth = m_maxPrefWidth; |
233 | 230 |
234 setPrefWidthsDirty(false); | 231 setPrefWidthsDirty(false); |
235 } | 232 } |
236 | 233 |
237 } // namespace WebCore | 234 } // namespace WebCore |
238 | 235 |
239 #endif | 236 #endif |
OLD | NEW |