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

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

Issue 2890013002: 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 728 matching lines...) Expand 10 before | Expand all | Expand 10 after
744 auto* transform = child->PaintProperties()->Transform(); 745 auto* transform = child->PaintProperties()->Transform();
745 EXPECT_TRUE(transform->FlattensInheritedTransform()); 746 EXPECT_TRUE(transform->FlattensInheritedTransform());
746 747
747 GetDocument().GetElementById("parent")->setAttribute( 748 GetDocument().GetElementById("parent")->setAttribute(
748 HTMLNames::styleAttr, "transform-style: preserve-3d"); 749 HTMLNames::styleAttr, "transform-style: preserve-3d");
749 GetDocument().View()->UpdateAllLifecyclePhases(); 750 GetDocument().View()->UpdateAllLifecyclePhases();
750 EXPECT_EQ(transform, child->PaintProperties()->Transform()); 751 EXPECT_EQ(transform, child->PaintProperties()->Transform());
751 EXPECT_FALSE(transform->FlattensInheritedTransform()); 752 EXPECT_FALSE(transform->FlattensInheritedTransform());
752 } 753 }
753 754
755 TEST_P(PaintPropertyTreeUpdateTest, MenuListControlClipChange) {
756 SetBodyInnerHTML(
757 "<select id='select' style='white-space: normal'>"
758 " <option></option>"
759 " <option>bar</option>"
760 "</select>");
761
762 auto* select = GetLayoutObjectByElementId("select");
763 EXPECT_NE(nullptr, select->PaintProperties()->OverflowClip());
764
765 // Should not assert in FindPropertiesNeedingUpdate.
766 toHTMLSelectElement(select->GetNode())->setSelectedIndex(1);
767 GetDocument().View()->UpdateAllLifecyclePhases();
768 EXPECT_NE(nullptr, select->PaintProperties()->OverflowClip());
769 }
770
754 } // namespace blink 771 } // 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