| 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 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 } | 687 } |
| 688 | 688 |
| 689 void HTMLCanvasElement::notifySurfaceInvalid() | 689 void HTMLCanvasElement::notifySurfaceInvalid() |
| 690 { | 690 { |
| 691 if (m_context && m_context->is2d()) { | 691 if (m_context && m_context->is2d()) { |
| 692 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); | 692 CanvasRenderingContext2D* context2d = toCanvasRenderingContext2D(m_conte
xt.get()); |
| 693 context2d->loseContext(); | 693 context2d->loseContext(); |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 | 696 |
| 697 void HTMLCanvasElement::trace(Visitor* visitor) | 697 DEFINE_TRACE(HTMLCanvasElement) |
| 698 { | 698 { |
| 699 #if ENABLE(OILPAN) | 699 #if ENABLE(OILPAN) |
| 700 visitor->trace(m_observers); | 700 visitor->trace(m_observers); |
| 701 visitor->trace(m_context); | 701 visitor->trace(m_context); |
| 702 #endif | 702 #endif |
| 703 DocumentVisibilityObserver::trace(visitor); | 703 DocumentVisibilityObserver::trace(visitor); |
| 704 HTMLElement::trace(visitor); | 704 HTMLElement::trace(visitor); |
| 705 } | 705 } |
| 706 | 706 |
| 707 void HTMLCanvasElement::updateExternallyAllocatedMemory() const | 707 void HTMLCanvasElement::updateExternallyAllocatedMemory() const |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 { | 893 { |
| 894 return FloatSize(width(), height()); | 894 return FloatSize(width(), height()); |
| 895 } | 895 } |
| 896 | 896 |
| 897 bool HTMLCanvasElement::isOpaque() const | 897 bool HTMLCanvasElement::isOpaque() const |
| 898 { | 898 { |
| 899 return m_context && !m_context->hasAlpha(); | 899 return m_context && !m_context->hasAlpha(); |
| 900 } | 900 } |
| 901 | 901 |
| 902 } // blink | 902 } // blink |
| OLD | NEW |