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

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

Issue 2730573003: Moved FrameHost::m_visualViewport to Page (Closed)
Patch Set: Fixed some compile errors on mac and android Created 3 years, 9 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 2650b242b860959623b5e5680fd71e6603d72ff7..1d136fa3b24da4823a151f600c7b6db2183ead49 100644
--- a/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
+++ b/third_party/WebKit/Source/core/frame/LocalDOMWindow.cpp
@@ -958,10 +958,6 @@ FloatSize LocalDOMWindow::getViewportSize(
if (!page)
return FloatSize();
- // If we have a Page, we must have a FrameHost.
- FrameHost* host = frame()->host();
- DCHECK(host);
-
// The main frame's viewport size depends on the page scale. Since the
// initial page scale depends on the content width and is set after a
// layout, perform one now so queries during page load will use the up to
@@ -979,7 +975,7 @@ FloatSize LocalDOMWindow::getViewportSize(
}
return frame()->isMainFrame() && !page->settings().getInertVisualViewport()
- ? FloatSize(host->visualViewport().visibleRect().size())
+ ? FloatSize(page->visualViewport().visibleRect().size())
: FloatSize(view->visibleContentRect(scrollbarInclusion).size());
}
« no previous file with comments | « third_party/WebKit/Source/core/frame/FrameView.cpp ('k') | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698