| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/PaintPropertyTreePrinter.h" | 9 #include "core/paint/PaintPropertyTreePrinter.h" |
| 10 #include "platform/graphics/paint/GeometryMapper.h" | 10 #include "platform/graphics/paint/GeometryMapper.h" |
| (...skipping 2913 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2924 EXPECT_FALSE(innerDivWithTransform->descendantNeedsPaintPropertyUpdate()); | 2924 EXPECT_FALSE(innerDivWithTransform->descendantNeedsPaintPropertyUpdate()); |
| 2925 | 2925 |
| 2926 // After a lifecycle update, no nodes should need a descendant update. | 2926 // After a lifecycle update, no nodes should need a descendant update. |
| 2927 frameView->updateAllLifecyclePhases(); | 2927 frameView->updateAllLifecyclePhases(); |
| 2928 EXPECT_FALSE(document().layoutView()->descendantNeedsPaintPropertyUpdate()); | 2928 EXPECT_FALSE(document().layoutView()->descendantNeedsPaintPropertyUpdate()); |
| 2929 EXPECT_FALSE(divWithTransform->descendantNeedsPaintPropertyUpdate()); | 2929 EXPECT_FALSE(divWithTransform->descendantNeedsPaintPropertyUpdate()); |
| 2930 EXPECT_FALSE(childLayoutView->descendantNeedsPaintPropertyUpdate()); | 2930 EXPECT_FALSE(childLayoutView->descendantNeedsPaintPropertyUpdate()); |
| 2931 EXPECT_FALSE(innerDivWithTransform->descendantNeedsPaintPropertyUpdate()); | 2931 EXPECT_FALSE(innerDivWithTransform->descendantNeedsPaintPropertyUpdate()); |
| 2932 } | 2932 } |
| 2933 | 2933 |
| 2934 TEST_P(PaintPropertyTreeBuilderTest, UpdatingFrameViewContentClip) { |
| 2935 setBodyInnerHTML("hello world."); |
| 2936 EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect()); |
| 2937 document().view()->resize(800, 599); |
| 2938 document().view()->updateAllLifecyclePhases(); |
| 2939 EXPECT_EQ(FloatRoundedRect(0, 0, 800, 599), frameContentClip()->clipRect()); |
| 2940 document().view()->resize(800, 600); |
| 2941 document().view()->updateAllLifecyclePhases(); |
| 2942 EXPECT_EQ(FloatRoundedRect(0, 0, 800, 600), frameContentClip()->clipRect()); |
| 2943 document().view()->resize(5, 5); |
| 2944 document().view()->updateAllLifecyclePhases(); |
| 2945 EXPECT_EQ(FloatRoundedRect(0, 0, 5, 5), frameContentClip()->clipRect()); |
| 2946 } |
| 2947 |
| 2934 } // namespace blink | 2948 } // namespace blink |
| OLD | NEW |