| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "core/paint/PaintPropertyTreeBuilderTest.h" | 5 #include "core/paint/PaintPropertyTreeBuilderTest.h" |
| 6 | 6 |
| 7 #include "core/html/HTMLIFrameElement.h" | 7 #include "core/html/HTMLIFrameElement.h" |
| 8 #include "core/layout/LayoutTreeAsText.h" | 8 #include "core/layout/LayoutTreeAsText.h" |
| 9 #include "core/paint/ObjectPaintProperties.h" | 9 #include "core/paint/ObjectPaintProperties.h" |
| 10 #include "core/paint/PaintPropertyTreePrinter.h" | 10 #include "core/paint/PaintPropertyTreePrinter.h" |
| (...skipping 3100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3111 EXPECT_EQ(CompositorElementId(), properties->effect()->compositorElementId()); | 3111 EXPECT_EQ(CompositorElementId(), properties->effect()->compositorElementId()); |
| 3112 } | 3112 } |
| 3113 | 3113 |
| 3114 TEST_P(PaintPropertyTreeBuilderTest, | 3114 TEST_P(PaintPropertyTreeBuilderTest, |
| 3115 TransformNodeAnimatedHasCompositorElementId) { | 3115 TransformNodeAnimatedHasCompositorElementId) { |
| 3116 loadTestData("transform-animation.html"); | 3116 loadTestData("transform-animation.html"); |
| 3117 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); | 3117 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); |
| 3118 EXPECT_TRUE(properties->transform()); | 3118 EXPECT_TRUE(properties->transform()); |
| 3119 EXPECT_NE(CompositorElementId(), | 3119 EXPECT_NE(CompositorElementId(), |
| 3120 properties->transform()->compositorElementId()); | 3120 properties->transform()->compositorElementId()); |
| 3121 EXPECT_TRUE(properties->transform()->requiresCompositingForAnimation()); |
| 3121 } | 3122 } |
| 3122 | 3123 |
| 3123 TEST_P(PaintPropertyTreeBuilderTest, EffectNodeAnimatedHasCompositorElementId) { | 3124 TEST_P(PaintPropertyTreeBuilderTest, EffectNodeAnimatedHasCompositorElementId) { |
| 3124 loadTestData("opacity-animation.html"); | 3125 loadTestData("opacity-animation.html"); |
| 3125 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); | 3126 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); |
| 3126 EXPECT_TRUE(properties->effect()); | 3127 EXPECT_TRUE(properties->effect()); |
| 3127 EXPECT_NE(CompositorElementId(), properties->effect()->compositorElementId()); | 3128 EXPECT_NE(CompositorElementId(), properties->effect()->compositorElementId()); |
| 3129 EXPECT_TRUE(properties->effect()->requiresCompositingForAnimation()); |
| 3128 } | 3130 } |
| 3129 | 3131 |
| 3130 TEST_P(PaintPropertyTreeBuilderTest, FloatUnderInline) { | 3132 TEST_P(PaintPropertyTreeBuilderTest, FloatUnderInline) { |
| 3131 setBodyInnerHTML( | 3133 setBodyInnerHTML( |
| 3132 "<div style='position: absolute; top: 55px; left: 66px'>" | 3134 "<div style='position: absolute; top: 55px; left: 66px'>" |
| 3133 " <span id='span'" | 3135 " <span id='span'" |
| 3134 " style='position: relative; top: 100px; left: 200px; opacity: 0.5'>" | 3136 " style='position: relative; top: 100px; left: 200px; opacity: 0.5'>" |
| 3135 " <div id='target' style='float: left; width: 33px; height: 44px'>" | 3137 " <div id='target' style='float: left; width: 33px; height: 44px'>" |
| 3136 " </div>" | 3138 " </div>" |
| 3137 " </span" | 3139 " </span" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 3155 "<div id='target' style='overflow: auto; width: 100px; height: 100px'>" | 3157 "<div id='target' style='overflow: auto; width: 100px; height: 100px'>" |
| 3156 " <div style='width: 200px; height: 200px'></div>" | 3158 " <div style='width: 200px; height: 200px'></div>" |
| 3157 "</div>"); | 3159 "</div>"); |
| 3158 | 3160 |
| 3159 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); | 3161 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); |
| 3160 EXPECT_NE(CompositorElementId(), | 3162 EXPECT_NE(CompositorElementId(), |
| 3161 properties->scrollTranslation()->compositorElementId()); | 3163 properties->scrollTranslation()->compositorElementId()); |
| 3162 } | 3164 } |
| 3163 | 3165 |
| 3164 } // namespace blink | 3166 } // namespace blink |
| OLD | NEW |