| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/compositing/CompositedLayerMapping.h" | 5 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 6 | 6 |
| 7 #include "core/frame/FrameView.h" | 7 #include "core/frame/FrameView.h" |
| 8 #include "core/layout/LayoutBoxModelObject.h" | 8 #include "core/layout/LayoutBoxModelObject.h" |
| 9 #include "core/layout/LayoutTestHelper.h" | 9 #include "core/layout/LayoutTestHelper.h" |
| 10 #include "core/layout/api/LayoutViewItem.h" | 10 #include "core/layout/api/LayoutViewItem.h" |
| (...skipping 856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 867 mapping = paintLayer->compositedLayerMapping(); | 867 mapping = paintLayer->compositedLayerMapping(); |
| 868 EXPECT_FALSE(paintLayer->needsCompositedScrolling()); | 868 EXPECT_FALSE(paintLayer->needsCompositedScrolling()); |
| 869 EXPECT_FALSE(mapping->decorationOutlineLayer()); | 869 EXPECT_FALSE(mapping->decorationOutlineLayer()); |
| 870 } | 870 } |
| 871 | 871 |
| 872 TEST_P(CompositedLayerMappingTest, | 872 TEST_P(CompositedLayerMappingTest, |
| 873 DecorationOutlineLayerCreatedAndDestroyedInCompositedScrolling) { | 873 DecorationOutlineLayerCreatedAndDestroyedInCompositedScrolling) { |
| 874 setBodyInnerHTML( | 874 setBodyInnerHTML( |
| 875 "<style>" | 875 "<style>" |
| 876 "#scroller { overflow: scroll; height: 200px; width: 200px; background: " | 876 "#scroller { overflow: scroll; height: 200px; width: 200px; background: " |
| 877 "white local content-box; outline: 1px solid blue; contain: paint; }" | 877 "white local content-box; outline: 1px solid blue;}" |
| 878 "#scrolled { height: 300px; }" | 878 "#scrolled { height: 300px; }" |
| 879 "</style>" | 879 "</style>" |
| 880 "<div id=\"parent\">" | 880 "<div id=\"parent\">" |
| 881 " <div id=\"scroller\"><div id=\"scrolled\"></div></div>" | 881 " <div id=\"scroller\"><div id=\"scrolled\"></div></div>" |
| 882 "</div>"); | 882 "</div>"); |
| 883 document().view()->updateAllLifecyclePhases(); | 883 document().view()->updateAllLifecyclePhases(); |
| 884 | 884 |
| 885 Element* scroller = document().getElementById("scroller"); | 885 Element* scroller = document().getElementById("scroller"); |
| 886 PaintLayer* paintLayer = | 886 PaintLayer* paintLayer = |
| 887 toLayoutBoxModelObject(scroller->layoutObject())->layer(); | 887 toLayoutBoxModelObject(scroller->layoutObject())->layer(); |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1077 document().view()->updateAllLifecyclePhases(); | 1077 document().view()->updateAllLifecyclePhases(); |
| 1078 ASSERT_EQ(document().documentElement(), | 1078 ASSERT_EQ(document().documentElement(), |
| 1079 rootScrollerController.globalRootScroller()); | 1079 rootScrollerController.globalRootScroller()); |
| 1080 | 1080 |
| 1081 EXPECT_TRUE(mapping3->clippingLayer()); | 1081 EXPECT_TRUE(mapping3->clippingLayer()); |
| 1082 EXPECT_TRUE(mapping3->clippingLayer()->platformLayer()->masksToBounds()); | 1082 EXPECT_TRUE(mapping3->clippingLayer()->platformLayer()->masksToBounds()); |
| 1083 } | 1083 } |
| 1084 } | 1084 } |
| 1085 | 1085 |
| 1086 } // namespace blink | 1086 } // namespace blink |
| OLD | NEW |