| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 | 388 |
| 389 if (m_context) | 389 if (m_context) |
| 390 m_context->paintRenderingResultsToCanvas(); | 390 m_context->paintRenderingResultsToCanvas(); |
| 391 | 391 |
| 392 return buffer()->toDataURL(encodingMimeType, quality); | 392 return buffer()->toDataURL(encodingMimeType, quality); |
| 393 } | 393 } |
| 394 | 394 |
| 395 PassRefPtr<ImageData> HTMLCanvasElement::getImageData() | 395 PassRefPtr<ImageData> HTMLCanvasElement::getImageData() |
| 396 { | 396 { |
| 397 if (!m_context || !m_context->is3d()) | 397 if (!m_context || !m_context->is3d()) |
| 398 return 0; | 398 return nullptr; |
| 399 return toWebGLRenderingContext(m_context.get())->paintRenderingResultsToImag
eData(); | 399 return toWebGLRenderingContext(m_context.get())->paintRenderingResultsToImag
eData(); |
| 400 } | 400 } |
| 401 | 401 |
| 402 SecurityOrigin* HTMLCanvasElement::securityOrigin() const | 402 SecurityOrigin* HTMLCanvasElement::securityOrigin() const |
| 403 { | 403 { |
| 404 return document().securityOrigin(); | 404 return document().securityOrigin(); |
| 405 } | 405 } |
| 406 | 406 |
| 407 bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const | 407 bool HTMLCanvasElement::shouldAccelerate(const IntSize& size) const |
| 408 { | 408 { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 } | 593 } |
| 594 } | 594 } |
| 595 | 595 |
| 596 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) | 596 void HTMLCanvasElement::didMoveToNewDocument(Document& oldDocument) |
| 597 { | 597 { |
| 598 setObservedDocument(document()); | 598 setObservedDocument(document()); |
| 599 HTMLElement::didMoveToNewDocument(oldDocument); | 599 HTMLElement::didMoveToNewDocument(oldDocument); |
| 600 } | 600 } |
| 601 | 601 |
| 602 } | 602 } |
| OLD | NEW |