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

Unified Diff: webkit/api/src/WebMediaPlayerClientImpl.cpp

Issue 183038: Fixes crash when switching to new tabs containing audio/video elements. (Closed)
Patch Set: Created 11 years, 4 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/api/src/WebMediaPlayerClientImpl.cpp
diff --git a/webkit/api/src/WebMediaPlayerClientImpl.cpp b/webkit/api/src/WebMediaPlayerClientImpl.cpp
index 60e96564d71d0c00db303dd5d565cded57cb0606..08abcd25a289e2911e791ada428045e09975d49e 100644
--- a/webkit/api/src/WebMediaPlayerClientImpl.cpp
+++ b/webkit/api/src/WebMediaPlayerClientImpl.cpp
@@ -330,7 +330,10 @@ void WebMediaPlayerClientImpl::setSize(const IntSize& size)
void WebMediaPlayerClientImpl::paint(GraphicsContext* context, const IntRect& rect)
{
- if (m_webMediaPlayer.get()) {
+ // Normally GraphicsContext operations do nothing when painting is disabled.
+ // Since we're accessing platformContext() directly we have to manually
+ // check.
+ if (m_webMediaPlayer.get() && !context->paintingDisabled()) {
#if WEBKIT_USING_SKIA
m_webMediaPlayer->paint(context->platformContext()->canvas(), rect);
#elif WEBKIT_USING_CG
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698