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

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

Issue 2874413003: LayoutMenuList::ControlClipRect may depend on size of children (Closed)
Patch Set: - 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 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/html/HTMLIFrameElement.h" 5 #include "core/html/HTMLIFrameElement.h"
6 #include "core/html/HTMLSelectElement.h"
6 #include "core/paint/PaintPropertyTreeBuilderTest.h" 7 #include "core/paint/PaintPropertyTreeBuilderTest.h"
7 #include "core/paint/PaintPropertyTreePrinter.h" 8 #include "core/paint/PaintPropertyTreePrinter.h"
8 9
9 namespace blink { 10 namespace blink {
10 11
11 // Tests covering incremental updates of paint property trees. 12 // Tests covering incremental updates of paint property trees.
12 class PaintPropertyTreeUpdateTest : public PaintPropertyTreeBuilderTest {}; 13 class PaintPropertyTreeUpdateTest : public PaintPropertyTreeBuilderTest {};
13 14
14 INSTANTIATE_TEST_CASE_P(All, PaintPropertyTreeUpdateTest, ::testing::Bool()); 15 INSTANTIATE_TEST_CASE_P(All, PaintPropertyTreeUpdateTest, ::testing::Bool());
15 16
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 auto* transform = child->PaintProperties()->Transform(); 746 auto* transform = child->PaintProperties()->Transform();
746 EXPECT_TRUE(transform->FlattensInheritedTransform()); 747 EXPECT_TRUE(transform->FlattensInheritedTransform());
747 748
748 GetDocument().getElementById("parent")->setAttribute( 749 GetDocument().getElementById("parent")->setAttribute(
749 HTMLNames::styleAttr, "transform-style: preserve-3d"); 750 HTMLNames::styleAttr, "transform-style: preserve-3d");
750 GetDocument().View()->UpdateAllLifecyclePhases(); 751 GetDocument().View()->UpdateAllLifecyclePhases();
751 EXPECT_EQ(transform, child->PaintProperties()->Transform()); 752 EXPECT_EQ(transform, child->PaintProperties()->Transform());
752 EXPECT_FALSE(transform->FlattensInheritedTransform()); 753 EXPECT_FALSE(transform->FlattensInheritedTransform());
753 } 754 }
754 755
756 TEST_P(PaintPropertyTreeUpdateTest, MenuListControlClipChange) {
757 SetBodyInnerHTML(
758 "<select id='select' style='white-space: normal'>"
759 " <option></option>"
760 " <option>bar</option>"
761 "</select>");
762
763 auto* select = GetLayoutObjectByElementId("select");
764 EXPECT_NE(nullptr, select->PaintProperties()->OverflowClip());
765
766 // Should not assert in FindPropertiesNeedingUpdate.
767 toHTMLSelectElement(select->GetNode())->setSelectedIndex(1);
768 GetDocument().View()->UpdateAllLifecyclePhases();
769 EXPECT_NE(nullptr, select->PaintProperties()->OverflowClip());
770 }
771
755 } // namespace blink 772 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutMenuList.cpp ('k') | third_party/WebKit/Source/core/paint/PrePaintTreeWalk.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698