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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.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
« no previous file with comments | « no previous file | Source/web/PinchViewports.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 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 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 if (scrollLayer) { 315 if (scrollLayer) {
316 bool isMainFrame = isForMainFrame(scrollableArea); 316 bool isMainFrame = isForMainFrame(scrollableArea);
317 scrollLayer->setScrollableArea(scrollableArea, isMainFrame); 317 scrollLayer->setScrollableArea(scrollableArea, isMainFrame);
318 } 318 }
319 319
320 WebLayer* webLayer = scrollingWebLayerForScrollableArea(scrollableArea); 320 WebLayer* webLayer = scrollingWebLayerForScrollableArea(scrollableArea);
321 if (webLayer) { 321 if (webLayer) {
322 webLayer->setScrollable(true); 322 webLayer->setScrollable(true);
323 webLayer->setScrollPosition(IntPoint(scrollableArea->scrollPosition() - scrollableArea->minimumScrollPosition())); 323 webLayer->setScrollPosition(IntPoint(scrollableArea->scrollPosition() - scrollableArea->minimumScrollPosition()));
324 webLayer->setMaxScrollPosition(IntSize(scrollableArea->scrollSize(Horizo ntalScrollbar), scrollableArea->scrollSize(VerticalScrollbar))); 324 webLayer->setMaxScrollPosition(IntSize(scrollableArea->scrollSize(Horizo ntalScrollbar), scrollableArea->scrollSize(VerticalScrollbar)));
325 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollba r);
326 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar) ;
327 webLayer->setUserScrollable(canScrollX, canScrollY);
325 } 328 }
326 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) { 329 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) {
327 GraphicsLayer* horizontalScrollbarLayer = horizontalScrollbarLayerForScr ollableArea(scrollableArea); 330 GraphicsLayer* horizontalScrollbarLayer = horizontalScrollbarLayerForScr ollableArea(scrollableArea);
328 if (horizontalScrollbarLayer) 331 if (horizontalScrollbarLayer)
329 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay er); 332 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay er);
330 } 333 }
331 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, VerticalScrollbar)) { 334 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, VerticalScrollbar)) {
332 GraphicsLayer* verticalScrollbarLayer = verticalScrollbarLayerForScrolla bleArea(scrollableArea); 335 GraphicsLayer* verticalScrollbarLayer = verticalScrollbarLayerForScrolla bleArea(scrollableArea);
333 if (verticalScrollbarLayer) 336 if (verticalScrollbarLayer)
334 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer ); 337 setupScrollbarLayer(verticalScrollbarLayer, scrollbarLayer, webLayer );
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 stringBuilder.resize(stringBuilder.length() - 2); 862 stringBuilder.resize(stringBuilder.length() - 2);
860 return stringBuilder.toString(); 863 return stringBuilder.toString();
861 } 864 }
862 865
863 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const 866 String ScrollingCoordinator::mainThreadScrollingReasonsAsText() const
864 { 867 {
865 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons()); 868 return mainThreadScrollingReasonsAsText(mainThreadScrollingReasons());
866 } 869 }
867 870
868 } // namespace WebCore 871 } // namespace WebCore
OLDNEW
« no previous file with comments | « no previous file | Source/web/PinchViewports.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698