OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
9 * | 9 * |
10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
(...skipping 2259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2270 return false; | 2270 return false; |
2271 | 2271 |
2272 // If the box has clip or mask, we need issue paint invalidation to cover | 2272 // If the box has clip or mask, we need issue paint invalidation to cover |
2273 // the changed part of children when the box got resized. In SPv2 this is | 2273 // the changed part of children when the box got resized. In SPv2 this is |
2274 // handled by detecting paint property changes. | 2274 // handled by detecting paint property changes. |
2275 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { | 2275 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
2276 if (hasClipRelatedProperty() || hasControlClip() || hasMask()) | 2276 if (hasClipRelatedProperty() || hasControlClip() || hasMask()) |
2277 return false; | 2277 return false; |
2278 } | 2278 } |
2279 | 2279 |
2280 // If the box paints into its own backing, we can assume that it's painting | |
2281 // may have some effect. For example, honoring the border-radius clip on | |
2282 // a composited child paints into a mask for an otherwise non-painting | |
2283 // element, because children of that element will require the mask. | |
2284 if (hasLayer() && layer()->compositingState() == PaintsIntoOwnBacking) | |
Stephen Chennney
2017/01/04 19:22:46
This is to avoid the assert that verifies an empty
| |
2285 return false; | |
2286 | |
2280 return true; | 2287 return true; |
2281 } | 2288 } |
2282 | 2289 |
2283 LayoutRect LayoutBox::localVisualRect() const { | 2290 LayoutRect LayoutBox::localVisualRect() const { |
2284 if (style()->visibility() != EVisibility::Visible) | 2291 if (style()->visibility() != EVisibility::Visible) |
2285 return LayoutRect(); | 2292 return LayoutRect(); |
2286 | 2293 |
2287 if (hasMask() && !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) | 2294 if (hasMask() && !RuntimeEnabledFeatures::slimmingPaintV2Enabled()) |
2288 return LayoutRect(layer()->boxForFilterOrMask()); | 2295 return LayoutRect(layer()->boxForFilterOrMask()); |
2289 return selfVisualOverflowRect(); | 2296 return selfVisualOverflowRect(); |
(...skipping 3399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5689 block->adjustChildDebugRect(rect); | 5696 block->adjustChildDebugRect(rect); |
5690 | 5697 |
5691 return rect; | 5698 return rect; |
5692 } | 5699 } |
5693 | 5700 |
5694 bool LayoutBox::shouldClipOverflow() const { | 5701 bool LayoutBox::shouldClipOverflow() const { |
5695 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5702 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
5696 } | 5703 } |
5697 | 5704 |
5698 } // namespace blink | 5705 } // namespace blink |
OLD | NEW |