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 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 // floats and out-of-flow positioned objects may be affected by a break-after | 2233 // floats and out-of-flow positioned objects may be affected by a break-after |
2234 // value of the previous in-flow object, even though we're not at a class A | 2234 // value of the previous in-flow object, even though we're not at a class A |
2235 // break point. | 2235 // break point. |
2236 EBreak breakValue = isFloatingOrOutOfFlowPositioned() | 2236 EBreak breakValue = isFloatingOrOutOfFlowPositioned() |
2237 ? previousBreakAfterValue | 2237 ? previousBreakAfterValue |
2238 : classABreakPointValue(previousBreakAfterValue); | 2238 : classABreakPointValue(previousBreakAfterValue); |
2239 return isForcedFragmentainerBreakValue(breakValue); | 2239 return isForcedFragmentainerBreakValue(breakValue); |
2240 } | 2240 } |
2241 | 2241 |
2242 bool LayoutBox::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2242 bool LayoutBox::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
2243 // In case scrollbars got repositioned (which will typically happen if the box | 2243 if (hasNonCompositedScrollbars() || getSelectionState() != SelectionNone || |
2244 // got resized), we cannot skip invalidation. | 2244 hasBoxDecorationBackground() || styleRef().hasBoxDecorations() || |
2245 if (hasNonCompositedScrollbars()) | 2245 styleRef().hasVisualOverflowingEffect()) |
2246 return false; | 2246 return false; |
2247 | 2247 |
2248 // Cannot skip paint invalidation if the box has real things to paint. | 2248 // If the box has clip or mask, we need issue paint invalidation to cover |
2249 if (getSelectionState() != SelectionNone || hasBoxDecorationBackground() || | 2249 // the changed part of children when the box got resized. In SPv2 this is |
2250 styleRef().hasBoxDecorations() || styleRef().hasVisualOverflowingEffect()) | 2250 // handled by detecting paint property changes. |
2251 return false; | 2251 if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()) { |
2252 | 2252 if (hasClipRelatedProperty() || hasControlClip() || hasMask()) |
2253 // If the box has clip, we need issue a paint invalidation to cover the | 2253 return false; |
2254 // changed part of children because of change of clip when the box got | 2254 } |
2255 // resized. In theory the children should invalidate themselves when ancestor | |
2256 // clip changes, but for now this is missing and ensuring it may hurt | |
2257 // performance. | |
2258 // TODO(wangxianzhu): Paint invalidation for clip change will be different in | |
2259 // spv2. | |
2260 if (hasClipRelatedProperty() || hasControlClip()) | |
2261 return false; | |
2262 | 2255 |
2263 return true; | 2256 return true; |
2264 } | 2257 } |
2265 | 2258 |
2266 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const { | 2259 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const { |
2267 if (style()->visibility() != EVisibility::Visible) | 2260 if (style()->visibility() != EVisibility::Visible) |
2268 return LayoutRect(); | 2261 return LayoutRect(); |
2269 | 2262 |
2270 return selfVisualOverflowRect(); | 2263 return selfVisualOverflowRect(); |
2271 } | 2264 } |
(...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5595 LayoutRect rect = frameRect(); | 5588 LayoutRect rect = frameRect(); |
5596 | 5589 |
5597 LayoutBlock* block = containingBlock(); | 5590 LayoutBlock* block = containingBlock(); |
5598 if (block) | 5591 if (block) |
5599 block->adjustChildDebugRect(rect); | 5592 block->adjustChildDebugRect(rect); |
5600 | 5593 |
5601 return rect; | 5594 return rect; |
5602 } | 5595 } |
5603 | 5596 |
5604 } // namespace blink | 5597 } // namespace blink |
OLD | NEW |