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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 bool hidden = !page()->isPageVisible(); 1189 bool hidden = !page()->isPageVisible();
1190 m_context->setIsHidden(hidden); 1190 m_context->setIsHidden(hidden);
1191 if (hidden) { 1191 if (hidden) {
1192 clearCopiedImage(); 1192 clearCopiedImage();
1193 if (is3D()) { 1193 if (is3D()) {
1194 discardImageBuffer(); 1194 discardImageBuffer();
1195 } 1195 }
1196 } 1196 }
1197 } 1197 }
1198 1198
1199 void HTMLCanvasElement::contextDestroyed() { 1199 void HTMLCanvasElement::contextDestroyed(ExecutionContext*) {
1200 if (m_context) 1200 if (m_context)
1201 m_context->stop(); 1201 m_context->stop();
1202 } 1202 }
1203 1203
1204 void HTMLCanvasElement::contextDestroyed(Page*) {}
1205
1204 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, 1206 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle,
1205 const ComputedStyle& newStyle) { 1207 const ComputedStyle& newStyle) {
1206 if (m_context) 1208 if (m_context)
1207 m_context->styleDidChange(oldStyle, newStyle); 1209 m_context->styleDidChange(oldStyle, newStyle);
1208 } 1210 }
1209 1211
1210 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) { 1212 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) {
1211 ContextLifecycleObserver::setContext(&document()); 1213 ContextLifecycleObserver::setContext(&document());
1212 PageVisibilityObserver::setContext(document().page()); 1214 PageVisibilityObserver::setContext(document().page());
1213 HTMLElement::didMoveToNewDocument(oldDocument); 1215 HTMLElement::didMoveToNewDocument(oldDocument);
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this)); 1415 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this));
1414 // Creates a placeholder layer first before Surface is created. 1416 // Creates a placeholder layer first before Surface is created.
1415 m_surfaceLayerBridge->createSolidColorLayer(); 1417 m_surfaceLayerBridge->createSolidColorLayer();
1416 } 1418 }
1417 1419
1418 void HTMLCanvasElement::OnWebLayerReplaced() { 1420 void HTMLCanvasElement::OnWebLayerReplaced() {
1419 setNeedsCompositingUpdate(); 1421 setNeedsCompositingUpdate();
1420 } 1422 }
1421 1423
1422 } // namespace blink 1424 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLCanvasElement.h ('k') | third_party/WebKit/Source/core/html/HTMLMediaElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698