Index: Source/core/html/HTMLCanvasElement.cpp |
diff --git a/Source/core/html/HTMLCanvasElement.cpp b/Source/core/html/HTMLCanvasElement.cpp |
index 80bfc3112a75235d2a1458a52fd19114b2c75bc9..bff1d0678e104fb06abbebdc0c4de0344297ea9e 100644 |
--- a/Source/core/html/HTMLCanvasElement.cpp |
+++ b/Source/core/html/HTMLCanvasElement.cpp |
@@ -650,14 +650,16 @@ |
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); |
} |
} |
} |