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

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: 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
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 1290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 } 1301 }
1302 if (heightChanged) { 1302 if (heightChanged) {
1303 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto())) 1303 if (style->height().isFixed() && (style->top().isAuto() || style->bo ttom().isAuto()))
1304 renderer->setNeedsPositionedMovementLayout(); 1304 renderer->setNeedsPositionedMovementLayout();
1305 else 1305 else
1306 renderer->setNeedsLayoutAndFullPaintInvalidation(); 1306 renderer->setNeedsLayoutAndFullPaintInvalidation();
1307 } 1307 }
1308 } 1308 }
1309 } 1309 }
1310 1310
1311 IntSize FrameView::scrollOffsetForFixedPosition() const 1311 IntSize FrameView::scrollOffsetForViewportConstrainedObjects() const
1312 { 1312 {
1313 return toIntSize(clampScrollPosition(scrollPosition())); 1313 return roundedIntSize(viewportConstrainedVisibleContentRect().location());
1314 } 1314 }
1315 1315
1316 IntPoint FrameView::lastKnownMousePosition() const 1316 IntPoint FrameView::lastKnownMousePosition() const
1317 { 1317 {
1318 return m_frame->eventHandler().lastKnownMousePosition(); 1318 return m_frame->eventHandler().lastKnownMousePosition();
1319 } 1319 }
1320 1320
1321 bool FrameView::shouldSetCursor() const 1321 bool FrameView::shouldSetCursor() const
1322 { 1322 {
1323 Page* page = frame().page(); 1323 Page* page = frame().page();
(...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after
3966 return; 3966 return;
3967 3967
3968 ScrollableArea::setScrollOrigin(origin); 3968 ScrollableArea::setScrollOrigin(origin);
3969 3969
3970 // Update if the scroll origin changes, since our position will be different if the content size did not change. 3970 // Update if the scroll origin changes, since our position will be different if the content size did not change.
3971 if (updatePositionAtAll && updatePositionSynchronously) 3971 if (updatePositionAtAll && updatePositionSynchronously)
3972 updateScrollbars(scrollOffsetDouble()); 3972 updateScrollbars(scrollOffsetDouble());
3973 } 3973 }
3974 3974
3975 } // namespace blink 3975 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698