Index: trunk/Source/core/html/HTMLCanvasElement.cpp |
=================================================================== |
--- trunk/Source/core/html/HTMLCanvasElement.cpp (revision 177853) |
+++ trunk/Source/core/html/HTMLCanvasElement.cpp (working copy) |
@@ -650,15 +650,17 @@ |
void HTMLCanvasElement::didChangeVisibilityState(PageVisibilityState visibility) |
{ |
- if (!m_context) |
- return; |
- bool hidden = visibility != PageVisibilityStateVisible; |
- m_context->setIsHidden(hidden); |
- if (hidden) { |
- clearCopiedImage(); |
- if (is3D()) { |
- discardImageBuffer(); |
+ if (hasImageBuffer()) { |
+ bool hidden = visibility != PageVisibilityStateVisible; |
+ if (hidden) { |
+ clearCopiedImage(); |
+ if (is3D()) { |
+ discardImageBuffer(); |
+ } |
} |
+ if (hasImageBuffer()) { |
+ m_imageBuffer->setIsHidden(hidden); |
+ } |
} |
} |