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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 | 193 |
194 void notifyListenersCanvasChanged(); | 194 void notifyListenersCanvasChanged(); |
195 | 195 |
196 // For Canvas HitRegions | 196 // For Canvas HitRegions |
197 bool isSupportedInteractiveCanvasFallback(const Element&); | 197 bool isSupportedInteractiveCanvasFallback(const Element&); |
198 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); | 198 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); |
199 String getIdFromControl(const Element*); | 199 String getIdFromControl(const Element*); |
200 | 200 |
201 // For OffscreenCanvas that controls this html canvas element | 201 // For OffscreenCanvas that controls this html canvas element |
202 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer
Bridge.get(); } | 202 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer
Bridge.get(); } |
203 void createSurfaceLayerBridge(); | 203 bool createSurfaceLayer(); |
204 | 204 |
205 protected: | 205 protected: |
206 void didMoveToNewDocument(Document& oldDocument) override; | 206 void didMoveToNewDocument(Document& oldDocument) override; |
207 | 207 |
208 private: | 208 private: |
209 explicit HTMLCanvasElement(Document&); | 209 explicit HTMLCanvasElement(Document&); |
210 | 210 |
211 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; | 211 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
212 static ContextFactoryVector& renderingContextFactories(); | 212 static ContextFactoryVector& renderingContextFactories(); |
213 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 213 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 | 252 |
253 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 253 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
254 | 254 |
255 // Used for OffscreenCanvas that controls this HTML canvas element | 255 // Used for OffscreenCanvas that controls this HTML canvas element |
256 OwnPtr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; | 256 OwnPtr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; |
257 }; | 257 }; |
258 | 258 |
259 } // namespace blink | 259 } // namespace blink |
260 | 260 |
261 #endif // HTMLCanvasElement_h | 261 #endif // HTMLCanvasElement_h |
OLD | NEW |