| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 { | 481 { |
| 482 if (m_overflowControlsHostLayer) | 482 if (m_overflowControlsHostLayer) |
| 483 m_overflowControlsHostLayer->setPosition(contentsOffset); | 483 m_overflowControlsHostLayer->setPosition(contentsOffset); |
| 484 } | 484 } |
| 485 | 485 |
| 486 void RenderLayerCompositor::frameViewDidChangeSize() | 486 void RenderLayerCompositor::frameViewDidChangeSize() |
| 487 { | 487 { |
| 488 if (m_containerLayer) { | 488 if (m_containerLayer) { |
| 489 FrameView* frameView = m_renderView.frameView(); | 489 FrameView* frameView = m_renderView.frameView(); |
| 490 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); | 490 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); |
| 491 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi
ze(IncludeScrollbars)); |
| 491 | 492 |
| 492 frameViewDidScroll(); | 493 frameViewDidScroll(); |
| 493 updateOverflowControlsLayers(); | 494 updateOverflowControlsLayers(); |
| 494 } | 495 } |
| 495 } | 496 } |
| 496 | 497 |
| 497 enum AcceleratedFixedRootBackgroundHistogramBuckets { | 498 enum AcceleratedFixedRootBackgroundHistogramBuckets { |
| 498 ScrolledMainFrameBucket = 0, | 499 ScrolledMainFrameBucket = 0, |
| 499 ScrolledMainFrameWithAcceleratedFixedRootBackground = 1, | 500 ScrolledMainFrameWithAcceleratedFixedRootBackground = 1, |
| 500 ScrolledMainFrameWithUnacceleratedFixedRootBackground = 2, | 501 ScrolledMainFrameWithUnacceleratedFixedRootBackground = 2, |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 m_rootContentLayer->setSize(documentRect.size()); | 706 m_rootContentLayer->setSize(documentRect.size()); |
| 706 m_rootContentLayer->setPosition(documentRect.location()); | 707 m_rootContentLayer->setPosition(documentRect.location()); |
| 707 #if USE(RUBBER_BANDING) | 708 #if USE(RUBBER_BANDING) |
| 708 if (m_layerForOverhangShadow) | 709 if (m_layerForOverhangShadow) |
| 709 OverscrollTheme::theme()->updateOverhangShadowLayer(m_layerForOverha
ngShadow.get(), m_rootContentLayer.get()); | 710 OverscrollTheme::theme()->updateOverhangShadowLayer(m_layerForOverha
ngShadow.get(), m_rootContentLayer.get()); |
| 710 #endif | 711 #endif |
| 711 } | 712 } |
| 712 if (m_containerLayer) { | 713 if (m_containerLayer) { |
| 713 FrameView* frameView = m_renderView.frameView(); | 714 FrameView* frameView = m_renderView.frameView(); |
| 714 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); | 715 m_containerLayer->setSize(frameView->unscaledVisibleContentSize()); |
| 716 m_overflowControlsHostLayer->setSize(frameView->unscaledVisibleContentSi
ze(IncludeScrollbars)); |
| 715 } | 717 } |
| 716 } | 718 } |
| 717 | 719 |
| 718 void RenderLayerCompositor::updatePotentialCompositingReasonsFromStyle(RenderLay
er* layer) | 720 void RenderLayerCompositor::updatePotentialCompositingReasonsFromStyle(RenderLay
er* layer) |
| 719 { | 721 { |
| 720 layer->setPotentialCompositingReasonsFromStyle(m_compositingReasonFinder.pot
entialCompositingReasonsFromStyle(layer->renderer())); | 722 layer->setPotentialCompositingReasonsFromStyle(m_compositingReasonFinder.pot
entialCompositingReasonsFromStyle(layer->renderer())); |
| 721 } | 723 } |
| 722 | 724 |
| 723 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) | 725 void RenderLayerCompositor::updateDirectCompositingReasons(RenderLayer* layer) |
| 724 { | 726 { |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory
(), this); | 977 m_overflowControlsHostLayer = GraphicsLayer::create(graphicsLayerFactory
(), this); |
| 976 | 978 |
| 977 // Create a clipping layer if this is an iframe or settings require to c
lip. | 979 // Create a clipping layer if this is an iframe or settings require to c
lip. |
| 978 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this); | 980 m_containerLayer = GraphicsLayer::create(graphicsLayerFactory(), this); |
| 979 bool containerMasksToBounds = !m_renderView.frame()->isLocalRoot(); | 981 bool containerMasksToBounds = !m_renderView.frame()->isLocalRoot(); |
| 980 if (Settings* settings = m_renderView.document().settings()) { | 982 if (Settings* settings = m_renderView.document().settings()) { |
| 981 if (settings->mainFrameClipsContent()) | 983 if (settings->mainFrameClipsContent()) |
| 982 containerMasksToBounds = true; | 984 containerMasksToBounds = true; |
| 983 } | 985 } |
| 984 m_containerLayer->setMasksToBounds(containerMasksToBounds); | 986 m_containerLayer->setMasksToBounds(containerMasksToBounds); |
| 987 m_overflowControlsHostLayer->setMasksToBounds(containerMasksToBounds); |
| 985 | 988 |
| 986 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); | 989 m_scrollLayer = GraphicsLayer::create(graphicsLayerFactory(), this); |
| 987 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina
tor()) | 990 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoordina
tor()) |
| 988 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc
rollLayer.get(), true); | 991 scrollingCoordinator->setLayerIsContainerForFixedPositionLayers(m_sc
rollLayer.get(), true); |
| 989 | 992 |
| 990 // Hook them up | 993 // Hook them up |
| 991 m_overflowControlsHostLayer->addChild(m_containerLayer.get()); | 994 m_overflowControlsHostLayer->addChild(m_containerLayer.get()); |
| 992 m_containerLayer->addChild(m_scrollLayer.get()); | 995 m_containerLayer->addChild(m_scrollLayer.get()); |
| 993 m_scrollLayer->addChild(m_rootContentLayer.get()); | 996 m_scrollLayer->addChild(m_rootContentLayer.get()); |
| 994 | 997 |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 } else if (graphicsLayer == m_scrollLayer.get()) { | 1169 } else if (graphicsLayer == m_scrollLayer.get()) { |
| 1167 name = "LocalFrame Scrolling Layer"; | 1170 name = "LocalFrame Scrolling Layer"; |
| 1168 } else { | 1171 } else { |
| 1169 ASSERT_NOT_REACHED(); | 1172 ASSERT_NOT_REACHED(); |
| 1170 } | 1173 } |
| 1171 | 1174 |
| 1172 return name; | 1175 return name; |
| 1173 } | 1176 } |
| 1174 | 1177 |
| 1175 } // namespace blink | 1178 } // namespace blink |
| OLD | NEW |