| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |