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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutMedia.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/layout/LayoutMedia.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
index ae50013ff9ecb3b817429f21eccb38bf6018c019..bdfc148eb9b5760e60c55b147a6fa1d30d4ca661 100644
--- a/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutMedia.cpp
@@ -25,7 +25,6 @@
#include "core/layout/LayoutMedia.h"
-#include "core/frame/FrameHost.h"
#include "core/frame/FrameView.h"
#include "core/frame/VisualViewport.h"
#include "core/html/HTMLMediaElement.h"
@@ -151,17 +150,17 @@ LayoutUnit LayoutMedia::computePanelWidth(const LayoutRect& mediaRect) const {
if (mediaElement() && mediaElement()->isFullscreen())
return mediaRect.width();
- FrameHost* frameHost = document().frameHost();
- LocalFrame* mainFrame = document().page()->deprecatedLocalMainFrame();
+ Page* page = document().page();
+ LocalFrame* mainFrame = page->deprecatedLocalMainFrame();
FrameView* pageView = mainFrame ? mainFrame->view() : nullptr;
- if (!frameHost || !mainFrame || !pageView)
+ if (!mainFrame || !pageView)
return mediaRect.width();
if (pageView->horizontalScrollbarMode() != ScrollbarAlwaysOff)
return mediaRect.width();
// On desktop, this will include scrollbars when they stay visible.
- const LayoutUnit visibleWidth(frameHost->visualViewport().visibleWidth());
+ const LayoutUnit visibleWidth(page->visualViewport().visibleWidth());
const LayoutUnit absoluteXOffset(
localToAbsolute(
FloatPoint(mediaRect.location()),
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutFullScreen.cpp ('k') | third_party/WebKit/Source/core/layout/ScrollAnchorTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698