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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 | 188 |
189 void RenderVideo::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) | 189 void RenderVideo::paintReplaced(PaintInfo& paintInfo, const LayoutPoint& paintOf
fset) |
190 { | 190 { |
191 MediaPlayer* mediaPlayer = mediaElement()->player(); | 191 MediaPlayer* mediaPlayer = mediaElement()->player(); |
192 bool displayingPoster = videoElement()->shouldDisplayPosterImage(); | 192 bool displayingPoster = videoElement()->shouldDisplayPosterImage(); |
193 | 193 |
194 Page* page = 0; | 194 Page* page = 0; |
195 if (Frame* frame = this->frame()) | 195 if (Frame* frame = this->frame()) |
196 page = frame->page(); | 196 page = frame->page(); |
197 | 197 |
198 if (!displayingPoster) { | 198 if (!displayingPoster && !mediaPlayer) { |
199 if (!mediaPlayer) { | 199 if (page && paintInfo.phase == PaintPhaseForeground) |
200 if (page && paintInfo.phase == PaintPhaseForeground) | 200 page->addRelevantUnpaintedObject(this, visualOverflowRect()); |
201 page->addRelevantUnpaintedObject(this, visualOverflowRect()); | 201 return; |
202 return; | |
203 } | |
204 updatePlayer(); | |
205 } | 202 } |
206 | 203 |
207 LayoutRect rect = videoBox(); | 204 LayoutRect rect = videoBox(); |
208 if (rect.isEmpty()) { | 205 if (rect.isEmpty()) { |
209 if (page && paintInfo.phase == PaintPhaseForeground) | 206 if (page && paintInfo.phase == PaintPhaseForeground) |
210 page->addRelevantUnpaintedObject(this, visualOverflowRect()); | 207 page->addRelevantUnpaintedObject(this, visualOverflowRect()); |
211 return; | 208 return; |
212 } | 209 } |
213 rect.moveBy(paintOffset); | 210 rect.moveBy(paintOffset); |
214 | 211 |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 { | 333 { |
337 if (const RenderBlock* block = rendererPlaceholder(this)) | 334 if (const RenderBlock* block = rendererPlaceholder(this)) |
338 return block->offsetHeight(); | 335 return block->offsetHeight(); |
339 return RenderMedia::offsetHeight(); | 336 return RenderMedia::offsetHeight(); |
340 } | 337 } |
341 #endif | 338 #endif |
342 | 339 |
343 } // namespace WebCore | 340 } // namespace WebCore |
344 | 341 |
345 #endif | 342 #endif |
OLD | NEW |