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

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

Issue 2638333007: Add compositor element id for scroll nodes in SPv2. (Closed)
Patch Set: Sync to head. 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 3129 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698