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

Side by Side Diff: Source/web/PinchViewports.cpp

Issue 33413002: scroll: Tell the platform layer whether it can be scrolled by the user. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: tot-merge Created 7 years, 2 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 , m_overlayScrollbarHorizontal(GraphicsLayer::create(m_owner->graphicsLayerF actory(), this)) 63 , m_overlayScrollbarHorizontal(GraphicsLayer::create(m_owner->graphicsLayerF actory(), this))
64 , m_overlayScrollbarVertical(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this)) 64 , m_overlayScrollbarVertical(GraphicsLayer::create(m_owner->graphicsLayerFac tory(), this))
65 { 65 {
66 m_innerViewportContainerLayer->platformLayer()->setIsContainerForFixedPositi onLayers(true); 66 m_innerViewportContainerLayer->platformLayer()->setIsContainerForFixedPositi onLayers(true);
67 // No need for the inner viewport to clip, since the compositing 67 // No need for the inner viewport to clip, since the compositing
68 // surface takes care of it -- and clipping here would interfere with 68 // surface takes care of it -- and clipping here would interfere with
69 // dynamically-sized viewports on Android. 69 // dynamically-sized viewports on Android.
70 m_innerViewportContainerLayer->setMasksToBounds(false); 70 m_innerViewportContainerLayer->setMasksToBounds(false);
71 71
72 m_innerViewportScrollLayer->platformLayer()->setScrollable(true); 72 m_innerViewportScrollLayer->platformLayer()->setScrollable(true);
73 m_innerViewportScrollLayer->platformLayer()->setUserScrollable(true, true);
73 74
74 m_innerViewportContainerLayer->addChild(m_pageScaleLayer.get()); 75 m_innerViewportContainerLayer->addChild(m_pageScaleLayer.get());
75 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get()); 76 m_pageScaleLayer->addChild(m_innerViewportScrollLayer.get());
76 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal.get()); 77 m_innerViewportContainerLayer->addChild(m_overlayScrollbarHorizontal.get());
77 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.get()); 78 m_innerViewportContainerLayer->addChild(m_overlayScrollbarVertical.get());
78 79
79 // Setup the inner viewport overlay scrollbars. 80 // Setup the inner viewport overlay scrollbars.
80 setupScrollbar(WebScrollbar::Horizontal); 81 setupScrollbar(WebScrollbar::Horizontal);
81 setupScrollbar(WebScrollbar::Vertical); 82 setupScrollbar(WebScrollbar::Vertical);
82 } 83 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) { 207 } else if (graphicsLayer == m_overlayScrollbarVertical.get()) {
207 name = "Overlay Scrollbar Vertical Layer"; 208 name = "Overlay Scrollbar Vertical Layer";
208 } else { 209 } else {
209 ASSERT_NOT_REACHED(); 210 ASSERT_NOT_REACHED();
210 } 211 }
211 212
212 return name; 213 return name;
213 } 214 }
214 215
215 } // namespace WebKit 216 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/core/page/scrolling/ScrollingCoordinator.cpp ('k') | Source/web/tests/ScrollingCoordinatorChromiumTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698