| 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 30 matching lines...) Expand all Loading... |
| 41 setBodyInnerHTML( | 41 setBodyInnerHTML( |
| 42 "<!DOCTYPE html>" | 42 "<!DOCTYPE html>" |
| 43 "<svg id=target width=200 height=300 style='position: relative'>" | 43 "<svg id=target width=200 height=300 style='position: relative'>" |
| 44 " <rect width=400 height=500 fill='blue'/>" | 44 " <rect width=400 height=500 fill='blue'/>" |
| 45 "</svg>"); | 45 "</svg>"); |
| 46 | 46 |
| 47 Element* target = document().getElementById("target"); | 47 Element* target = document().getElementById("target"); |
| 48 PaintLayer* targetPaintLayer = | 48 PaintLayer* targetPaintLayer = |
| 49 toLayoutBoxModelObject(target->layoutObject())->layer(); | 49 toLayoutBoxModelObject(target->layoutObject())->layer(); |
| 50 ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects, | 50 ClipRectsContext context(document().layoutView()->layer(), UncachedClipRects, |
| 51 IgnorePlatformOverlayScrollbarSize, | 51 IgnoreOverlayScrollbarSize, |
| 52 LayoutSize(FloatSize(0.25, 0.35))); | 52 LayoutSize(FloatSize(0.25, 0.35))); |
| 53 // When RLS is enabled, the LayoutView will have a composited scrolling layer, | 53 // When RLS is enabled, the LayoutView will have a composited scrolling layer, |
| 54 // so don't apply an overflow clip. | 54 // so don't apply an overflow clip. |
| 55 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) | 55 if (RuntimeEnabledFeatures::rootLayerScrollingEnabled()) |
| 56 context.setIgnoreOverflowClip(); | 56 context.setIgnoreOverflowClip(); |
| 57 LayoutRect layerBounds; | 57 LayoutRect layerBounds; |
| 58 ClipRect backgroundRect, foregroundRect; | 58 ClipRect backgroundRect, foregroundRect; |
| 59 | 59 |
| 60 PaintLayer::GeometryMapperOption option = PaintLayer::DoNotUseGeometryMapper; | 60 PaintLayer::GeometryMapperOption option = PaintLayer::DoNotUseGeometryMapper; |
| 61 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) | 61 if (RuntimeEnabledFeatures::slimmingPaintInvalidationEnabled()) |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 option = PaintLayer::UseGeometryMapper; | 441 option = PaintLayer::UseGeometryMapper; |
| 442 parent->clipper(option).clearClipRectsIncludingDescendants(AbsoluteClipRects); | 442 parent->clipper(option).clearClipRectsIncludingDescendants(AbsoluteClipRects); |
| 443 | 443 |
| 444 EXPECT_TRUE(parent->clipRectsCache()); | 444 EXPECT_TRUE(parent->clipRectsCache()); |
| 445 EXPECT_TRUE(child->clipRectsCache()); | 445 EXPECT_TRUE(child->clipRectsCache()); |
| 446 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); | 446 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); |
| 447 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); | 447 EXPECT_FALSE(parent->clipRectsCache()->get(AbsoluteClipRects).root); |
| 448 } | 448 } |
| 449 | 449 |
| 450 } // namespace blink | 450 } // namespace blink |
| OLD | NEW |