| OLD | NEW |
| 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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1195 discardImageBuffer(); | 1195 discardImageBuffer(); |
| 1196 } | 1196 } |
| 1197 } | 1197 } |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 void HTMLCanvasElement::contextDestroyed(ExecutionContext*) { | 1200 void HTMLCanvasElement::contextDestroyed(ExecutionContext*) { |
| 1201 if (m_context) | 1201 if (m_context) |
| 1202 m_context->stop(); | 1202 m_context->stop(); |
| 1203 } | 1203 } |
| 1204 | 1204 |
| 1205 void HTMLCanvasElement::contextDestroyed(Page*) {} | |
| 1206 | |
| 1207 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, | 1205 void HTMLCanvasElement::styleDidChange(const ComputedStyle* oldStyle, |
| 1208 const ComputedStyle& newStyle) { | 1206 const ComputedStyle& newStyle) { |
| 1209 if (m_context) | 1207 if (m_context) |
| 1210 m_context->styleDidChange(oldStyle, newStyle); | 1208 m_context->styleDidChange(oldStyle, newStyle); |
| 1211 } | 1209 } |
| 1212 | 1210 |
| 1213 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) { | 1211 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) { |
| 1214 ContextLifecycleObserver::setContext(&document()); | 1212 ContextLifecycleObserver::setContext(&document()); |
| 1215 PageVisibilityObserver::setContext(document().page()); | 1213 PageVisibilityObserver::setContext(document().page()); |
| 1216 HTMLElement::didMoveToNewDocument(oldDocument); | 1214 HTMLElement::didMoveToNewDocument(oldDocument); |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1416 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this)); | 1414 m_surfaceLayerBridge = WTF::wrapUnique(new CanvasSurfaceLayerBridge(this)); |
| 1417 // Creates a placeholder layer first before Surface is created. | 1415 // Creates a placeholder layer first before Surface is created. |
| 1418 m_surfaceLayerBridge->createSolidColorLayer(); | 1416 m_surfaceLayerBridge->createSolidColorLayer(); |
| 1419 } | 1417 } |
| 1420 | 1418 |
| 1421 void HTMLCanvasElement::OnWebLayerReplaced() { | 1419 void HTMLCanvasElement::OnWebLayerReplaced() { |
| 1422 setNeedsCompositingUpdate(); | 1420 setNeedsCompositingUpdate(); |
| 1423 } | 1421 } |
| 1424 | 1422 |
| 1425 } // namespace blink | 1423 } // namespace blink |
| OLD | NEW |