| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 setSurfaceSize(newSize); | 320 setSurfaceSize(newSize); |
| 321 | 321 |
| 322 if (m_context && m_context->is3d() && oldSize != size()) | 322 if (m_context && m_context->is3d() && oldSize != size()) |
| 323 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); | 323 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); |
| 324 | 324 |
| 325 if (RenderObject* renderer = this->renderer()) { | 325 if (RenderObject* renderer = this->renderer()) { |
| 326 if (renderer->isCanvas()) { | 326 if (renderer->isCanvas()) { |
| 327 if (oldSize != size()) { | 327 if (oldSize != size()) { |
| 328 toRenderHTMLCanvas(renderer)->canvasSizeChanged(); | 328 toRenderHTMLCanvas(renderer)->canvasSizeChanged(); |
| 329 if (renderBox() && renderBox()->hasAcceleratedCompositing()) | 329 if (renderBox() && renderBox()->hasAcceleratedCompositing()) |
| 330 renderBox()->contentChanged(CanvasChanged); | 330 renderBox()->contentChanged(CanvasChanged, IntRect(IntPoint(
0, 0), size())); |
| 331 } | 331 } |
| 332 if (hadImageBuffer) | 332 if (hadImageBuffer) |
| 333 renderer->setShouldDoFullPaintInvalidation(); | 333 renderer->setShouldDoFullPaintInvalidation(); |
| 334 } | 334 } |
| 335 } | 335 } |
| 336 | 336 |
| 337 for (CanvasObserver* canvasObserver : m_observers) | 337 for (CanvasObserver* canvasObserver : m_observers) |
| 338 canvasObserver->canvasResized(this); | 338 canvasObserver->canvasResized(this); |
| 339 } | 339 } |
| 340 | 340 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 { | 783 { |
| 784 return !originClean(); | 784 return !originClean(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 FloatSize HTMLCanvasElement::sourceSize() const | 787 FloatSize HTMLCanvasElement::sourceSize() const |
| 788 { | 788 { |
| 789 return FloatSize(width(), height()); | 789 return FloatSize(width(), height()); |
| 790 } | 790 } |
| 791 | 791 |
| 792 } | 792 } |
| OLD | NEW |