| 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1962 EXPECT_TRUE(overflowBScrollProperties->scroll()->userScrollableVertical()); | 1962 EXPECT_TRUE(overflowBScrollProperties->scroll()->userScrollableVertical()); |
| 1963 } | 1963 } |
| 1964 | 1964 |
| 1965 TEST_P(PaintPropertyTreeBuilderTest, SVGRootClip) | 1965 TEST_P(PaintPropertyTreeBuilderTest, SVGRootClip) |
| 1966 { | 1966 { |
| 1967 setBodyInnerHTML( | 1967 setBodyInnerHTML( |
| 1968 "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='
100px'>" | 1968 "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='
100px'>" |
| 1969 " <rect width='200' height='200' fill='red' />" | 1969 " <rect width='200' height='200' fill='red' />" |
| 1970 "</svg>"); | 1970 "</svg>"); |
| 1971 | 1971 |
| 1972 const ClipPaintPropertyNode* clip = getLayoutObjectByElementId("svg")->objec
tPaintProperties()->overflowClip(); | 1972 const ClipPaintPropertyNode* clip = getLayoutObjectByElementId("svg")->objec
tPaintProperties()->svgRootViewportClip(); |
| 1973 EXPECT_EQ(frameContentClip(), clip->parent()); | 1973 EXPECT_EQ(frameContentClip(), clip->parent()); |
| 1974 EXPECT_EQ(FloatRoundedRect(8, 8, 100, 100), clip->clipRect()); | 1974 EXPECT_EQ(FloatRoundedRect(8, 8, 100, 100), clip->clipRect()); |
| 1975 } | 1975 } |
| 1976 | 1976 |
| 1977 TEST_P(PaintPropertyTreeBuilderTest, SVGRootNoClip) | 1977 TEST_P(PaintPropertyTreeBuilderTest, SVGRootNoClip) |
| 1978 { | 1978 { |
| 1979 setBodyInnerHTML( | 1979 setBodyInnerHTML( |
| 1980 "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='
100px' style='overflow: visible'>" | 1980 "<svg id='svg' xmlns='http://www.w3.org/2000/svg' width='100px' height='
100px' style='overflow: visible'>" |
| 1981 " <rect width='200' height='200' fill='red' />" | 1981 " <rect width='200' height='200' fill='red' />" |
| 1982 "</svg>"); | 1982 "</svg>"); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2106 | 2106 |
| 2107 // Removing a main thread scrolling reason should update the entire tree. | 2107 // Removing a main thread scrolling reason should update the entire tree. |
| 2108 overflowB->removeAttribute("class"); | 2108 overflowB->removeAttribute("class"); |
| 2109 document().view()->updateAllLifecyclePhases(); | 2109 document().view()->updateAllLifecyclePhases(); |
| 2110 EXPECT_FALSE(overflowA->layoutObject()->objectPaintProperties()->scroll()->h
asMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackgroundAttachment
FixedObjects)); | 2110 EXPECT_FALSE(overflowA->layoutObject()->objectPaintProperties()->scroll()->h
asMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackgroundAttachment
FixedObjects)); |
| 2111 EXPECT_FALSE(overflowB->layoutObject()->objectPaintProperties()->scroll()->h
asMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackgroundAttachment
FixedObjects)); | 2111 EXPECT_FALSE(overflowB->layoutObject()->objectPaintProperties()->scroll()->h
asMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackgroundAttachment
FixedObjects)); |
| 2112 EXPECT_FALSE(overflowB->layoutObject()->objectPaintProperties()->scroll()->p
arent()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackground
AttachmentFixedObjects)); | 2112 EXPECT_FALSE(overflowB->layoutObject()->objectPaintProperties()->scroll()->p
arent()->hasMainThreadScrollingReasons(MainThreadScrollingReason::kHasBackground
AttachmentFixedObjects)); |
| 2113 } | 2113 } |
| 2114 | 2114 |
| 2115 } // namespace blink | 2115 } // namespace blink |
| OLD | NEW |