OLD | NEW |
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 "CSSPropertyNames.h" | 8 #include "CSSPropertyNames.h" |
9 #include "HTMLNames.h" | 9 #include "HTMLNames.h" |
10 #include "core/frame/FrameView.h" | 10 #include "core/frame/FrameView.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 bool CompositingReasonFinder::requiresCompositingForScrollableFrame() const | 85 bool CompositingReasonFinder::requiresCompositingForScrollableFrame() const |
86 { | 86 { |
87 // Need this done first to determine overflow. | 87 // Need this done first to determine overflow. |
88 ASSERT(!m_renderView.needsLayout()); | 88 ASSERT(!m_renderView.needsLayout()); |
89 if (isMainFrame()) | 89 if (isMainFrame()) |
90 return false; | 90 return false; |
91 | 91 |
92 if (!(m_compositingTriggers & ScrollableInnerFrameTrigger)) | 92 if (!(m_compositingTriggers & ScrollableInnerFrameTrigger)) |
93 return false; | 93 return false; |
94 | 94 |
95 FrameView* frameView = m_renderView.frameView(); | 95 return m_renderView.frameView()->isScrollable(); |
96 return frameView->isScrollable(); | |
97 } | 96 } |
98 | 97 |
99 CompositingReasons CompositingReasonFinder::styleDeterminedReasons(RenderObject*
renderer) const | 98 CompositingReasons CompositingReasonFinder::styleDeterminedReasons(RenderObject*
renderer) const |
100 { | 99 { |
101 CompositingReasons directReasons = CompositingReasonNone; | 100 CompositingReasons directReasons = CompositingReasonNone; |
102 | 101 |
103 RenderStyle* style = renderer->style(); | 102 RenderStyle* style = renderer->style(); |
104 | 103 |
105 if (requiresCompositingForTransform(renderer)) | 104 if (requiresCompositingForTransform(renderer)) |
106 directReasons |= CompositingReason3DTransform; | 105 directReasons |= CompositingReason3DTransform; |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 if (viewportConstrainedNotCompositedReason) | 256 if (viewportConstrainedNotCompositedReason) |
258 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos
itedForBoundsOutOfView; | 257 *viewportConstrainedNotCompositedReason = RenderLayer::NotCompos
itedForBoundsOutOfView; |
259 return false; | 258 return false; |
260 } | 259 } |
261 } | 260 } |
262 | 261 |
263 return true; | 262 return true; |
264 } | 263 } |
265 | 264 |
266 } | 265 } |
OLD | NEW |