Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: Source/WebCore/rendering/RenderVideo.cpp

Issue 11350003: Merge 132398 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698