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

Side by Side Diff: third_party/WebKit/Source/core/paint/FramePainter.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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/FramePainter.h" 5 #include "core/paint/FramePainter.h"
6 6
7 #include "core/editing/markers/DocumentMarkerController.h" 7 #include "core/editing/markers/DocumentMarkerController.h"
8 #include "core/fetch/MemoryCache.h" 8 #include "core/fetch/MemoryCache.h"
9 #include "core/frame/FrameView.h" 9 #include "core/frame/FrameView.h"
10 #include "core/inspector/InspectorInstrumentation.h" 10 #include "core/inspector/InspectorInstrumentation.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 TransformRecorder transformRecorder( 67 TransformRecorder transformRecorder(
68 context, *frameView().layoutView(), 68 context, *frameView().layoutView(),
69 AffineTransform::translation(frameView().x() - frameView().scrollX(), 69 AffineTransform::translation(frameView().x() - frameView().scrollX(),
70 frameView().y() - frameView().scrollY())); 70 frameView().y() - frameView().scrollY()));
71 71
72 ClipRecorder recorder(context, *frameView().layoutView(), 72 ClipRecorder recorder(context, *frameView().layoutView(),
73 DisplayItem::kClipFrameToVisibleContentRect, 73 DisplayItem::kClipFrameToVisibleContentRect,
74 frameView().visibleContentRect()); 74 frameView().visibleContentRect());
75 75
76 documentDirtyRect.moveBy(-frameView().location() + 76 documentDirtyRect.moveBy(-frameView().location() +
77 frameView().scrollPosition()); 77 frameView().scrollOffsetInt());
78 paintContents(context, globalPaintFlags, documentDirtyRect); 78 paintContents(context, globalPaintFlags, documentDirtyRect);
79 } 79 }
80 80
81 if (shouldPaintScrollbars) { 81 if (shouldPaintScrollbars) {
82 IntRect scrollViewDirtyRect = rect.m_rect; 82 IntRect scrollViewDirtyRect = rect.m_rect;
83 IntRect visibleAreaWithScrollbars( 83 IntRect visibleAreaWithScrollbars(
84 frameView().location(), 84 frameView().location(),
85 frameView().visibleContentRect(IncludeScrollbars).size()); 85 frameView().visibleContentRect(IncludeScrollbars).size());
86 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars); 86 scrollViewDirtyRect.intersect(visibleAreaWithScrollbars);
87 scrollViewDirtyRect.moveBy(-frameView().location()); 87 scrollViewDirtyRect.moveBy(-frameView().location());
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 236
237 bar.paint(context, CullRect(rect)); 237 bar.paint(context, CullRect(rect));
238 } 238 }
239 239
240 const FrameView& FramePainter::frameView() { 240 const FrameView& FramePainter::frameView() {
241 ASSERT(m_frameView); 241 ASSERT(m_frameView);
242 return *m_frameView; 242 return *m_frameView;
243 } 243 }
244 244
245 } // namespace blink 245 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698