| 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/paint/PaintLayerClipper.h" | 5 #include "core/paint/PaintLayerClipper.h" |
| 6 | 6 |
| 7 #include "core/layout/LayoutBoxModelObject.h" | 7 #include "core/layout/LayoutBoxModelObject.h" |
| 8 #include "core/layout/LayoutTestHelper.h" | 8 #include "core/layout/LayoutTestHelper.h" |
| 9 #include "core/layout/LayoutView.h" | 9 #include "core/layout/LayoutView.h" |
| 10 #include "core/paint/PaintLayer.h" | 10 #include "core/paint/PaintLayer.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 setBodyInnerHTML( | 46 setBodyInnerHTML( |
| 47 "<!DOCTYPE html>" | 47 "<!DOCTYPE html>" |
| 48 "<svg id=target width=200 height=300 style='position: relative'>" | 48 "<svg id=target width=200 height=300 style='position: relative'>" |
| 49 " <rect width=400 height=500 fill='blue'/>" | 49 " <rect width=400 height=500 fill='blue'/>" |
| 50 "</svg>"); | 50 "</svg>"); |
| 51 | 51 |
| 52 Element* target = document().getElementById("target"); | 52 Element* target = document().getElementById("target"); |
| 53 PaintLayer* targetPaintLayer = | 53 PaintLayer* targetPaintLayer = |
| 54 toLayoutBoxModelObject(target->layoutObject())->layer(); | 54 toLayoutBoxModelObject(target->layoutObject())->layer(); |
| 55 ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects, | 55 ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects, |
| 56 IgnoreOverlayScrollbarSize, | 56 IgnorePlatformOverlayScrollbarSize, |
| 57 LayoutSize(FloatSize(0.25, 0.35))); | 57 LayoutSize(FloatSize(0.25, 0.35))); |
| 58 // When RLS is enabled, the LayoutView will have a composited scrolling layer, | 58 // When RLS is enabled, the LayoutView will have a composited scrolling layer, |
| 59 // so don't apply an overflow clip. | 59 // so don't apply an overflow clip. |
| 60 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 60 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| 61 context.setIgnoreOverflowClip(); | 61 context.setIgnoreOverflowClip(); |
| 62 LayoutRect layerBounds; | 62 LayoutRect layerBounds; |
| 63 ClipRect backgroundRect, foregroundRect; | 63 ClipRect backgroundRect, foregroundRect; |
| 64 | 64 |
| 65 PaintLayer::GeometryMapperOption option = PaintLayer::DoNotUseGeometryMapper; | 65 PaintLayer::GeometryMapperOption option = PaintLayer::DoNotUseGeometryMapper; |
| 66 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 66 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 option = PaintLayer::UseGeometryMapper; | 446 option = PaintLayer::UseGeometryMapper; |
| 447 parent->clipper(option).clearClipRectsIncludingDescendants(AbsoluteClipRects); | 447 parent->clipper(option).clearClipRectsIncludingDescendants(AbsoluteClipRects); |
| 448 | 448 |
| 449 EXPECT_TRUE(parent->clipRectsCache()); | 449 EXPECT_TRUE(parent->clipRectsCache()); |
| 450 EXPECT_TRUE(child->clipRectsCache()); | 450 EXPECT_TRUE(child->clipRectsCache()); |
| 451 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); | 451 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); |
| 452 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); | 452 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); |
| 453 } | 453 } |
| 454 | 454 |
| 455 } // namespace blink | 455 } // namespace blink |
| OLD | NEW |