Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(428)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/GraphicsLayerChromium.cpp

Issue 10310152: Merge 116786 - [chromium] Ensure that animations continue to run when transform-style is changed (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1132/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2009 Apple Inc. All rights reserved. 3 * Copyright (C) 2009 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * 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 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 updateDebugIndicators(); 581 updateDebugIndicators();
582 } 582 }
583 583
584 void GraphicsLayerChromium::updateLayerPreserves3D() 584 void GraphicsLayerChromium::updateLayerPreserves3D()
585 { 585 {
586 if (m_preserves3D && !m_transformLayer) { 586 if (m_preserves3D && !m_transformLayer) {
587 // Create the transform layer. 587 // Create the transform layer.
588 m_transformLayer = LayerChromium::create(); 588 m_transformLayer = LayerChromium::create();
589 m_transformLayer->setPreserves3D(true); 589 m_transformLayer->setPreserves3D(true);
590 m_transformLayer->setLayerAnimationDelegate(this); 590 m_transformLayer->setLayerAnimationDelegate(this);
591 m_transformLayer->setLayerAnimationController(m_layer->releaseLayerAnima tionController());
591 592
592 // Copy the position from this layer. 593 // Copy the position from this layer.
593 updateLayerPosition(); 594 updateLayerPosition();
594 updateLayerSize(); 595 updateLayerSize();
595 updateAnchorPoint(); 596 updateAnchorPoint();
596 updateTransform(); 597 updateTransform();
597 updateChildrenTransform(); 598 updateChildrenTransform();
598 599
599 m_layer->setPosition(FloatPoint(m_size.width() / 2.0f, m_size.height() / 2.0f)); 600 m_layer->setPosition(FloatPoint(m_size.width() / 2.0f, m_size.height() / 2.0f));
600 601
(...skipping 11 matching lines...) Expand all
612 m_layer->parent()->replaceChild(m_layer.get(), m_transformLayer.get( )); 613 m_layer->parent()->replaceChild(m_layer.get(), m_transformLayer.get( ));
613 m_transformLayer->addChild(m_layer.get()); 614 m_transformLayer->addChild(m_layer.get());
614 615
615 updateChildList(); 616 updateChildList();
616 } else if (!m_preserves3D && m_transformLayer) { 617 } else if (!m_preserves3D && m_transformLayer) {
617 // Relace the transformLayer in the parent with this layer. 618 // Relace the transformLayer in the parent with this layer.
618 m_layer->removeFromParent(); 619 m_layer->removeFromParent();
619 if (m_transformLayer->parent()) 620 if (m_transformLayer->parent())
620 m_transformLayer->parent()->replaceChild(m_transformLayer.get(), m_l ayer.get()); 621 m_transformLayer->parent()->replaceChild(m_transformLayer.get(), m_l ayer.get());
621 622
623 m_layer->setLayerAnimationDelegate(this);
624 m_layer->setLayerAnimationController(m_transformLayer->releaseLayerAnima tionController());
625
622 // Release the transform layer. 626 // Release the transform layer.
623 m_transformLayer->setLayerAnimationDelegate(0); 627 m_transformLayer->setLayerAnimationDelegate(0);
624 m_transformLayer = 0; 628 m_transformLayer = 0;
625 629
626 updateLayerPosition(); 630 updateLayerPosition();
627 updateLayerSize(); 631 updateLayerSize();
628 updateAnchorPoint(); 632 updateAnchorPoint();
629 updateTransform(); 633 updateTransform();
630 updateChildrenTransform(); 634 updateChildrenTransform();
631 635
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 } 765 }
762 766
763 void GraphicsLayerChromium::notifyAnimationFinished(double) 767 void GraphicsLayerChromium::notifyAnimationFinished(double)
764 { 768 {
765 // Do nothing. 769 // Do nothing.
766 } 770 }
767 771
768 } // namespace WebCore 772 } // namespace WebCore
769 773
770 #endif // USE(ACCELERATED_COMPOSITING) 774 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698