| 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 63d691d071e28e0340a84d5aae3a19f0c0839ca3..f0c2f5bb0e85aca9b5f2d33dc1db886b48a4252b 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);
|
| }
|
|
|
|
|