| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/rendering/RenderHTMLCanvas.h" | 46 #include "core/rendering/RenderHTMLCanvas.h" |
| 47 #include "platform/MIMETypeRegistry.h" | 47 #include "platform/MIMETypeRegistry.h" |
| 48 #include "platform/graphics/Canvas2DImageBufferSurface.h" | 48 #include "platform/graphics/Canvas2DImageBufferSurface.h" |
| 49 #include "platform/graphics/GraphicsContextStateSaver.h" | 49 #include "platform/graphics/GraphicsContextStateSaver.h" |
| 50 #include "platform/graphics/ImageBuffer.h" | 50 #include "platform/graphics/ImageBuffer.h" |
| 51 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 51 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| 52 #include "platform/graphics/gpu/WebGLImageBufferSurface.h" | 52 #include "platform/graphics/gpu/WebGLImageBufferSurface.h" |
| 53 #include "platform/transforms/AffineTransform.h" | 53 #include "platform/transforms/AffineTransform.h" |
| 54 #include "public/platform/Platform.h" | 54 #include "public/platform/Platform.h" |
| 55 #include <math.h> | 55 #include <math.h> |
| 56 #include <v8.h> |
| 56 | 57 |
| 57 namespace WebCore { | 58 namespace WebCore { |
| 58 | 59 |
| 59 using namespace HTMLNames; | 60 using namespace HTMLNames; |
| 60 | 61 |
| 61 // These values come from the WhatWG spec. | 62 // These values come from the WhatWG spec. |
| 62 static const int DefaultWidth = 300; | 63 static const int DefaultWidth = 300; |
| 63 static const int DefaultHeight = 150; | 64 static const int DefaultHeight = 150; |
| 64 | 65 |
| 65 // Firefox limits width/height to 32767 pixels, but slows down dramatically befo
re it | 66 // Firefox limits width/height to 32767 pixels, but slows down dramatically befo
re it |
| (...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 { | 699 { |
| 699 return !originClean(); | 700 return !originClean(); |
| 700 } | 701 } |
| 701 | 702 |
| 702 FloatSize HTMLCanvasElement::sourceSize() const | 703 FloatSize HTMLCanvasElement::sourceSize() const |
| 703 { | 704 { |
| 704 return FloatSize(width(), height()); | 705 return FloatSize(width(), height()); |
| 705 } | 706 } |
| 706 | 707 |
| 707 } | 708 } |
| OLD | NEW |