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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp

Issue 1385123003: Delete scrollCompensationAdjustment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
index a301b9e5e5228d0dabe8d6ac040ba8f9426e9f42..e48a6a83bab473ba7d97f42475e0fec78180e69a 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp
@@ -382,23 +382,8 @@ bool ScrollingCoordinator::scrollableAreaScrollLayerDidChange(ScrollableArea* sc
WebLayer* containerLayer = toWebLayer(scrollableArea->layerForContainer());
if (webLayer) {
webLayer->setScrollClipLayer(containerLayer);
- // Non-layered Viewport constrained objects, e.g. fixed position elements, are
- // positioned in Blink using integer coordinates. In that case, we don't want
- // to set the WebLayer's scroll position at fractional precision otherwise the
- // WebLayer's position after snapping to device pixel can be off with regard to
- // fixed position elements.
- if (m_lastMainThreadScrollingReasons & MainThreadScrollingReason::kHasNonLayerViewportConstrainedObjects) {
- webLayer->setScrollPositionDouble(DoublePoint(scrollableArea->scrollPosition() - scrollableArea->minimumScrollPosition()));
- } else {
- DoublePoint scrollPosition(scrollableArea->scrollPositionDouble() - scrollableArea->minimumScrollPositionDouble());
- IntPoint flooredScrollPosition(flooredIntPoint(scrollPosition));
- DoublePoint fractionalPart(scrollPosition.x() - flooredScrollPosition.x(), scrollPosition.y() - flooredScrollPosition.y());
- webLayer->setScrollPositionDouble(scrollPosition);
- // Blink can only use the integer part of the scroll offset to position elements.
- // Sends the fractional part of the scroll offset to CC as scroll adjustment for
- // fixed-position layer.
- webLayer->setScrollCompensationAdjustment(fractionalPart);
- }
+ DoublePoint scrollPosition(scrollableArea->scrollPositionDouble() - scrollableArea->minimumScrollPositionDouble());
+ webLayer->setScrollPositionDouble(scrollPosition);
webLayer->setBounds(scrollableArea->contentsSize());
bool canScrollX = scrollableArea->userInputScrollable(HorizontalScrollbar);

Powered by Google App Engine
This is Rietveld 408576698