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

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

Issue 1308053003: Replace pinch scrollbars with regular scrollbars. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: fix comment Created 5 years, 4 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 887 matching lines...) Expand 10 before | Expand all | Expand 10 after
898 } 898 }
899 899
900 bool DeprecatedPaintLayerCompositor::requiresScrollCornerLayer() const 900 bool DeprecatedPaintLayerCompositor::requiresScrollCornerLayer() const
901 { 901 {
902 return m_layoutView.frameView()->isScrollCornerVisible(); 902 return m_layoutView.frameView()->isScrollCornerVisible();
903 } 903 }
904 904
905 void DeprecatedPaintLayerCompositor::updateOverflowControlsLayers() 905 void DeprecatedPaintLayerCompositor::updateOverflowControlsLayers()
906 { 906 {
907 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform Layer.get() : m_overflowControlsHostLayer.get(); 907 GraphicsLayer* controlsParent = m_rootTransformLayer.get() ? m_rootTransform Layer.get() : m_overflowControlsHostLayer.get();
908 // On Mac, main frame scrollbars should always be stuck to the sides of the screen (in overscroll and in pinch-zoom), so 908 // Main frame scrollbars should always be stuck to the sides of the screen ( in overscroll and in pinch-zoom), so
909 // make the parent for the scrollbars be the viewport container layer. 909 // make the parent for the scrollbars be the viewport container layer.
910 #if OS(MACOSX)
911 if (m_layoutView.frame()->isMainFrame()) { 910 if (m_layoutView.frame()->isMainFrame()) {
912 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame Host().visualViewport(); 911 VisualViewport& visualViewport = m_layoutView.frameView()->page()->frame Host().visualViewport();
913 controlsParent = visualViewport.containerLayer(); 912 controlsParent = visualViewport.containerLayer();
914 } 913 }
915 #endif
916 914
917 if (requiresHorizontalScrollbarLayer()) { 915 if (requiresHorizontalScrollbarLayer()) {
918 if (!m_layerForHorizontalScrollbar) { 916 if (!m_layerForHorizontalScrollbar) {
919 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this); 917 m_layerForHorizontalScrollbar = GraphicsLayer::create(graphicsLayerF actory(), this);
920 } 918 }
921 919
922 if (m_layerForHorizontalScrollbar->parent() != controlsParent) { 920 if (m_layerForHorizontalScrollbar->parent() != controlsParent) {
923 controlsParent->addChild(m_layerForHorizontalScrollbar.get()); 921 controlsParent->addChild(m_layerForHorizontalScrollbar.get());
924 922
925 if (ScrollingCoordinator* scrollingCoordinator = this->scrollingCoor dinator()) 923 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()) { 1199 } else if (graphicsLayer == m_scrollLayer.get()) {
1202 name = "LocalFrame Scrolling Layer"; 1200 name = "LocalFrame Scrolling Layer";
1203 } else { 1201 } else {
1204 ASSERT_NOT_REACHED(); 1202 ASSERT_NOT_REACHED();
1205 } 1203 }
1206 1204
1207 return name; 1205 return name;
1208 } 1206 }
1209 1207
1210 } // namespace blink 1208 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698