| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2009, 2010 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 | 175 |
| 176 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex
tFactory>); | 176 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex
tFactory>); |
| 177 void updateExternallyAllocatedMemory() const; | 177 void updateExternallyAllocatedMemory() const; |
| 178 | 178 |
| 179 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS
tyle); | 179 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS
tyle); |
| 180 | 180 |
| 181 void notifyListenersCanvasChanged(); | 181 void notifyListenersCanvasChanged(); |
| 182 | 182 |
| 183 protected: | 183 protected: |
| 184 void didMoveToNewDocument(Document& oldDocument) override; | 184 void didMoveToNewDocument(Document& oldDocument) override; |
| 185 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override; |
| 185 | 186 |
| 186 private: | 187 private: |
| 187 explicit HTMLCanvasElement(Document&); | 188 explicit HTMLCanvasElement(Document&); |
| 188 | 189 |
| 189 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; | 190 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
| 190 static ContextFactoryVector& renderingContextFactories(); | 191 static ContextFactoryVector& renderingContextFactories(); |
| 191 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 192 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
| 192 | 193 |
| 193 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 194 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
| 194 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 195 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 mutable bool m_didFailToCreateImageBuffer; | 228 mutable bool m_didFailToCreateImageBuffer; |
| 228 bool m_imageBufferIsClear; | 229 bool m_imageBufferIsClear; |
| 229 OwnPtr<ImageBuffer> m_imageBuffer; | 230 OwnPtr<ImageBuffer> m_imageBuffer; |
| 230 | 231 |
| 231 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 232 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 232 }; | 233 }; |
| 233 | 234 |
| 234 } // namespace blink | 235 } // namespace blink |
| 235 | 236 |
| 236 #endif // HTMLCanvasElement_h | 237 #endif // HTMLCanvasElement_h |
| OLD | NEW |