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 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 | 195 |
196 void notifyListenersCanvasChanged(); | 196 void notifyListenersCanvasChanged(); |
197 | 197 |
198 // For Canvas HitRegions | 198 // For Canvas HitRegions |
199 bool isSupportedInteractiveCanvasFallback(const Element&); | 199 bool isSupportedInteractiveCanvasFallback(const Element&); |
200 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); | 200 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi
nt&); |
201 String getIdFromControl(const Element*); | 201 String getIdFromControl(const Element*); |
202 | 202 |
203 // For OffscreenCanvas that controls this html canvas element | 203 // For OffscreenCanvas that controls this html canvas element |
204 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer
Bridge.get(); } | 204 CanvasSurfaceLayerBridge* surfaceLayerBridge() const { return m_surfaceLayer
Bridge.get(); } |
205 void createSurfaceLayerBridge(); | 205 bool createSurfaceLayer(); |
206 | 206 |
207 void detachContext() { m_context = nullptr; } | 207 void detachContext() { m_context = nullptr; } |
208 | 208 |
209 protected: | 209 protected: |
210 void didMoveToNewDocument(Document& oldDocument) override; | 210 void didMoveToNewDocument(Document& oldDocument) override; |
211 | 211 |
212 private: | 212 private: |
213 explicit HTMLCanvasElement(Document&); | 213 explicit HTMLCanvasElement(Document&); |
214 void dispose(); | 214 void dispose(); |
215 | 215 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). | 258 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor
ms that have to copy the image buffer to render (and for CSSCanvasValue). |
259 | 259 |
260 // Used for OffscreenCanvas that controls this HTML canvas element | 260 // Used for OffscreenCanvas that controls this HTML canvas element |
261 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; | 261 std::unique_ptr<CanvasSurfaceLayerBridge> m_surfaceLayerBridge; |
262 }; | 262 }; |
263 | 263 |
264 } // namespace blink | 264 } // namespace blink |
265 | 265 |
266 #endif // HTMLCanvasElement_h | 266 #endif // HTMLCanvasElement_h |
OLD | NEW |