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

Unified Diff: third_party/WebKit/Source/core/frame/VisualViewport.cpp

Issue 2443613002: Rename classes related to top controls (Closed)
Patch Set: fix test 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/frame/VisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/VisualViewport.cpp b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
index c75ad1e66edb10b4ce1ead1bd5a75bc752191696..b3d9289919704cda8b0bba084442d9d350be34f9 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -63,7 +63,7 @@ namespace blink {
VisualViewport::VisualViewport(FrameHost& owner)
: m_frameHost(&owner),
m_scale(1),
- m_topControlsAdjustment(0),
+ m_browserControlsAdjustment(0),
m_maxPageScale(-1),
m_trackPinchZoomStatsForPage(false) {
reset();
@@ -151,7 +151,7 @@ void VisualViewport::mainFrameDidChangeSize() {
FloatSize VisualViewport::visibleSize() const {
FloatSize scaledSize(m_size);
- scaledSize.expand(0, m_topControlsAdjustment);
+ scaledSize.expand(0, m_browserControlsAdjustment);
scaledSize.scale(1 / m_scale);
return scaledSize;
}
@@ -552,17 +552,17 @@ ScrollOffset VisualViewport::maximumScrollOffset() const {
// crbug.com/470718.
FloatSize frameViewSize(contentsSize());
- if (m_topControlsAdjustment) {
+ if (m_browserControlsAdjustment) {
float minScale =
frameHost().pageScaleConstraintsSet().finalConstraints().minimumScale;
- frameViewSize.expand(0, m_topControlsAdjustment / minScale);
+ frameViewSize.expand(0, m_browserControlsAdjustment / minScale);
}
frameViewSize.scale(m_scale);
frameViewSize = FloatSize(flooredIntSize(frameViewSize));
FloatSize viewportSize(m_size);
- viewportSize.expand(0, ceilf(m_topControlsAdjustment));
+ viewportSize.expand(0, ceilf(m_browserControlsAdjustment));
FloatSize maxPosition = frameViewSize - viewportSize;
maxPosition.scale(1 / m_scale);
@@ -591,8 +591,8 @@ IntPoint VisualViewport::clampDocumentOffsetAtScale(const IntPoint& offset,
return IntPoint(clamped);
}
-void VisualViewport::setTopControlsAdjustment(float adjustment) {
- m_topControlsAdjustment = adjustment;
+void VisualViewport::setBrowserControlsAdjustment(float adjustment) {
+ m_browserControlsAdjustment = adjustment;
}
IntRect VisualViewport::scrollableAreaBoundingBox() const {
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.h ('k') | third_party/WebKit/Source/core/input/EventHandler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698