| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 AnimationPlayerForTesting player; | 116 AnimationPlayerForTesting player; |
| 117 | 117 |
| 118 layerTreeView()->attachCompositorAnimationTimeline(compositorTimeline->anima
tionTimeline()); | 118 layerTreeView()->attachCompositorAnimationTimeline(compositorTimeline->anima
tionTimeline()); |
| 119 compositorTimeline->playerAttached(player); | 119 compositorTimeline->playerAttached(player); |
| 120 | 120 |
| 121 m_platformLayer->setElementId(CompositorElementId(m_platformLayer->id(), 0))
; | 121 m_platformLayer->setElementId(CompositorElementId(m_platformLayer->id(), 0))
; |
| 122 | 122 |
| 123 player.compositorPlayer()->attachElement(m_platformLayer->elementId()); | 123 player.compositorPlayer()->attachElement(m_platformLayer->elementId()); |
| 124 ASSERT_TRUE(player.compositorPlayer()->isElementAttached()); | 124 ASSERT_TRUE(player.compositorPlayer()->isElementAttached()); |
| 125 | 125 |
| 126 player.compositorPlayer()->addAnimation(floatAnimation.release()); | 126 player.compositorPlayer()->addAnimation(std::move(floatAnimation)); |
| 127 | 127 |
| 128 ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); | 128 ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); |
| 129 | 129 |
| 130 m_graphicsLayer->setShouldFlattenTransform(false); | 130 m_graphicsLayer->setShouldFlattenTransform(false); |
| 131 | 131 |
| 132 m_platformLayer = m_graphicsLayer->platformLayer(); | 132 m_platformLayer = m_graphicsLayer->platformLayer(); |
| 133 ASSERT_TRUE(m_platformLayer); | 133 ASSERT_TRUE(m_platformLayer); |
| 134 | 134 |
| 135 ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); | 135 ASSERT_TRUE(m_platformLayer->hasActiveAnimationForTesting()); |
| 136 player.compositorPlayer()->removeAnimation(animationId); | 136 player.compositorPlayer()->removeAnimation(animationId); |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 198 |
| 199 WebDoublePoint scrollPosition(7, 9); | 199 WebDoublePoint scrollPosition(7, 9); |
| 200 m_platformLayer->setScrollPositionDouble(scrollPosition); | 200 m_platformLayer->setScrollPositionDouble(scrollPosition); |
| 201 m_graphicsLayer->didScroll(); | 201 m_graphicsLayer->didScroll(); |
| 202 | 202 |
| 203 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); | 203 EXPECT_FLOAT_EQ(scrollPosition.x, scrollableArea->scrollPositionDouble().x()
); |
| 204 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); | 204 EXPECT_FLOAT_EQ(scrollPosition.y, scrollableArea->scrollPositionDouble().y()
); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace blink | 207 } // namespace blink |
| OLD | NEW |