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

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

Issue 951303003: Added basic client hints support. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Removed expected files Created 5 years, 10 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
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/LocalFrame.h » ('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 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after
4043 if (scrollOrigin() == origin) 4043 if (scrollOrigin() == origin)
4044 return; 4044 return;
4045 4045
4046 ScrollableArea::setScrollOrigin(origin); 4046 ScrollableArea::setScrollOrigin(origin);
4047 4047
4048 // Update if the scroll origin changes, since our position will be different if the content size did not change. 4048 // Update if the scroll origin changes, since our position will be different if the content size did not change.
4049 if (updatePositionAtAll && updatePositionSynchronously) 4049 if (updatePositionAtAll && updatePositionSynchronously)
4050 updateScrollbars(scrollOffsetDouble()); 4050 updateScrollbars(scrollOffsetDouble());
4051 } 4051 }
4052 4052
4053 int FrameView::viewportWidth() const
4054 {
4055 int viewportWidth = layoutSize(IncludeScrollbars).width();
4056 return adjustForAbsoluteZoom(viewportWidth, renderView());
4057 }
4058
4053 ScrollableArea* FrameView::scrollableArea() 4059 ScrollableArea* FrameView::scrollableArea()
4054 { 4060 {
4055 Settings* settings = frame().settings(); 4061 Settings* settings = frame().settings();
4056 if (!settings || !settings->rootLayerScrolls()) 4062 if (!settings || !settings->rootLayerScrolls())
4057 return this; 4063 return this;
4058 4064
4059 RenderView* renderView = this->renderView(); 4065 RenderView* renderView = this->renderView();
4060 return renderView ? renderView->scrollableArea() : nullptr; 4066 return renderView ? renderView->scrollableArea() : nullptr;
4061 } 4067 }
4062 4068
4063 } // namespace blink 4069 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/FrameView.h ('k') | Source/core/frame/LocalFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698