| 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 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3140 EXPECT_EQ(0.5f, effect->opacity()); | 3140 EXPECT_EQ(0.5f, effect->opacity()); |
| 3141 | 3141 |
| 3142 LayoutObject* target = getLayoutObjectByElementId("target"); | 3142 LayoutObject* target = getLayoutObjectByElementId("target"); |
| 3143 const auto* localBorderBoxProperties = | 3143 const auto* localBorderBoxProperties = |
| 3144 target->paintProperties()->localBorderBoxProperties(); | 3144 target->paintProperties()->localBorderBoxProperties(); |
| 3145 ASSERT_TRUE(localBorderBoxProperties); | 3145 ASSERT_TRUE(localBorderBoxProperties); |
| 3146 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset()); | 3146 EXPECT_EQ(LayoutPoint(66, 55), target->paintOffset()); |
| 3147 EXPECT_EQ(effect, localBorderBoxProperties->effect()); | 3147 EXPECT_EQ(effect, localBorderBoxProperties->effect()); |
| 3148 } | 3148 } |
| 3149 | 3149 |
| 3150 TEST_P(PaintPropertyTreeBuilderTest, ScrollNodeHasCompositorElementId) { |
| 3151 setBodyInnerHTML( |
| 3152 "<div id='target' style='overflow: auto; width: 100px; height: 100px'>" |
| 3153 " <div style='width: 200px; height: 200px'></div>" |
| 3154 "</div>"); |
| 3155 |
| 3156 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); |
| 3157 EXPECT_TRUE(properties->scroll()); |
| 3158 EXPECT_NE(CompositorElementId(), properties->scroll()->compositorElementId()); |
| 3159 } |
| 3160 |
| 3150 } // namespace blink | 3161 } // namespace blink |
| OLD | NEW |