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

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

Issue 2901203002: Rename VisualViewport properties to match updated spec (Closed)
Patch Set: Make methods const Created 3 years, 7 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 f7f132272e8b9a4fc5cf457f4a3f4206fc52a6ef..0154e3e3b68bd7a0b86ff198fb69d73f59bf12f9 100644
--- a/third_party/WebKit/Source/core/frame/VisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/VisualViewport.cpp
@@ -78,7 +78,7 @@ DEFINE_TRACE(VisualViewport) {
ScrollableArea::Trace(visitor);
}
-void VisualViewport::UpdateStyleAndLayoutIgnorePendingStylesheets() {
+void VisualViewport::UpdateStyleAndLayoutIgnorePendingStylesheets() const {
if (!MainFrame())
return;
@@ -190,7 +190,7 @@ void VisualViewport::SetScale(float scale) {
SetScaleAndLocation(scale, FloatPoint(offset_));
}
-double VisualViewport::ScrollLeft() {
+double VisualViewport::OffsetLeft() const {
if (!MainFrame())
return 0;
@@ -200,7 +200,7 @@ double VisualViewport::ScrollLeft() {
MainFrame()->PageZoomFactor());
}
-double VisualViewport::ScrollTop() {
+double VisualViewport::OffsetTop() const {
if (!MainFrame())
return 0;
@@ -210,7 +210,7 @@ double VisualViewport::ScrollTop() {
MainFrame()->PageZoomFactor());
}
-double VisualViewport::ClientWidth() {
+double VisualViewport::Width() const {
if (!MainFrame())
return 0;
@@ -221,7 +221,7 @@ double VisualViewport::ClientWidth() {
return width - MainFrame()->View()->VerticalScrollbarWidth() / scale_;
}
-double VisualViewport::ClientHeight() {
+double VisualViewport::Height() const {
if (!MainFrame())
return 0;
@@ -232,10 +232,8 @@ double VisualViewport::ClientHeight() {
return height - MainFrame()->View()->HorizontalScrollbarHeight() / scale_;
}
-double VisualViewport::PageScale() {
- UpdateStyleAndLayoutIgnorePendingStylesheets();
-
- return scale_;
+double VisualViewport::ScaleForVisualViewport() const {
+ return Scale();
}
void VisualViewport::SetScaleAndLocation(float scale,
« no previous file with comments | « third_party/WebKit/Source/core/frame/VisualViewport.h ('k') | third_party/WebKit/Source/core/frame/VisualViewport.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698