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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
900 } | 900 } |
901 | 901 |
902 bool DeprecatedPaintLayerCompositor::requiresScrollCornerLayer() const | 902 bool DeprecatedPaintLayerCompositor::requiresScrollCornerLayer() const |
903 { | 903 { |
904 return m_layoutView.frameView()->isScrollCornerVisible(); | 904 return m_layoutView.frameView()->isScrollCornerVisible(); |
905 } | 905 } |
906 | 906 |
907 void DeprecatedPaintLayerCompositor::updateOverflowControlsLayers() | 907 void DeprecatedPaintLayerCompositor::updateOverflowControlsLayers() |
908 { | 908 { |
909 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform
Layer.get() : m_overflowControlsHostLayer.get(); | 909 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform
Layer.get() : m_overflowControlsHostLayer.get(); |
910 // On Mac, main frame scrollbars should always be stuck to the sides of the
screen (in overscroll and in pinch-zoom), so | 910 // Main frame scrollbars should always be stuck to the sides of the screen (
in overscroll and in pinch-zoom), so |
911 // make the parent for the scrollbars be the viewport container layer. | 911 // make the parent for the scrollbars be the viewport container layer. |
912 #if OS(MACOSX) | |
913 if (m_layoutView.frame()->isMainFrame()) { | 912 if (m_layoutView.frame()->isMainFrame()) { |
914 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame
Host().visualViewport(); | 913 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame
Host().visualViewport(); |
915 controlsParent = visualViewport.containerLayer(); | 914 controlsParent = visualViewport.containerLayer(); |
916 } | 915 } |
917 #endif | |
918 | 916 |
919 if (requiresHorizontalScrollbarLayer()) { | 917 if (requiresHorizontalScrollbarLayer()) { |
920 if (!m_layerForHorizontalScrollbar) { | 918 if (!m_layerForHorizontalScrollbar) { |
921 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF
actory(), this); | 919 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF
actory(), this); |
922 } | 920 } |
923 | 921 |
924 if (m_layerForHorizontalScrollbar->parent() != controlsParent) { | 922 if (m_layerForHorizontalScrollbar->parent() != controlsParent) { |
925 controlsParent->addChild(m_layerForHorizontalScrollbar.get()); | 923 controlsParent->addChild(m_layerForHorizontalScrollbar.get()); |
926 | 924 |
927 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor
dinator()) | 925 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor
dinator()) |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1203 } else if (graphicsLayer == m_scrollLayer.get()) { | 1201 } else if (graphicsLayer == m_scrollLayer.get()) { |
1204 name = "LocalFrame Scrolling Layer"; | 1202 name = "LocalFrame Scrolling Layer"; |
1205 } else { | 1203 } else { |
1206 ASSERT_NOT_REACHED(); | 1204 ASSERT_NOT_REACHED(); |
1207 } | 1205 } |
1208 | 1206 |
1209 return name; | 1207 return name; |
1210 } | 1208 } |
1211 | 1209 |
1212 } // namespace blink | 1210 } // namespace blink |
OLD | NEW |