| 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 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>)
; | 176 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>)
; |
| 177 | 177 |
| 178 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex
tFactory>); | 178 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex
tFactory>); |
| 179 void updateExternallyAllocatedMemory() const; | 179 void updateExternallyAllocatedMemory() const; |
| 180 | 180 |
| 181 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS
tyle); | 181 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS
tyle); |
| 182 | 182 |
| 183 void notifyListenersCanvasChanged(); | 183 void notifyListenersCanvasChanged(); |
| 184 | 184 |
| 185 // For Canvas HitRegions |
| 185 bool isSupportedInteractiveCanvasFallback(const Element&); | 186 bool isSupportedInteractiveCanvasFallback(const Element&); |
| 186 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); | 187 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); |
| 188 String getIdFromControl(Element* element); |
| 187 | 189 |
| 188 protected: | 190 protected: |
| 189 void didMoveToNewDocument(Document& oldDocument) override; | 191 void didMoveToNewDocument(Document& oldDocument) override; |
| 190 | 192 |
| 191 private: | 193 private: |
| 192 explicit HTMLCanvasElement(Document&); | 194 explicit HTMLCanvasElement(Document&); |
| 193 | 195 |
| 194 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; | 196 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
| 195 static ContextFactoryVector& renderingContextFactories(); | 197 static ContextFactoryVector& renderingContextFactories(); |
| 196 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 198 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 mutable bool m_didFailToCreateImageBuffer; | 234 mutable bool m_didFailToCreateImageBuffer; |
| 233 bool m_imageBufferIsClear; | 235 bool m_imageBufferIsClear; |
| 234 OwnPtr<ImageBuffer> m_imageBuffer; | 236 OwnPtr<ImageBuffer> m_imageBuffer; |
| 235 | 237 |
| 236 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 238 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 237 }; | 239 }; |
| 238 | 240 |
| 239 } // namespace blink | 241 } // namespace blink |
| 240 | 242 |
| 241 #endif // HTMLCanvasElement_h | 243 #endif // HTMLCanvasElement_h |
| OLD | NEW |