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

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
2038 {
2039 if (getSelectionState() != SelectionNone)
chrishtr 2016/08/03 20:33:50 What's the (brief) explanation for this?
Xianzhu 2016/08/03 21:30:35 Done.
2040 return false;
2041
2042 // In case scrollbars got repositioned (which will typically happen if the l ayout object got
2043 // resized), we cannot skip invalidation.
2044 if (hasNonCompositedScrollbars())
2045 return false;
2046
2047 if (hasBoxDecorationBackground() || styleRef().hasVisualOverflowingEffect())
chrishtr 2016/08/03 20:33:50 ditto
Xianzhu 2016/08/03 21:30:35 Done.
2048 return false;
2049
2050 if (hasClipRelatedProperty() || hasControlClip())
chrishtr 2016/08/03 20:33:50 ditto
Xianzhu 2016/08/03 21:30:35 Done.
2051 return false;
2052
2053 return true;
2054 }
2055
2037 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const 2056 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const
2038 { 2057 {
2039 if (style()->visibility() != VISIBLE) 2058 if (style()->visibility() != VISIBLE)
2040 return LayoutRect(); 2059 return LayoutRect();
2041 2060
2042 return selfVisualOverflowRect(); 2061 return selfVisualOverflowRect();
2043 } 2062 }
2044 2063
2045 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect & rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto pAt) const 2064 void LayoutBox::inflateVisualRectForReflectionAndFilterUnderContainer(LayoutRect & rect, const LayoutObject& container, const LayoutBoxModelObject* ancestorToSto pAt) const
2046 { 2065 {
(...skipping 2918 matching lines...) Expand 10 before | Expand all | Expand 10 after
4965 m_rareData->m_snapAreas->remove(&snapArea); 4984 m_rareData->m_snapAreas->remove(&snapArea);
4966 } 4985 }
4967 } 4986 }
4968 4987
4969 SnapAreaSet* LayoutBox::snapAreas() const 4988 SnapAreaSet* LayoutBox::snapAreas() const
4970 { 4989 {
4971 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr; 4990 return m_rareData ? m_rareData->m_snapAreas.get() : nullptr;
4972 } 4991 }
4973 4992
4974 } // namespace blink 4993 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698