Chromium Code Reviews| 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::canSkipUnforcedPaintInvalidation() const | |
|
chrishtr
2016/08/03 23:13:15
In what case are the conditions in this method dif
Xianzhu
2016/08/04 00:02:14
For now there is no other cases.
However, clip is
chrishtr
2016/08/04 00:57:47
Right. Then is it correct to say that this method
Xianzhu
2016/08/04 16:27:02
The name "doesNotAffectPaintedOutput" seems not cl
| |
| 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 to repaint the changed part when the box got resized, | |
|
chrishtr
2016/08/03 23:13:15
Changed part of children
chrishtr
2016/08/03 23:13:43
Meaning: it's the childrens' paint output that wou
Xianzhu
2016/08/04 00:02:14
Done.
(I think there is a bug about ancestor clip
| |
| 2049 // so cannot skip invalidation. | |
| 2050 // TODO(wangxianzhu): Paint invalidation for clip change will be different i n spv2. | |
| 2051 if (hasClipRelatedProperty() || hasControlClip()) | |
| 2052 return false; | |
| 2053 | |
| 2054 return true; | |
| 2055 } | |
| 2056 | |
| 2037 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const | 2057 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
| 2038 { | 2058 { |
| 2039 if (style()->visibility() != VISIBLE) | 2059 if (style()->visibility() != VISIBLE) |
| 2040 return LayoutRect(); | 2060 return LayoutRect(); |
| 2041 | 2061 |
| 2042 return selfVisualOverflowRect(); | 2062 return selfVisualOverflowRect(); |
| 2043 } | 2063 } |
| 2044 | 2064 |
| 2045 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect & rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto pAt) const | 2065 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect & rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto pAt) const |
| 2046 { | 2066 { |
| (...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4965 m_rareData->m_snapAreas->remove(&snapArea); | 4985 m_rareData->m_snapAreas->remove(&snapArea); |
| 4966 } | 4986 } |
| 4967 } | 4987 } |
| 4968 | 4988 |
| 4969 SnapAreaSet* LayoutBox::snapAreas() const | 4989 SnapAreaSet* LayoutBox::snapAreas() const |
| 4970 { | 4990 { |
| 4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; | 4991 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; |
| 4972 } | 4992 } |
| 4973 | 4993 |
| 4974 } // namespace blink | 4994 } // namespace blink |
| OLD | NEW |