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

Side by Side Diff: Source/core/rendering/compositing/CompositingReasonFinder.cpp

Issue 402283003: Fix bugs in clip parent calculations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/compositing/CompositingInputsUpdater.cpp ('k') | no next file » | 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 "config.h" 5 #include "config.h"
6 #include "core/rendering/compositing/CompositingReasonFinder.h" 6 #include "core/rendering/compositing/CompositingReasonFinder.h"
7 7
8 #include "core/CSSPropertyNames.h" 8 #include "core/CSSPropertyNames.h"
9 #include "core/dom/Document.h" 9 #include "core/dom/Document.h"
10 #include "core/frame/FrameView.h" 10 #include "core/frame/FrameView.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 147
148 return renderer->hasFilter(); 148 return renderer->hasFilter();
149 } 149 }
150 150
151 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t RenderLayer* layer) const 151 CompositingReasons CompositingReasonFinder::nonStyleDeterminedDirectReasons(cons t RenderLayer* layer) const
152 { 152 {
153 CompositingReasons directReasons = CompositingReasonNone; 153 CompositingReasons directReasons = CompositingReasonNone;
154 RenderObject* renderer = layer->renderer(); 154 RenderObject* renderer = layer->renderer();
155 155
156 if (hasOverflowScrollTrigger()) { 156 if (hasOverflowScrollTrigger()) {
157 if (layer->clipParent())
158 directReasons |= CompositingReasonOutOfFlowClipping;
159
157 if (const RenderLayer* scrollingAncestor = layer->ancestorScrollingLayer ()) { 160 if (const RenderLayer* scrollingAncestor = layer->ancestorScrollingLayer ()) {
158 if (scrollingAncestor->needsCompositedScrolling()) { 161 if (scrollingAncestor->needsCompositedScrolling() && layer->scrollPa rent())
159 if (layer->clipParent()) 162 directReasons |= CompositingReasonOverflowScrollingParent;
160 directReasons |= CompositingReasonOutOfFlowClipping;
161
162 if (layer->scrollParent())
163 directReasons |= CompositingReasonOverflowScrollingParent;
164 }
165 } 163 }
166 164
167 if (layer->needsCompositedScrolling()) 165 if (layer->needsCompositedScrolling())
168 directReasons |= CompositingReasonOverflowScrollingTouch; 166 directReasons |= CompositingReasonOverflowScrollingTouch;
169 } 167 }
170 168
171 if (requiresCompositingForPositionFixed(renderer, layer, 0)) 169 if (requiresCompositingForPositionFixed(renderer, layer, 0))
172 directReasons |= CompositingReasonPositionFixed; 170 directReasons |= CompositingReasonPositionFixed;
173 171
174 directReasons |= renderer->additionalCompositingReasons(m_compositingTrigger s); 172 directReasons |= renderer->additionalCompositingReasons(m_compositingTrigger s);
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if (viewportConstrainedNotCompositedReason) 257 if (viewportConstrainedNotCompositedReason)
260 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos itedForBoundsOutOfView; 258 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos itedForBoundsOutOfView;
261 return false; 259 return false;
262 } 260 }
263 } 261 }
264 262
265 return true; 263 return true;
266 } 264 }
267 265
268 } 266 }
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/CompositingInputsUpdater.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698