| 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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 } | 271 } |
| 272 | 272 |
| 273 setSurfaceSize(newSize); | 273 setSurfaceSize(newSize); |
| 274 | 274 |
| 275 if (m_context && m_context->is3d() && oldSize != size()) | 275 if (m_context && m_context->is3d() && oldSize != size()) |
| 276 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); | 276 toWebGLRenderingContext(m_context.get())->reshape(width(), height()); |
| 277 | 277 |
| 278 if (RenderObject* renderer = this->renderer()) { | 278 if (RenderObject* renderer = this->renderer()) { |
| 279 if (renderer->isCanvas()) { | 279 if (renderer->isCanvas()) { |
| 280 if (hadImageBuffer) | 280 if (hadImageBuffer) |
| 281 renderer->scheduleVisualUpdate(); | 281 document().scheduleVisualUpdate(); |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 | 284 |
| 285 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); | 285 HashSet<RawPtr<CanvasObserver> >::iterator end = m_observers.end(); |
| 286 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) | 286 for (HashSet<RawPtr<CanvasObserver> >::iterator it = m_observers.begin(); it
!= end; ++it) |
| 287 (*it)->canvasResized(this); | 287 (*it)->canvasResized(this); |
| 288 } | 288 } |
| 289 | 289 |
| 290 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const | 290 bool HTMLCanvasElement::paintsIntoCanvasBuffer() const |
| 291 { | 291 { |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 658 } |
| 659 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); | 659 return m_imageBuffer->copyImage(DontCopyBackingStore, Unscaled); |
| 660 } | 660 } |
| 661 | 661 |
| 662 FloatSize HTMLCanvasElement::sourceSize() const | 662 FloatSize HTMLCanvasElement::sourceSize() const |
| 663 { | 663 { |
| 664 return FloatSize(width(), height()); | 664 return FloatSize(width(), height()); |
| 665 } | 665 } |
| 666 | 666 |
| 667 } | 667 } |
| OLD | NEW |