Chromium Code Reviews| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 180 | 180 |
| 181 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>) ; | 181 void createImageBufferUsingSurfaceForTesting(PassOwnPtr<ImageBufferSurface>) ; |
| 182 | 182 |
| 183 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>); | 183 static void registerRenderingContextFactory(PassOwnPtr<CanvasRenderingContex tFactory>); |
| 184 void updateExternallyAllocatedMemory() const; | 184 void updateExternallyAllocatedMemory() const; |
| 185 | 185 |
| 186 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle); | 186 void styleDidChange(const ComputedStyle* oldStyle, const ComputedStyle& newS tyle); |
| 187 | 187 |
| 188 void notifyListenersCanvasChanged(); | 188 void notifyListenersCanvasChanged(); |
| 189 | 189 |
| 190 // For Canvas HitRegions | |
| 190 bool isSupportedInteractiveCanvasFallback(const Element&); | 191 bool isSupportedInteractiveCanvasFallback(const Element&); |
| 191 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi nt&); | 192 std::pair<Element*, String> getControlAndIdIfHitRegionExists(const LayoutPoi nt&); |
| 193 String getIdFromControl(Element*); | |
|
dtapuska
2016/04/05 15:57:28
Is there a requirement that Element be a ptr. Perh
zino
2016/04/06 11:08:20
In the current implementation, we are saving the c
dtapuska
2016/04/06 13:41:25
That doesn't preclude you from taking the address
zino
2016/04/06 16:25:38
Done.
But I used |const_cast| when calling getHit
| |
| 192 | 194 |
| 193 protected: | 195 protected: |
| 194 void didMoveToNewDocument(Document& oldDocument) override; | 196 void didMoveToNewDocument(Document& oldDocument) override; |
| 195 | 197 |
| 196 private: | 198 private: |
| 197 explicit HTMLCanvasElement(Document&); | 199 explicit HTMLCanvasElement(Document&); |
| 198 | 200 |
| 199 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; | 201 using ContextFactoryVector = Vector<OwnPtr<CanvasRenderingContextFactory>>; |
| 200 static ContextFactoryVector& renderingContextFactories(); | 202 static ContextFactoryVector& renderingContextFactories(); |
| 201 static CanvasRenderingContextFactory* getRenderingContextFactory(int); | 203 static CanvasRenderingContextFactory* getRenderingContextFactory(int); |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 237 mutable bool m_didFailToCreateImageBuffer; | 239 mutable bool m_didFailToCreateImageBuffer; |
| 238 bool m_imageBufferIsClear; | 240 bool m_imageBufferIsClear; |
| 239 OwnPtr<ImageBuffer> m_imageBuffer; | 241 OwnPtr<ImageBuffer> m_imageBuffer; |
| 240 | 242 |
| 241 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). | 243 mutable RefPtr<Image> m_copiedImage; // FIXME: This is temporary for platfor ms that have to copy the image buffer to render (and for CSSCanvasValue). |
| 242 }; | 244 }; |
| 243 | 245 |
| 244 } // namespace blink | 246 } // namespace blink |
| 245 | 247 |
| 246 #endif // HTMLCanvasElement_h | 248 #endif // HTMLCanvasElement_h |
| OLD | NEW |