| 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 523 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view(); | 523 FrameView* frameView = toLocalFrame(m_page->mainFrame())->view(); |
| 524 frameView->updateAllLifecyclePhasesExceptPaint(); | 524 frameView->updateAllLifecyclePhasesExceptPaint(); |
| 525 | 525 |
| 526 // For SPv2 we run updateAnimations after the paint phase, but per above | 526 // For SPv2 we run updateAnimations after the paint phase, but per above |
| 527 // comment we don't want to run lifecycle through to paint for SVG images. | 527 // comment we don't want to run lifecycle through to paint for SVG images. |
| 528 // Since we know SVG images never have composited animations we can update | 528 // Since we know SVG images never have composited animations we can update |
| 529 // animations directly without worrying about including | 529 // animations directly without worrying about including |
| 530 // PaintArtifactCompositor analysis of whether animations should be | 530 // PaintArtifactCompositor analysis of whether animations should be |
| 531 // composited. | 531 // composited. |
| 532 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 532 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
| 533 Optional<CompositorElementIdSet> compositedAnimationElementIds; |
| 533 DocumentAnimations::updateAnimations(frameView->layoutView()->document(), | 534 DocumentAnimations::updateAnimations(frameView->layoutView()->document(), |
| 534 DocumentLifecycle::LayoutClean); | 535 DocumentLifecycle::LayoutClean, |
| 536 compositedAnimationElementIds); |
| 535 } | 537 } |
| 536 } | 538 } |
| 537 | 539 |
| 538 void SVGImage::advanceAnimationForTesting() { | 540 void SVGImage::advanceAnimationForTesting() { |
| 539 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { | 541 if (SVGSVGElement* rootElement = svgRootElement(m_page.get())) { |
| 540 rootElement->timeContainer()->advanceFrameForTesting(); | 542 rootElement->timeContainer()->advanceFrameForTesting(); |
| 541 | 543 |
| 542 // The following triggers animation updates which can issue a new draw | 544 // The following triggers animation updates which can issue a new draw |
| 543 // but will not permanently change the animation timeline. | 545 // but will not permanently change the animation timeline. |
| 544 // TODO(pdr): Actually advance the document timeline so CSS animations | 546 // TODO(pdr): Actually advance the document timeline so CSS animations |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 } | 660 } |
| 659 | 661 |
| 660 return m_page ? SizeAvailable : SizeUnavailable; | 662 return m_page ? SizeAvailable : SizeUnavailable; |
| 661 } | 663 } |
| 662 | 664 |
| 663 String SVGImage::filenameExtension() const { | 665 String SVGImage::filenameExtension() const { |
| 664 return "svg"; | 666 return "svg"; |
| 665 } | 667 } |
| 666 | 668 |
| 667 } // namespace blink | 669 } // namespace blink |
| OLD | NEW |