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

Side by Side Diff: Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 629583002: Make compositor and blink talk in fractional scroll offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 if (scrollLayer) { 353 if (scrollLayer) {
354 ASSERT(m_page); 354 ASSERT(m_page);
355 scrollLayer->setScrollableArea(scrollableArea, isForViewport(scrollableA rea)); 355 scrollLayer->setScrollableArea(scrollableArea, isForViewport(scrollableA rea));
356 } 356 }
357 357
358 WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling()); 358 WebLayer* webLayer = toWebLayer(scrollableArea->layerForScrolling());
359 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer()); 359 WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer());
360 if (webLayer) { 360 if (webLayer) {
361 webLayer->setScrollClipLayer(containerLayer); 361 webLayer->setScrollClipLayer(containerLayer);
362 webLayer->setScrollPosition(IntPoint(scrollableArea->scrollPosition() - scrollableArea->minimumScrollPosition())); 362 webLayer->setScrollPositionDouble(DoublePoint(scrollableArea->scrollPosi tionDouble() - scrollableArea->minimumScrollPosition()));
363 webLayer->setBounds(scrollableArea->contentsSize()); 363 webLayer->setBounds(scrollableArea->contentsSize());
364 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollba r); 364 bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollba r);
365 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar) ; 365 bool canScrollY = scrollableArea->userInputScrollable(VerticalScrollbar) ;
366 webLayer->setUserScrollable(canScrollX, canScrollY); 366 webLayer->setUserScrollable(canScrollX, canScrollY);
367 } 367 }
368 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) { 368 if (WebScrollbarLayer* scrollbarLayer = getWebScrollbarLayer(scrollableArea, HorizontalScrollbar)) {
369 GraphicsLayer* horizontalScrollbarLayer = scrollableArea->layerForHorizo ntalScrollbar(); 369 GraphicsLayer* horizontalScrollbarLayer = scrollableArea->layerForHorizo ntalScrollbar();
370 if (horizontalScrollbarLayer) 370 if (horizontalScrollbarLayer)
371 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay er, containerLayer); 371 setupScrollbarLayer(horizontalScrollbarLayer, scrollbarLayer, webLay er, containerLayer);
372 } 372 }
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 bool frameIsScrollable = frameView && frameView->isScrollable(); 975 bool frameIsScrollable = frameView && frameView->isScrollable();
976 if (frameIsScrollable != m_wasFrameScrollable) 976 if (frameIsScrollable != m_wasFrameScrollable)
977 return true; 977 return true;
978 978
979 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0) 979 if (WebLayer* scrollLayer = frameView ? toWebLayer(frameView->layerForScroll ing()) : 0)
980 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( ); 980 return blink::WebSize(frameView->contentsSize()) != scrollLayer->bounds( );
981 return false; 981 return false;
982 } 982 }
983 983
984 } // namespace blink 984 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698