| 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 914 mapping = paint_layer->GetCompositedLayerMapping(); | 914 mapping = paint_layer->GetCompositedLayerMapping(); |
| 915 EXPECT_FALSE(mapping->DecorationOutlineLayer()); | 915 EXPECT_FALSE(mapping->DecorationOutlineLayer()); |
| 916 } | 916 } |
| 917 | 917 |
| 918 TEST_P(CompositedLayerMappingTest, | 918 TEST_P(CompositedLayerMappingTest, |
| 919 BackgroundPaintedIntoGraphicsLayerIfNotCompositedScrolling) { | 919 BackgroundPaintedIntoGraphicsLayerIfNotCompositedScrolling) { |
| 920 GetDocument().GetFrame()->GetSettings()->SetPreferCompositingToLCDTextEnabled( | 920 GetDocument().GetFrame()->GetSettings()->SetPreferCompositingToLCDTextEnabled( |
| 921 true); | 921 true); |
| 922 SetBodyInnerHTML( | 922 SetBodyInnerHTML( |
| 923 "<div id='container' style='overflow: scroll; width: 300px; height: " | 923 "<div id='container' style='overflow: scroll; width: 300px; height: " |
| 924 "300px; border-radius: 5px; background: white; will-change: transform;'>" | 924 "300px; background: white; will-change: transform;'>" |
| 925 " <div style='background-color: blue; width: 2000px; height: " | 925 " <div style='background-color: blue; clip-path: circle(600px at " |
| 926 "1000px 1000px); width: 2000px; height: " |
| 926 "2000px;'></div>" | 927 "2000px;'></div>" |
| 927 "</div>"); | 928 "</div>"); |
| 928 | 929 |
| 929 PaintLayer* layer = | 930 PaintLayer* layer = |
| 930 ToLayoutBlock(GetLayoutObjectByElementId("container"))->Layer(); | 931 ToLayoutBlock(GetLayoutObjectByElementId("container"))->Layer(); |
| 931 EXPECT_EQ(kBackgroundPaintInScrollingContents, | 932 EXPECT_EQ(kBackgroundPaintInScrollingContents, |
| 932 layer->GetBackgroundPaintLocation()); | 933 layer->GetBackgroundPaintLocation()); |
| 933 | 934 |
| 934 // We currently don't use composited scrolling when the container has a | 935 // We currently don't use composited scrolling when the container has a |
| 935 // border-radius so even though we can paint the background onto the scrolling | 936 // border-radius so even though we can paint the background onto the scrolling |
| (...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1799 IntPoint(outer_sticky_constraint.parent_relative_sticky_box_offset)); | 1800 IntPoint(outer_sticky_constraint.parent_relative_sticky_box_offset)); |
| 1800 EXPECT_EQ( | 1801 EXPECT_EQ( |
| 1801 IntPoint(0, 0), | 1802 IntPoint(0, 0), |
| 1802 IntPoint(middle_sticky_constraint.parent_relative_sticky_box_offset)); | 1803 IntPoint(middle_sticky_constraint.parent_relative_sticky_box_offset)); |
| 1803 EXPECT_EQ( | 1804 EXPECT_EQ( |
| 1804 IntPoint(0, 5), | 1805 IntPoint(0, 5), |
| 1805 IntPoint(inner_sticky_constraint.parent_relative_sticky_box_offset)); | 1806 IntPoint(inner_sticky_constraint.parent_relative_sticky_box_offset)); |
| 1806 } | 1807 } |
| 1807 | 1808 |
| 1808 } // namespace blink | 1809 } // namespace blink |
| OLD | NEW |