| Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| index 2b554b54362aa1de55080ff79e61bf09aad4937e..6c9f82fde2758ae7531aa113206e37aabe3c3769 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
|
| @@ -937,6 +937,7 @@ void HTMLCanvasElement::didChangeVisibilityState(PageVisibilityState visibility)
|
| {
|
| if (!m_context)
|
| return;
|
| +
|
| bool hidden = visibility != PageVisibilityStateVisible;
|
| m_context->setIsHidden(hidden);
|
| if (hidden) {
|
| @@ -947,6 +948,12 @@ void HTMLCanvasElement::didChangeVisibilityState(PageVisibilityState visibility)
|
| }
|
| }
|
|
|
| +void HTMLCanvasElement::willDetachDocument()
|
| +{
|
| + if (m_context)
|
| + m_context->stop();
|
| +}
|
| +
|
| void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newStyle)
|
| {
|
| if (m_context)
|
| @@ -956,8 +963,6 @@ void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, const Comp
|
| void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument)
|
| {
|
| setObservedDocument(document());
|
| - if (m_context)
|
| - m_context->didMoveToNewDocument(&document());
|
| HTMLElement::didMoveToNewDocument(oldDocument);
|
| }
|
|
|
|
|