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

Unified Diff: third_party/WebKit/Source/core/frame/LocalDOMWindow.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/LocalDOMWindow.cpp
diff --git a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
index 892535d05039e66a77fcc03ee2bdf0aa2808f20c..aeca926d2d7fbf2679f3cd0a5cf975906af0f92c 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -272,7 +272,7 @@ unsigned LocalDOMWindow::PendingUnloadEventListeners() const {
LocalDOMWindow::LocalDOMWindow(LocalFrame& frame)
: DOMWindow(frame),
- visual_viewport_(DOMVisualViewport::Create(this)),
+ view_(DOMVisualViewport::Create(this)),
unused_preloads_timer_(
TaskRunnerHelper::Get(TaskType::kUnspecedTimer, &frame),
this,
@@ -1057,7 +1057,7 @@ double LocalDOMWindow::scrollX() const {
return 0;
if (!GetFrame()->GetPage()->GetSettings().GetInertVisualViewport())
- return visual_viewport_->pageX();
+ return view_->pageLeft();
FrameView* view = GetFrame()->View();
if (!view)
@@ -1075,7 +1075,7 @@ double LocalDOMWindow::scrollY() const {
return 0;
if (!GetFrame()->GetPage()->GetSettings().GetInertVisualViewport())
- return visual_viewport_->pageY();
+ return view_->pageTop();
FrameView* view = GetFrame()->View();
if (!view)
@@ -1088,11 +1088,11 @@ double LocalDOMWindow::scrollY() const {
return AdjustScrollForAbsoluteZoom(viewport_y, GetFrame()->PageZoomFactor());
}
-DOMVisualViewport* LocalDOMWindow::visualViewport() {
+DOMVisualViewport* LocalDOMWindow::view() {
if (!GetFrame())
return nullptr;
- return visual_viewport_;
+ return view_;
}
const AtomicString& LocalDOMWindow::name() const {
@@ -1680,7 +1680,7 @@ DEFINE_TRACE(LocalDOMWindow) {
visitor->Trace(application_cache_);
visitor->Trace(event_queue_);
visitor->Trace(post_message_timers_);
- visitor->Trace(visual_viewport_);
+ visitor->Trace(view_);
visitor->Trace(event_listener_observers_);
DOMWindow::Trace(visitor);
Supplementable<LocalDOMWindow>::Trace(visitor);
« no previous file with comments | « third_party/WebKit/Source/core/frame/LocalDOMWindow.h ('k') | third_party/WebKit/Source/core/frame/UseCounter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698