Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(290)

Side by Side Diff: Source/core/layout/compositing/DeprecatedPaintLayerCompositor.cpp

Issue 1318603005: Revert of Replace pinch scrollbars with regular scrollbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // Main frame scrollbars should always be stuck to the sides of the screen ( in overscroll and in pinch-zoom), so 910 // On Mac, 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)
912 if (m_layoutView.frame()->isMainFrame()) { 913 if (m_layoutView.frame()->isMainFrame()) {
913 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame Host().visualViewport(); 914 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame Host().visualViewport();
914 controlsParent = visualViewport.containerLayer(); 915 controlsParent = visualViewport.containerLayer();
915 } 916 }
917 #endif
916 918
917 if (requiresHorizontalScrollbarLayer()) { 919 if (requiresHorizontalScrollbarLayer()) {
918 if (!m_layerForHorizontalScrollbar) { 920 if (!m_layerForHorizontalScrollbar) {
919 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this); 921 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this);
920 } 922 }
921 923
922 if (m_layerForHorizontalScrollbar->parent() != controlsParent) { 924 if (m_layerForHorizontalScrollbar->parent() != controlsParent) {
923 controlsParent->addChild(m_layerForHorizontalScrollbar.get()); 925 controlsParent->addChild(m_layerForHorizontalScrollbar.get());
924 926
925 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor dinator()) 927 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor dinator())
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
1201 } else if (graphicsLayer == m_scrollLayer.get()) { 1203 } else if (graphicsLayer == m_scrollLayer.get()) {
1202 name = "LocalFrame Scrolling Layer"; 1204 name = "LocalFrame Scrolling Layer";
1203 } else { 1205 } else {
1204 ASSERT_NOT_REACHED(); 1206 ASSERT_NOT_REACHED();
1205 } 1207 }
1206 1208
1207 return name; 1209 return name;
1208 } 1210 }
1209 1211
1210 } // namespace blink 1212 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698