| 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 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view(); | 564 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view(); |
| 565 frameView->updateAllLifecyclePhasesExceptPaint(); | 565 frameView->updateAllLifecyclePhasesExceptPaint(); |
| 566 | 566 |
| 567 // For SPv2 we run updateAnimations after the paint phase, but per above | 567 // For SPv2 we run updateAnimations after the paint phase, but per above |
| 568 // comment we don't want to run lifecycle through to paint for SVG images. | 568 // comment we don't want to run lifecycle through to paint for SVG images. |
| 569 // Since we know SVG images never have composited animations we can update | 569 // Since we know SVG images never have composited animations we can update |
| 570 // animations directly without worrying about including | 570 // animations directly without worrying about including |
| 571 // PaintArtifactCompositor analysis of whether animations should be | 571 // PaintArtifactCompositor analysis of whether animations should be |
| 572 // composited. | 572 // composited. |
| 573 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 573 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 574 Optional<CompositorElementIdSet> compositedElementIds; |
| 574 DocumentAnimations::updateAnimations(frameView->layoutView()->document(), | 575 DocumentAnimations::updateAnimations(frameView->layoutView()->document(), |
| 575 DocumentLifecycle::LayoutClean); | 576 DocumentLifecycle::LayoutClean, |
| 577 compositedElementIds); |
| 576 } | 578 } |
| 577 } | 579 } |
| 578 | 580 |
| 579 void SVGImage::advanceAnimationForTesting() { | 581 void SVGImage::advanceAnimationForTesting() { |
| 580 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { | 582 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { |
| 581 rootElement->timeContainer()->advanceFrameForTesting(); | 583 rootElement->timeContainer()->advanceFrameForTesting(); |
| 582 | 584 |
| 583 // The following triggers animation updates which can issue a new draw | 585 // The following triggers animation updates which can issue a new draw |
| 584 // but will not permanently change the animation timeline. | 586 // but will not permanently change the animation timeline. |
| 585 // TODO(pdr): Actually advance the document timeline so CSS animations | 587 // TODO(pdr): Actually advance the document timeline so CSS animations |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 690 } | 692 } |
| 691 | 693 |
| 692 return m_page ? SizeAvailable : SizeUnavailable; | 694 return m_page ? SizeAvailable : SizeUnavailable; |
| 693 } | 695 } |
| 694 | 696 |
| 695 String SVGImage::filenameExtension() const { | 697 String SVGImage::filenameExtension() const { |
| 696 return "svg"; | 698 return "svg"; |
| 697 } | 699 } |
| 698 | 700 |
| 699 } // namespace blink | 701 } // namespace blink |
| OLD | NEW |