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

Unified Diff: third_party/WebKit/Source/core/frame/DOMVisualViewport.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/DOMVisualViewport.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
index 62f03220359eb7eb5d4f655febe15fea91304f11..b5f9707d4d4cdd4436de91f5ef31384fcd9905e5 100644
--- a/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMVisualViewport.cpp
@@ -54,29 +54,29 @@ ExecutionContext* DOMVisualViewport::GetExecutionContext() const {
return window_->GetExecutionContext();
}
-float DOMVisualViewport::scrollLeft() {
+float DOMVisualViewport::offsetLeft() const {
LocalFrame* frame = window_->GetFrame();
if (!frame || !frame->IsMainFrame())
return 0;
if (Page* page = frame->GetPage())
- return page->GetVisualViewport().ScrollLeft();
+ return page->GetVisualViewport().OffsetLeft();
return 0;
}
-float DOMVisualViewport::scrollTop() {
+float DOMVisualViewport::offsetTop() const {
LocalFrame* frame = window_->GetFrame();
if (!frame || !frame->IsMainFrame())
return 0;
if (Page* page = frame->GetPage())
- return page->GetVisualViewport().ScrollTop();
+ return page->GetVisualViewport().OffsetTop();
return 0;
}
-float DOMVisualViewport::pageX() {
+float DOMVisualViewport::pageLeft() const {
LocalFrame* frame = window_->GetFrame();
if (!frame)
return 0;
@@ -90,7 +90,7 @@ float DOMVisualViewport::pageX() {
return AdjustScrollForAbsoluteZoom(viewport_x, frame->PageZoomFactor());
}
-float DOMVisualViewport::pageY() {
+float DOMVisualViewport::pageTop() const {
LocalFrame* frame = window_->GetFrame();
if (!frame)
return 0;
@@ -104,7 +104,7 @@ float DOMVisualViewport::pageY() {
return AdjustScrollForAbsoluteZoom(viewport_y, frame->PageZoomFactor());
}
-double DOMVisualViewport::clientWidth() {
+double DOMVisualViewport::width() const {
LocalFrame* frame = window_->GetFrame();
if (!frame)
return 0;
@@ -116,12 +116,12 @@ double DOMVisualViewport::clientWidth() {
}
if (Page* page = frame->GetPage())
- return page->GetVisualViewport().ClientWidth();
+ return page->GetVisualViewport().Width();
return 0;
}
-double DOMVisualViewport::clientHeight() {
+double DOMVisualViewport::height() const {
LocalFrame* frame = window_->GetFrame();
if (!frame)
return 0;
@@ -133,12 +133,12 @@ double DOMVisualViewport::clientHeight() {
}
if (Page* page = frame->GetPage())
- return page->GetVisualViewport().ClientHeight();
+ return page->GetVisualViewport().Height();
return 0;
}
-double DOMVisualViewport::scale() {
+double DOMVisualViewport::scale() const {
LocalFrame* frame = window_->GetFrame();
if (!frame)
return 0;
@@ -147,7 +147,7 @@ double DOMVisualViewport::scale() {
return 1;
if (Page* page = window_->GetFrame()->GetPage())
- return page->GetVisualViewport().PageScale();
+ return page->GetVisualViewport().ScaleForVisualViewport();
return 0;
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/DOMVisualViewport.h ('k') | third_party/WebKit/Source/core/frame/LocalDOMWindow.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698