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

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

Issue 2854493002: Store previous painting clip rects on FragmentData. (Closed)
Patch Set: none Created 3 years, 7 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 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 EXPECT_EQ(TransformationMatrix(), FramePreTranslation()->Matrix()); 264 EXPECT_EQ(TransformationMatrix(), FramePreTranslation()->Matrix());
265 EXPECT_TRUE(FramePreTranslation()->Parent()->IsRoot()); 265 EXPECT_TRUE(FramePreTranslation()->Parent()->IsRoot());
266 266
267 EXPECT_EQ(TransformationMatrix().Translate(0, -100), 267 EXPECT_EQ(TransformationMatrix().Translate(0, -100),
268 FrameScrollTranslation()->Matrix()); 268 FrameScrollTranslation()->Matrix());
269 EXPECT_EQ(FramePreTranslation(), FrameScrollTranslation()->Parent()); 269 EXPECT_EQ(FramePreTranslation(), FrameScrollTranslation()->Parent());
270 EXPECT_EQ(FramePreTranslation(), FrameContentClip()->LocalTransformSpace()); 270 EXPECT_EQ(FramePreTranslation(), FrameContentClip()->LocalTransformSpace());
271 EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), FrameContentClip()->ClipRect()); 271 EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), FrameContentClip()->ClipRect());
272 EXPECT_TRUE(FrameContentClip()->Parent()->IsRoot()); 272 EXPECT_TRUE(FrameContentClip()->Parent()->IsRoot());
273 273
274 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) { 274 EXPECT_TRUE(frame_view->GetLayoutView()->PaintProperties());
275 // No scroll properties should be present. 275
276 EXPECT_EQ(nullptr, frame_view->GetLayoutView()->PaintProperties());
277 }
278 CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000), 276 CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000),
279 GetDocument().body()->GetLayoutObject(), 277 GetDocument().body()->GetLayoutObject(),
280 frame_view->GetLayoutView()); 278 frame_view->GetLayoutView());
281 } 279 }
282 280
283 TEST_P(PaintPropertyTreeBuilderTest, Perspective) { 281 TEST_P(PaintPropertyTreeBuilderTest, Perspective) {
284 SetBodyInnerHTML( 282 SetBodyInnerHTML(
285 "<style>" 283 "<style>"
286 " #perspective {" 284 " #perspective {"
287 " position: absolute;" 285 " position: absolute;"
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 3468
3471 LayoutObject& svg_root = 3469 LayoutObject& svg_root =
3472 *GetDocument().getElementById("svgroot")->GetLayoutObject(); 3470 *GetDocument().getElementById("svgroot")->GetLayoutObject();
3473 const ObjectPaintProperties* svg_root_properties = svg_root.PaintProperties(); 3471 const ObjectPaintProperties* svg_root_properties = svg_root.PaintProperties();
3474 EXPECT_TRUE(svg_root_properties->Effect()); 3472 EXPECT_TRUE(svg_root_properties->Effect());
3475 EXPECT_EQ(EffectPaintPropertyNode::Root(), 3473 EXPECT_EQ(EffectPaintPropertyNode::Root(),
3476 svg_root_properties->Effect()->Parent()); 3474 svg_root_properties->Effect()->Parent());
3477 } 3475 }
3478 3476
3479 } // namespace blink 3477 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698