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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp

Issue 2575423003: Fix geometry mapping issues for float under inline (Closed)
Patch Set: SVG floating Created 3 years, 11 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 // 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 3178 matching lines...) Expand 10 before | Expand all | Expand 10 after
3189 properties->transform()->compositorElementId()); 3189 properties->transform()->compositorElementId());
3190 } 3190 }
3191 3191
3192 TEST_P(PaintPropertyTreeBuilderTest, EffectNodeAnimatedHasCompositorElementId) { 3192 TEST_P(PaintPropertyTreeBuilderTest, EffectNodeAnimatedHasCompositorElementId) {
3193 loadTestData("opacity-animation.html"); 3193 loadTestData("opacity-animation.html");
3194 const ObjectPaintProperties* properties = paintPropertiesForElement("target"); 3194 const ObjectPaintProperties* properties = paintPropertiesForElement("target");
3195 EXPECT_TRUE(properties->effect()); 3195 EXPECT_TRUE(properties->effect());
3196 EXPECT_NE(CompositorElementId(), properties->effect()->compositorElementId()); 3196 EXPECT_NE(CompositorElementId(), properties->effect()->compositorElementId());
3197 } 3197 }
3198 3198
3199 TEST_P(PaintPropertyTreeBuilderTest, FloatUnderInline) {
3200 setBodyInnerHTML(
3201 "<div style='position: absolute; top: 55px; left: 66px'>"
3202 " <span id='span'"
3203 " style='position: relative; top: 100px; left: 200px; opacity: 0.5'>"
3204 " <div id='target' style='float: left; width: 33px; height: 44px'>"
3205 " </div>"
3206 " </span"
3207 "</div>");
3208
3209 LayoutObject* span = getLayoutObjectByElementId("span");
3210 const auto* effect = span->paintProperties()->effect();
3211 ASSERT_TRUE(effect);
3212 EXPECT_EQ(0.5f, effect->opacity());
3213
3214 LayoutObject* target = getLayoutObjectByElementId("target");
3215 const auto* localBorderBoxProperties =
3216 target->paintProperties()->localBorderBoxProperties();
3217 ASSERT_TRUE(localBorderBoxProperties);
3218 EXPECT_EQ(LayoutPoint(66, 55), localBorderBoxProperties->paintOffset);
3219 EXPECT_EQ(effect, localBorderBoxProperties->propertyTreeState.effect());
3220 }
3221
3199 } // namespace blink 3222 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698