| 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()),
|
|
|