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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutView.cpp

Issue 2387883002: Use float for scroll offset. (Closed)
Patch Set: Fix README.md Created 4 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: third_party/WebKit/Source/core/layout/LayoutView.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutView.cpp b/third_party/WebKit/Source/core/layout/LayoutView.cpp
index c665972cc2333910d4024f5807bdf9fc154fb8ce..85cd4f445d7abd9da650f2e4040ee14b8b7f9bd4 100644
--- a/third_party/WebKit/Source/core/layout/LayoutView.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutView.cpp
@@ -337,7 +337,7 @@ void LayoutView::mapLocalToAncestor(const LayoutBoxModelObject* ancestor,
LayoutPartItem parentDocLayoutItem = frame()->ownerLayoutItem();
if (!parentDocLayoutItem.isNull()) {
if (!(mode & InputIsInFrameCoordinates)) {
- transformState.move(-frame()->view()->scrollOffset());
+ transformState.move(LayoutSize(-frame()->view()->scrollOffset()));
} else {
// The flag applies to immediate LayoutView only.
mode &= ~InputIsInFrameCoordinates;
@@ -358,8 +358,7 @@ const LayoutObject* LayoutView::pushMappingToContainer(
LayoutObject* container = nullptr;
if (m_frameView) {
- offsetForFixedPosition =
- LayoutSize(LayoutSize(m_frameView->scrollOffset()));
+ offsetForFixedPosition = LayoutSize(m_frameView->scrollOffset());
if (hasOverflowClip())
offsetForFixedPosition = LayoutSize(scrolledContentOffset());
}
@@ -403,14 +402,14 @@ void LayoutView::mapAncestorToLocal(const LayoutBoxModelObject* ancestor,
mode & ~IsFixed);
transformState.move(parentDocLayoutObject->contentBoxOffset());
- transformState.move(-frame()->view()->scrollOffset());
+ transformState.move(LayoutSize(-frame()->view()->scrollOffset()));
}
} else {
ASSERT(!ancestor);
}
if (mode & IsFixed)
- transformState.move(frame()->view()->scrollOffset());
+ transformState.move(LayoutSize(frame()->view()->scrollOffset()));
}
void LayoutView::computeSelfHitTestRects(Vector<LayoutRect>& rects,

Powered by Google App Engine
This is Rietveld 408576698