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

Unified Diff: sky/engine/core/html/HTMLCanvasElement.cpp

Issue 714953002: Remove DocumentVisibilityObserver (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/html/HTMLCanvasElement.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLCanvasElement.cpp
diff --git a/sky/engine/core/html/HTMLCanvasElement.cpp b/sky/engine/core/html/HTMLCanvasElement.cpp
index 4d6f4fed1f5c144e767a7349e32cfa497e3692b9..de58beaa0f2593f90303e543afc3bb1a7b56e118 100644
--- a/sky/engine/core/html/HTMLCanvasElement.cpp
+++ b/sky/engine/core/html/HTMLCanvasElement.cpp
@@ -76,7 +76,6 @@ DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(CanvasObserver);
inline HTMLCanvasElement::HTMLCanvasElement(Document& document)
: HTMLElement(HTMLNames::canvasTag, document)
- , DocumentVisibilityObserver(document)
, m_size(DefaultWidth, DefaultHeight)
, m_ignoreReset(false)
, m_accelerationDisabled(false)
@@ -652,26 +651,6 @@ AffineTransform HTMLCanvasElement::baseTransform() const
return m_imageBuffer->baseTransform();
}
-void HTMLCanvasElement::didChangeVisibilityState(PageVisibilityState visibility)
-{
- if (!m_context)
- return;
- bool hidden = visibility != PageVisibilityStateVisible;
- m_context->setIsHidden(hidden);
- if (hidden) {
- clearCopiedImage();
- if (is3D()) {
- discardImageBuffer();
- }
- }
-}
-
-void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument)
-{
- setObservedDocument(document());
- HTMLElement::didMoveToNewDocument(oldDocument);
-}
-
PassRefPtr<Image> HTMLCanvasElement::getSourceImageForCanvas(SourceImageMode mode, SourceImageStatus* status) const
{
if (!width() || !height()) {
« no previous file with comments | « sky/engine/core/html/HTMLCanvasElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698