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, StackedFloatUnderStackedInline) { |
| 3151 setBodyInnerHTML( |
| 3152 "<div style='position: absolute; top: 55px; left: 66px'>" |
| 3153 " <span id='span'" |
| 3154 " style='position: relative; top: 100px; left: 200px; opacity: 0.5'>" |
| 3155 " <div id='target' style='float: left; position: relative; " |
| 3156 " top: 11px; left: 22px; width: 33px; height: 44px'>" |
| 3157 " </div>" |
| 3158 " </span>" |
| 3159 "</div>"); |
| 3160 |
| 3161 LayoutObject* span = getLayoutObjectByElementId("span"); |
| 3162 const auto* effect = span->paintProperties()->effect(); |
| 3163 ASSERT_TRUE(effect); |
| 3164 EXPECT_EQ(0.5f, effect->opacity()); |
| 3165 |
| 3166 LayoutObject* target = getLayoutObjectByElementId("target"); |
| 3167 const auto* localBorderBoxProperties = |
| 3168 target->paintProperties()->localBorderBoxProperties(); |
| 3169 ASSERT_TRUE(localBorderBoxProperties); |
| 3170 EXPECT_EQ(LayoutPoint(288, 166), target->paintOffset()); |
| 3171 EXPECT_EQ(effect, localBorderBoxProperties->effect()); |
| 3172 } |
| 3173 |
3150 } // namespace blink | 3174 } // namespace blink |
OLD | NEW |