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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 : HTMLElement(canvasTag, document) | 79 : HTMLElement(canvasTag, document) |
80 , DocumentVisibilityObserver(document) | 80 , DocumentVisibilityObserver(document) |
81 , m_size(DefaultWidth, DefaultHeight) | 81 , m_size(DefaultWidth, DefaultHeight) |
82 , m_ignoreReset(false) | 82 , m_ignoreReset(false) |
83 , m_accelerationDisabled(false) | 83 , m_accelerationDisabled(false) |
84 , m_externallyAllocatedMemory(0) | 84 , m_externallyAllocatedMemory(0) |
85 , m_originClean(true) | 85 , m_originClean(true) |
86 , m_didFailToCreateImageBuffer(false) | 86 , m_didFailToCreateImageBuffer(false) |
87 , m_didClearImageBuffer(false) | 87 , m_didClearImageBuffer(false) |
88 { | 88 { |
89 ScriptWrappable::init(this); | |
90 } | 89 } |
91 | 90 |
92 DEFINE_NODE_FACTORY(HTMLCanvasElement) | 91 DEFINE_NODE_FACTORY(HTMLCanvasElement) |
93 | 92 |
94 HTMLCanvasElement::~HTMLCanvasElement() | 93 HTMLCanvasElement::~HTMLCanvasElement() |
95 { | 94 { |
96 resetDirtyRect(); | 95 resetDirtyRect(); |
97 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_external
lyAllocatedMemory); | 96 v8::Isolate::GetCurrent()->AdjustAmountOfExternalAllocatedMemory(-m_external
lyAllocatedMemory); |
98 #if !ENABLE(OILPAN) | 97 #if !ENABLE(OILPAN) |
99 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); | 98 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
741 { | 740 { |
742 return !originClean(); | 741 return !originClean(); |
743 } | 742 } |
744 | 743 |
745 FloatSize HTMLCanvasElement::sourceSize() const | 744 FloatSize HTMLCanvasElement::sourceSize() const |
746 { | 745 { |
747 return FloatSize(width(), height()); | 746 return FloatSize(width(), height()); |
748 } | 747 } |
749 | 748 |
750 } | 749 } |
OLD | NEW |