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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 Frame* frame = document()->frame(); | 112 Frame* frame = document()->frame(); |
113 if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript)) { | 113 if (frame && frame->script()->canExecuteScripts(NotAboutToExecuteScript)) { |
114 m_rendererIsCanvas = true; | 114 m_rendererIsCanvas = true; |
115 return new (arena) RenderHTMLCanvas(this); | 115 return new (arena) RenderHTMLCanvas(this); |
116 } | 116 } |
117 | 117 |
118 m_rendererIsCanvas = false; | 118 m_rendererIsCanvas = false; |
119 return HTMLElement::createRenderer(arena, style); | 119 return HTMLElement::createRenderer(arena, style); |
120 } | 120 } |
121 | 121 |
122 void HTMLCanvasElement::attach() | 122 void HTMLCanvasElement::attach(const AttachContext& context) |
123 { | 123 { |
124 setIsInCanvasSubtree(true); | 124 setIsInCanvasSubtree(true); |
125 HTMLElement::attach(); | 125 HTMLElement::attach(context); |
126 } | 126 } |
127 | 127 |
128 void HTMLCanvasElement::addObserver(CanvasObserver* observer) | 128 void HTMLCanvasElement::addObserver(CanvasObserver* observer) |
129 { | 129 { |
130 m_observers.add(observer); | 130 m_observers.add(observer); |
131 } | 131 } |
132 | 132 |
133 void HTMLCanvasElement::removeObserver(CanvasObserver* observer) | 133 void HTMLCanvasElement::removeObserver(CanvasObserver* observer) |
134 { | 134 { |
135 m_observers.remove(observer); | 135 m_observers.remove(observer); |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
581 HTMLElement::reportMemoryUsage(memoryObjectInfo); | 581 HTMLElement::reportMemoryUsage(memoryObjectInfo); |
582 info.addMember(m_observers, "observers"); | 582 info.addMember(m_observers, "observers"); |
583 info.addMember(m_context, "context"); | 583 info.addMember(m_context, "context"); |
584 info.addMember(m_imageBuffer, "imageBuffer"); | 584 info.addMember(m_imageBuffer, "imageBuffer"); |
585 info.addMember(m_contextStateSaver, "contextStateSaver"); | 585 info.addMember(m_contextStateSaver, "contextStateSaver"); |
586 info.addMember(m_presentedImage, "presentedImage"); | 586 info.addMember(m_presentedImage, "presentedImage"); |
587 info.addMember(m_copiedImage, "copiedImage"); | 587 info.addMember(m_copiedImage, "copiedImage"); |
588 } | 588 } |
589 | 589 |
590 } | 590 } |
OLD | NEW |