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 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
562 if (!root_element) | 562 if (!root_element) |
563 return false; | 563 return false; |
564 return root_element->TimeContainer()->HasAnimations() || | 564 return root_element->TimeContainer()->HasAnimations() || |
565 ToLocalFrame(page_->MainFrame()) | 565 ToLocalFrame(page_->MainFrame()) |
566 ->GetDocument() | 566 ->GetDocument() |
567 ->Timeline() | 567 ->Timeline() |
568 .HasPendingUpdates(); | 568 .HasPendingUpdates(); |
569 } | 569 } |
570 | 570 |
571 void SVGImage::ServiceAnimations(double monotonic_animation_start_time) { | 571 void SVGImage::ServiceAnimations(double monotonic_animation_start_time) { |
| 572 if (!GetImageObserver()) |
| 573 return; |
| 574 |
572 // If none of our observers (sic!) are visible, or for some other reason | 575 // If none of our observers (sic!) are visible, or for some other reason |
573 // does not want us to keep running animations, stop them until further | 576 // does not want us to keep running animations, stop them until further |
574 // notice (next paint.) | 577 // notice (next paint.) |
575 if (GetImageObserver()->ShouldPauseAnimation(this)) { | 578 if (GetImageObserver()->ShouldPauseAnimation(this)) { |
576 StopAnimation(); | 579 StopAnimation(); |
577 return; | 580 return; |
578 } | 581 } |
579 | 582 |
580 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG | 583 // serviceScriptedAnimations runs requestAnimationFrame callbacks, but SVG |
581 // images can't have any so we assert there's no script. | 584 // images can't have any so we assert there's no script. |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 | 776 |
774 NOTREACHED(); | 777 NOTREACHED(); |
775 return kSizeAvailable; | 778 return kSizeAvailable; |
776 } | 779 } |
777 | 780 |
778 String SVGImage::FilenameExtension() const { | 781 String SVGImage::FilenameExtension() const { |
779 return "svg"; | 782 return "svg"; |
780 } | 783 } |
781 | 784 |
782 } // namespace blink | 785 } // namespace blink |
OLD | NEW |