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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 610423004: Preserve fractional scroll offset for JS scrolling API (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 side-by-side diff with in-line comments
Download patch
Index: Source/core/rendering/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 0c1323b719551b65997cd17ddbb6f23de80d4c48..99eacaa12982fda3653ad60dbcc700ee44a9b9e5 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -893,7 +893,7 @@ void CompositedLayerMapping::updateScrollingLayerGeometry(const IntRect& localCo
RenderBox* renderBox = toRenderBox(renderer());
IntRect clientBox = enclosingIntRect(renderBox->clientBoxRect());
- IntSize adjustedScrollOffset = m_owningLayer.scrollableArea()->adjustedScrollOffset();
+ IntSize adjustedScrollOffset = flooredIntSize(m_owningLayer.scrollableArea()->adjustedScrollOffset());
Rick Byers 2014/10/02 21:44:06 Add FIXME?
Yufeng Shen (Slow to review) 2014/10/02 23:34:34 Done.
m_scrollingLayer->setPosition(FloatPoint(clientBox.location() - localCompositingBounds.location() + roundedIntSize(m_owningLayer.subpixelAccumulation())));
m_scrollingLayer->setSize(clientBox.size());
@@ -1150,7 +1150,7 @@ void CompositedLayerMapping::updateScrollingBlockSelection()
if (!shouldDrawContent)
return;
- const IntPoint position = blockSelectionGapsBounds.location() + m_owningLayer.scrollableArea()->adjustedScrollOffset();
+ const IntPoint position = blockSelectionGapsBounds.location() + flooredIntSize(m_owningLayer.scrollableArea()->adjustedScrollOffset());
Rick Byers 2014/10/02 21:44:06 add FIXME?
Yufeng Shen (Slow to review) 2014/10/02 23:34:35 Done.
if (m_scrollingBlockSelectionLayer->size() == blockSelectionGapsBounds.size() && m_scrollingBlockSelectionLayer->position() == position)
return;

Powered by Google App Engine
This is Rietveld 408576698