| 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. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 2016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2027 { | 2027 { |
| 2028 ASSERT(isBreakBetweenControllable(previousBreakAfterValue)); | 2028 ASSERT(isBreakBetweenControllable(previousBreakAfterValue)); |
| 2029 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); | 2029 return joinFragmentainerBreakValues(previousBreakAfterValue, breakBefore()); |
| 2030 } | 2030 } |
| 2031 | 2031 |
| 2032 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const | 2032 bool LayoutBox::needsForcedBreakBefore(EBreak previousBreakAfterValue) const |
| 2033 { | 2033 { |
| 2034 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); | 2034 return isForcedFragmentainerBreakValue(classABreakPointValue(previousBreakAf
terValue)); |
| 2035 } | 2035 } |
| 2036 | 2036 |
| 2037 bool LayoutBox::paintedOutputOfObjectHasNoEffect() const |
| 2038 { |
| 2039 // In case scrollbars got repositioned (which will typically happen if the b
ox got |
| 2040 // resized), we cannot skip invalidation. |
| 2041 if (hasNonCompositedScrollbars()) |
| 2042 return false; |
| 2043 |
| 2044 // Cannot skip paint invalidation if the box has real things to paint. |
| 2045 if (getSelectionState() != SelectionNone || hasBoxDecorationBackground() ||
styleRef().hasVisualOverflowingEffect()) |
| 2046 return false; |
| 2047 |
| 2048 // If the box has clip, we need issue a paint invalidation to cover the chan
ged part of |
| 2049 // children because of change of clip when the box got resized. In theory th
e children |
| 2050 // should invalidate themselves when ancestor clip changes, but for now this
is missing |
| 2051 // and ensuring it may hurt performance. |
| 2052 // TODO(wangxianzhu): Paint invalidation for clip change will be different i
n spv2. |
| 2053 if (hasClipRelatedProperty() || hasControlClip()) |
| 2054 return false; |
| 2055 |
| 2056 return true; |
| 2057 } |
| 2058 |
| 2037 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const | 2059 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
| 2038 { | 2060 { |
| 2039 if (style()->visibility() != VISIBLE) | 2061 if (style()->visibility() != VISIBLE) |
| 2040 return LayoutRect(); | 2062 return LayoutRect(); |
| 2041 | 2063 |
| 2042 return selfVisualOverflowRect(); | 2064 return selfVisualOverflowRect(); |
| 2043 } | 2065 } |
| 2044 | 2066 |
| 2045 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const | 2067 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect
& rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto
pAt) const |
| 2046 { | 2068 { |
| (...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4965 m_rareData->m_snapAreas->remove(&snapArea); | 4987 m_rareData->m_snapAreas->remove(&snapArea); |
| 4966 } | 4988 } |
| 4967 } | 4989 } |
| 4968 | 4990 |
| 4969 SnapAreaSet* LayoutBox::snapAreas() const | 4991 SnapAreaSet* LayoutBox::snapAreas() const |
| 4970 { | 4992 { |
| 4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4993 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4972 } | 4994 } |
| 4973 | 4995 |
| 4974 } // namespace blink | 4996 } // namespace blink |
| OLD | NEW |