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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 bool hasScrollableAncestor = false; | 287 bool hasScrollableAncestor = false; |
288 | 288 |
289 // The FrameView has the scrollbars associated with the top level viewport,
so we have to | 289 // The FrameView has the scrollbars associated with the top level viewport,
so we have to |
290 // check the FrameView in addition to the hierarchy of ancestors. | 290 // check the FrameView in addition to the hierarchy of ancestors. |
291 FrameView* frameView = m_renderView.frameView(); | 291 FrameView* frameView = m_renderView.frameView(); |
292 if (frameView && frameView->isScrollable()) | 292 if (frameView && frameView->isScrollable()) |
293 hasScrollableAncestor = true; | 293 hasScrollableAncestor = true; |
294 | 294 |
295 RenderLayer* ancestor = layer->parent(); | 295 RenderLayer* ancestor = layer->parent(); |
296 while (ancestor && !hasScrollableAncestor) { | 296 while (ancestor && !hasScrollableAncestor) { |
297 if (frameView->containsScrollableArea(ancestor->scrollableArea())) | 297 if (ancestor->scrollsOverflow()) |
298 hasScrollableAncestor = true; | 298 hasScrollableAncestor = true; |
299 if (ancestor->renderer() == &m_renderView) | 299 if (ancestor->renderer() == &m_renderView) |
300 break; | 300 break; |
301 ancestor = ancestor->parent(); | 301 ancestor = ancestor->parent(); |
302 } | 302 } |
303 | 303 |
304 if (!hasScrollableAncestor) { | 304 if (!hasScrollableAncestor) { |
305 if (viewportConstrainedNotCompositedReason) | 305 if (viewportConstrainedNotCompositedReason) |
306 *viewportConstrainedNotCompositedReason = RenderLayer::NotComposited
ForUnscrollableAncestors; | 306 *viewportConstrainedNotCompositedReason = RenderLayer::NotComposited
ForUnscrollableAncestors; |
307 return false; | 307 return false; |
(...skipping 22 matching lines...) Expand all Loading... |
330 *needToRecomputeCompositingRequirements = true; | 330 *needToRecomputeCompositingRequirements = true; |
331 } | 331 } |
332 return false; | 332 return false; |
333 } | 333 } |
334 } | 334 } |
335 | 335 |
336 return true; | 336 return true; |
337 } | 337 } |
338 | 338 |
339 } | 339 } |
OLD | NEW |