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

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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!RuntimeEnabledFeatures::rootLayerScrollingEnabled()) {
275 // No scroll properties should be present. 275 // No scroll properties should be present.
276 EXPECT_EQ(nullptr, frame_view->GetLayoutView()->PaintProperties()); 276 EXPECT_EQ(nullptr, frame_view->GetLayoutView()->PaintProperties());
277 } 277 }
278
278 CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000), 279 CHECK_EXACT_VISUAL_RECT(LayoutRect(8, 8, 784, 10000),
279 GetDocument().body()->GetLayoutObject(), 280 GetDocument().body()->GetLayoutObject(),
280 frame_view->GetLayoutView()); 281 frame_view->GetLayoutView());
281 } 282 }
282 283
283 TEST_P(PaintPropertyTreeBuilderTest, Perspective) { 284 TEST_P(PaintPropertyTreeBuilderTest, Perspective) {
284 SetBodyInnerHTML( 285 SetBodyInnerHTML(
285 "<style>" 286 "<style>"
286 " #perspective {" 287 " #perspective {"
287 " position: absolute;" 288 " position: absolute;"
(...skipping 3182 matching lines...) Expand 10 before | Expand all | Expand 10 after
3470 3471
3471 LayoutObject& svg_root = 3472 LayoutObject& svg_root =
3472 *GetDocument().getElementById("svgroot")->GetLayoutObject(); 3473 *GetDocument().getElementById("svgroot")->GetLayoutObject();
3473 const ObjectPaintProperties* svg_root_properties = svg_root.PaintProperties(); 3474 const ObjectPaintProperties* svg_root_properties = svg_root.PaintProperties();
3474 EXPECT_TRUE(svg_root_properties->Effect()); 3475 EXPECT_TRUE(svg_root_properties->Effect());
3475 EXPECT_EQ(EffectPaintPropertyNode::Root(), 3476 EXPECT_EQ(EffectPaintPropertyNode::Root(),
3476 svg_root_properties->Effect()->Parent()); 3477 svg_root_properties->Effect()->Parent());
3477 } 3478 }
3478 3479
3479 } // namespace blink 3480 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698