Chromium Code Reviews| Index: third_party/WebKit/Source/core/frame/FrameView.cpp |
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| index fc8f37723622c32a6de17ab60b65e731e45b1271..21257bd9015ef7bcaa7b7126d3c7314f91ccb3ce 100644 |
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp |
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp |
| @@ -1353,7 +1353,8 @@ FloatSize FrameView::viewportSizeForViewportUnits() const { |
| // height, compensating for page scale as well, since we want to use the |
| // viewport with browser controls hidden for vh (to match Safari). |
| BrowserControls& browserControls = m_frame->host()->browserControls(); |
| - if (m_frame->isMainFrame() && size.width()) { |
| + if (m_frame->isMainFrame() && size.width() && |
| + m_frame->host()->visualViewport().size().width()) { |
|
rune
2016/12/09 15:27:50
I should probably check the pageScaleAtLayoutWidth
bokan
2016/12/09 16:48:55
Visual Viewport size should never be 0, do you kno
|
| float pageScaleAtLayoutWidth = |
| m_frame->host()->visualViewport().size().width() / size.width(); |
| size.expand(0, browserControls.height() / pageScaleAtLayoutWidth); |