| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009, 2010 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (!m_needsUpdateCompositingRequirementsState) | 332 if (!m_needsUpdateCompositingRequirementsState) |
| 333 return; | 333 return; |
| 334 | 334 |
| 335 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo
mpositingRequirementsState"); | 335 TRACE_EVENT0("blink_rendering,comp-scroll", "RenderLayerCompositor::updateCo
mpositingRequirementsState"); |
| 336 | 336 |
| 337 m_needsUpdateCompositingRequirementsState = false; | 337 m_needsUpdateCompositingRequirementsState = false; |
| 338 | 338 |
| 339 if (!rootRenderLayer() || !rootRenderLayer()->acceleratedCompositingForOverf
lowScrollEnabled()) | 339 if (!rootRenderLayer() || !rootRenderLayer()->acceleratedCompositingForOverf
lowScrollEnabled()) |
| 340 return; | 340 return; |
| 341 | 341 |
| 342 const bool compositorDrivenAcceleratedScrollingEnabled = rootRenderLayer()->
compositorDrivenAcceleratedScrollingEnabled(); | |
| 343 | |
| 344 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie
w()->scrollableAreas(); | |
| 345 if (!compositorDrivenAcceleratedScrollingEnabled && !scrollableAreas) | |
| 346 return; | |
| 347 | |
| 348 for (HashSet<RenderLayer*>::iterator it = m_outOfFlowPositionedLayers.begin(
); it != m_outOfFlowPositionedLayers.end(); ++it) | 342 for (HashSet<RenderLayer*>::iterator it = m_outOfFlowPositionedLayers.begin(
); it != m_outOfFlowPositionedLayers.end(); ++it) |
| 349 (*it)->updateHasUnclippedDescendant(); | 343 (*it)->updateHasUnclippedDescendant(); |
| 350 | 344 |
| 351 if (!compositorDrivenAcceleratedScrollingEnabled) { | 345 const FrameView::ScrollableAreaSet* scrollableAreas = m_renderView->frameVie
w()->scrollableAreas(); |
| 352 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(
); it != scrollableAreas->end(); ++it) | 346 if (!scrollableAreas) |
| 353 (*it)->updateNeedsCompositedScrolling(); | 347 return; |
| 354 } | 348 |
| 349 for (FrameView::ScrollableAreaSet::iterator it = scrollableAreas->begin(); i
t != scrollableAreas->end(); ++it) |
| 350 (*it)->updateNeedsCompositedScrolling(); |
| 355 } | 351 } |
| 356 | 352 |
| 357 static RenderVideo* findFullscreenVideoRenderer(Document* document) | 353 static RenderVideo* findFullscreenVideoRenderer(Document* document) |
| 358 { | 354 { |
| 359 Element* fullscreenElement = FullscreenElementStack::currentFullScreenElemen
tFrom(document); | 355 Element* fullscreenElement = FullscreenElementStack::currentFullScreenElemen
tFrom(document); |
| 360 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { | 356 while (fullscreenElement && fullscreenElement->isFrameOwnerElement()) { |
| 361 document = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument()
; | 357 document = toHTMLFrameOwnerElement(fullscreenElement)->contentDocument()
; |
| 362 if (!document) | 358 if (!document) |
| 363 return 0; | 359 return 0; |
| 364 fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom
(document); | 360 fullscreenElement = FullscreenElementStack::currentFullScreenElementFrom
(document); |
| (...skipping 2419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2784 } else if (graphicsLayer == m_scrollLayer.get()) { | 2780 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 2785 name = "Frame Scrolling Layer"; | 2781 name = "Frame Scrolling Layer"; |
| 2786 } else { | 2782 } else { |
| 2787 ASSERT_NOT_REACHED(); | 2783 ASSERT_NOT_REACHED(); |
| 2788 } | 2784 } |
| 2789 | 2785 |
| 2790 return name; | 2786 return name; |
| 2791 } | 2787 } |
| 2792 | 2788 |
| 2793 } // namespace WebCore | 2789 } // namespace WebCore |
| OLD | NEW |