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

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

Issue 2829673002: 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 EXPECT_FALSE(child_paint_layer->NeedsPaintPhaseFloat()); 254 EXPECT_FALSE(child_paint_layer->NeedsPaintPhaseFloat());
255 255
256 // This changes clips for absolute-positioned descendants of "child" but not 256 // This changes clips for absolute-positioned descendants of "child" but not
257 // normal-position ones, which are already clipped to 50x50. 257 // normal-position ones, which are already clipped to 50x50.
258 parent->setAttribute(HTMLNames::classAttr, "clip"); 258 parent->setAttribute(HTMLNames::classAttr, "clip");
259 GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint(); 259 GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
260 260
261 EXPECT_TRUE(child_paint_layer->NeedsRepaint()); 261 EXPECT_TRUE(child_paint_layer->NeedsRepaint());
262 } 262 }
263 263
264 TEST_P(PrePaintTreeWalkTest, ClipChangeHasRadius) {
265 SetBodyInnerHTML(
266 "<style>"
267 " #target {"
268 " position: absolute;"
269 " z-index: 0;"
270 " overflow: hidden;"
271 " width: 50px;"
272 " height: 50px;"
273 " }"
274 "</style>"
275 "<div id='target'></div>");
276
277 auto* target = GetDocument().GetElementById("target");
278 auto* target_object = ToLayoutBoxModelObject(target->GetLayoutObject());
279 target->setAttribute(HTMLNames::styleAttr, "border-radius: 5px");
280 GetDocument().View()->UpdateAllLifecyclePhasesExceptPaint();
281 EXPECT_TRUE(target_object->Layer()->NeedsRepaint());
282 // And should not trigger any assert failure.
283 GetDocument().View()->UpdateAllLifecyclePhases();
284 }
285
264 } // namespace blink 286 } // 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