Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2203933002: Replace LayoutObject::skipInvalidationWhenLaidOutChildren() with paintedOutputOfObjectHasNoEffect (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: - Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.h ('k') | third_party/WebKit/Source/core/layout/LayoutObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698