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

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

Issue 2382563002: Revert changes is the use of CompositingReasonOutOfFlowClipping
Patch Set: Created 4 years, 2 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/layout/compositing/CompositingReasonFinder.h" 5 #include "core/layout/compositing/CompositingReasonFinder.h"
6 6
7 #include "core/CSSPropertyNames.h" 7 #include "core/CSSPropertyNames.h"
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/frame/Settings.h" 10 #include "core/frame/Settings.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // Note that we ask the layoutObject if it has a transform, because the styl e may have transforms, 130 // Note that we ask the layoutObject if it has a transform, because the styl e may have transforms,
131 // but the layoutObject may be an inline that doesn't support them. 131 // but the layoutObject may be an inline that doesn't support them.
132 return layoutObject->hasTransformRelatedProperty() && layoutObject->style()- >has3DTransform(); 132 return layoutObject->hasTransformRelatedProperty() && layoutObject->style()- >has3DTransform();
133 } 133 }
134 134
135 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t PaintLayer* layer) const 135 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t PaintLayer* layer) const
136 { 136 {
137 CompositingReasons directReasons = CompositingReasonNone; 137 CompositingReasons directReasons = CompositingReasonNone;
138 LayoutObject* layoutObject = layer->layoutObject(); 138 LayoutObject* layoutObject = layer->layoutObject();
139 139
140 if (layer->needsCompositedScrolling()) 140 bool checkForClipParent = m_compositingTriggers & OverflowScrollTrigger;
141 if (layer->needsCompositedScrolling()) {
142 checkForClipParent = true;
141 directReasons |= CompositingReasonOverflowScrollingTouch; 143 directReasons |= CompositingReasonOverflowScrollingTouch;
144 }
145 if (checkForClipParent && layer->clipParent())
flackr 2016/09/29 14:21:20 To restore the original logic we only need to chec
Stephen Chennney 2016/09/30 17:12:25 Still working on this, but ... On 2016/09/29 14:2
flackr 2016/09/30 20:13:16 +vollick, I'm having a hard time putting together
Ian Vollick 2016/10/03 21:09:15 Some background on clip parent (because it's confu
146 directReasons |= CompositingReasonOutOfFlowClipping;
142 147
143 // Composite |layer| if it is inside of an ancestor scrolling layer, but tha t 148 // Composite |layer| if it is inside of an ancestor scrolling layer, but tha t
144 // scrolling layer is not on the stacking context ancestor chain of |layer|. 149 // scrolling layer is not on the stacking context ancestor chain of |layer|.
145 // See the definition of the scrollParent property in Layer for more detail. 150 // See the definition of the scrollParent property in Layer for more detail.
146 if (const PaintLayer* scrollingAncestor = layer->ancestorScrollingLayer()) { 151 if (const PaintLayer* scrollingAncestor = layer->ancestorScrollingLayer()) {
147 if (scrollingAncestor->needsCompositedScrolling() && layer->scrollParent ()) 152 if (scrollingAncestor->needsCompositedScrolling() && layer->scrollParent ())
148 directReasons |= CompositingReasonOverflowScrollingParent; 153 directReasons |= CompositingReasonOverflowScrollingParent;
149 } 154 }
150 155
151 // TODO(flackr): Rename functions and variables to include sticky position ( i.e. ScrollDependentPosition rather than PositionFixed). 156 // TODO(flackr): Rename functions and variables to include sticky position ( i.e. ScrollDependentPosition rather than PositionFixed).
(...skipping 19 matching lines...) Expand all
171 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger)) 176 if (!(m_compositingTriggers & ViewportConstrainedPositionedTrigger))
172 return false; 177 return false;
173 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements. 178 // Don't promote fixed position elements that are descendants of a non-view container, e.g. transformed elements.
174 // They will stay fixed wrt the container rather than the enclosing frame. 179 // They will stay fixed wrt the container rather than the enclosing frame.
175 if (layer->scrollsWithViewport()) 180 if (layer->scrollsWithViewport())
176 return m_layoutView.frameView()->isScrollable(); 181 return m_layoutView.frameView()->isScrollable();
177 return layer->layoutObject()->style()->position() == StickyPosition && layer ->ancestorOverflowLayer()->scrollsOverflow(); 182 return layer->layoutObject()->style()->position() == StickyPosition && layer ->ancestorOverflowLayer()->scrollsOverflow();
178 } 183 }
179 184
180 } // namespace blink 185 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/compositing/CompositingRequirementsUpdater.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698