| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2008, 2009 Apple Inc. All rights reserved. |
| 4 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2011. 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 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 483 if (getImageObserver()->shouldPauseAnimation(this)) { | 483 if (getImageObserver()->shouldPauseAnimation(this)) { |
| 484 stopAnimation(); | 484 stopAnimation(); |
| 485 return; | 485 return; |
| 486 } | 486 } |
| 487 | 487 |
| 488 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG | 488 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG |
| 489 // images can't have any so we assert there's no script. | 489 // images can't have any so we assert there's no script. |
| 490 ScriptForbiddenScope forbidScript; | 490 ScriptForbiddenScope forbidScript; |
| 491 | 491 |
| 492 // The calls below may trigger GCs, so set up the required persistent | 492 // The calls below may trigger GCs, so set up the required persistent |
| 493 // reference on the ImageResource which owns this SVGImage. By transitivity, | 493 // reference on the ImageResourceContent which owns this SVGImage. By |
| 494 // that will keep the associated SVGImageChromeClient object alive. | 494 // transitivity, that will keep the associated SVGImageChromeClient object |
| 495 // alive. |
| 495 Persistent<ImageObserver> protect(getImageObserver()); | 496 Persistent<ImageObserver> protect(getImageObserver()); |
| 496 m_page->animator().serviceScriptedAnimations(monotonicAnimationStartTime); | 497 m_page->animator().serviceScriptedAnimations(monotonicAnimationStartTime); |
| 497 // Do *not* update the paint phase. It's critical to paint only when | 498 // Do *not* update the paint phase. It's critical to paint only when |
| 498 // actually generating painted output, not only for performance reasons, | 499 // actually generating painted output, not only for performance reasons, |
| 499 // but to preserve correct coherence of the cache of the output with | 500 // but to preserve correct coherence of the cache of the output with |
| 500 // the needsRepaint bits of the PaintLayers in the image. | 501 // the needsRepaint bits of the PaintLayers in the image. |
| 501 toLocalFrame(m_page->mainFrame()) | 502 toLocalFrame(m_page->mainFrame()) |
| 502 ->view() | 503 ->view() |
| 503 ->updateAllLifecyclePhasesExceptPaint(); | 504 ->updateAllLifecyclePhasesExceptPaint(); |
| 504 } | 505 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 } | 626 } |
| 626 | 627 |
| 627 return m_page ? SizeAvailable : SizeUnavailable; | 628 return m_page ? SizeAvailable : SizeUnavailable; |
| 628 } | 629 } |
| 629 | 630 |
| 630 String SVGImage::filenameExtension() const { | 631 String SVGImage::filenameExtension() const { |
| 631 return "svg"; | 632 return "svg"; |
| 632 } | 633 } |
| 633 | 634 |
| 634 } // namespace blink | 635 } // namespace blink |
| OLD | NEW |