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

Side by Side Diff: Source/core/frame/FrameView.cpp

Issue 751573002: Use viewportConstrainedVisibleContentRect() to get the scrolling offset (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed the 'DEPRECATED' comment Created 6 years 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
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1289 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 } 1300 }
1301 if (heightChanged) { 1301 if (heightChanged) {
1302 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto())) 1302 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto()))
1303 renderer->setNeedsPositionedMovementLayout(); 1303 renderer->setNeedsPositionedMovementLayout();
1304 else 1304 else
1305 renderer->setNeedsLayoutAndFullPaintInvalidation(); 1305 renderer->setNeedsLayoutAndFullPaintInvalidation();
1306 } 1306 }
1307 } 1307 }
1308 } 1308 }
1309 1309
1310 IntSize FrameView::scrollOffsetForFixedPosition() const 1310 IntSize FrameView::scrollOffsetForViewportConstrainedObjects() const
1311 { 1311 {
1312 return toIntSize(clampScrollPosition(scrollPosition())); 1312 return roundedIntSize(viewportConstrainedVisibleContentRect().location());
1313 } 1313 }
1314 1314
1315 IntPoint FrameView::lastKnownMousePosition() const 1315 IntPoint FrameView::lastKnownMousePosition() const
1316 { 1316 {
1317 return m_frame->eventHandler().lastKnownMousePosition(); 1317 return m_frame->eventHandler().lastKnownMousePosition();
1318 } 1318 }
1319 1319
1320 bool FrameView::shouldSetCursor() const 1320 bool FrameView::shouldSetCursor() const
1321 { 1321 {
1322 Page* page = frame().page(); 1322 Page* page = frame().page();
(...skipping 2646 matching lines...) Expand 10 before | Expand all | Expand 10 after
3969 return; 3969 return;
3970 3970
3971 ScrollableArea::setScrollOrigin(origin); 3971 ScrollableArea::setScrollOrigin(origin);
3972 3972
3973 // Update if the scroll origin changes, since our position will be different if the content size did not change. 3973 // Update if the scroll origin changes, since our position will be different if the content size did not change.
3974 if (updatePositionAtAll && updatePositionSynchronously) 3974 if (updatePositionAtAll && updatePositionSynchronously)
3975 updateScrollbars(scrollOffsetDouble()); 3975 updateScrollbars(scrollOffsetDouble());
3976 } 3976 }
3977 3977
3978 } // namespace blink 3978 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/paint/BoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698