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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 | 173 |
174 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>)
; | 174 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>)
; |
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 std::pair<Element*, String> getControlAndIDIfHitRegionExists(const LayoutPoi
nt&); |
| 184 |
183 protected: | 185 protected: |
184 void didMoveToNewDocument(Document& oldDocument) override; | 186 void didMoveToNewDocument(Document& oldDocument) override; |
| 187 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) override; |
185 | 188 |
186 private: | 189 private: |
187 explicit HTMLCanvasElement(Document&); | 190 explicit HTMLCanvasElement(Document&); |
188 | 191 |
189 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; | 192 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
190 static ContextFactoryVector& renderingContextFactories(); | 193 static ContextFactoryVector& renderingContextFactories(); |
191 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 194 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
192 | 195 |
193 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; | 196 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS
tring&) override; |
194 LayoutObject* createLayoutObject(const ComputedStyle&) override; | 197 LayoutObject* createLayoutObject(const ComputedStyle&) override; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 mutable bool m_didFailToCreateImageBuffer; | 230 mutable bool m_didFailToCreateImageBuffer; |
228 bool m_imageBufferIsClear; | 231 bool m_imageBufferIsClear; |
229 OwnPtr<ImageBuffer> m_imageBuffer; | 232 OwnPtr<ImageBuffer> m_imageBuffer; |
230 | 233 |
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). | 234 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 }; | 235 }; |
233 | 236 |
234 } // namespace blink | 237 } // namespace blink |
235 | 238 |
236 #endif // HTMLCanvasElement_h | 239 #endif // HTMLCanvasElement_h |
OLD | NEW |