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

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

Issue 2821183002: Don't update descendant visual rects on border radius change (Closed)
Patch Set: - Created 3 years, 8 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
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/layout/LayoutTestHelper.h" 5 #include "core/layout/LayoutTestHelper.h"
6 #include "core/layout/LayoutTreeAsText.h" 6 #include "core/layout/LayoutTreeAsText.h"
7 #include "core/layout/api/LayoutViewItem.h" 7 #include "core/layout/api/LayoutViewItem.h"
8 #include "core/paint/ObjectPaintProperties.h" 8 #include "core/paint/ObjectPaintProperties.h"
9 #include "core/paint/PaintLayer.h" 9 #include "core/paint/PaintLayer.h"
10 #include "core/paint/PaintPropertyTreePrinter.h" 10 #include "core/paint/PaintPropertyTreePrinter.h"
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 GetDocument().View()->UpdateAllLifecyclePhases(); 329 GetDocument().View()->UpdateAllLifecyclePhases();
330 330
331 // In SPv2 mode, VisualRects are in the space of the containing transform 331 // In SPv2 mode, VisualRects are in the space of the containing transform
332 // node without applying any ancestor property nodes, including clip. 332 // node without applying any ancestor property nodes, including clip.
333 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled()) 333 if (RuntimeEnabledFeatures::slimmingPaintV2Enabled())
334 EXPECT_EQ(200, grandchild->VisualRect().Height()); 334 EXPECT_EQ(200, grandchild->VisualRect().Height());
335 else 335 else
336 EXPECT_EQ(75, grandchild->VisualRect().Height()); 336 EXPECT_EQ(75, grandchild->VisualRect().Height());
337 } 337 }
338 338
339 TEST_P(PrePaintTreeWalkTest, ClipChangeHasRadius) {
340 SetBodyInnerHTML(
341 "<style>"
342 " #target {"
343 " position: absolute;"
344 " z-index: 0;"
345 " overflow: hidden;"
346 " width: 50px;"
347 " height: 50px;"
348 " }"
349 "</style>"
350 "<div id='target'></div>");
351
352 auto* target = GetDocument().GetElementById("target");
353 auto* target_object = ToLayoutBoxModelObject(target->GetLayoutObject());
354 target->setAttribute(HTMLNames::styleAttr, "border-radius: 5px");
355 GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
356 EXPECT_TRUE(target_object->Layer()->NeedsRepaint());
357 // And should not trigger any assert failure.
358 GetDocument().View()->UpdateAllLifecyclePhases();
359 }
360
339 } // namespace blink 361 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698