| 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 2e1ec2d667e0bb246d2a962089cff1094237a0ea..8874f110a371713676e2872f863869f3ccc4bea0 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -1405,7 +1405,9 @@ IntRect FrameView::computeVisibleArea() {
|
| }
|
|
|
| FloatSize FrameView::viewportSizeForViewportUnits() const {
|
| - float zoom = frame().pageZoomFactor();
|
| + float zoom = 1;
|
| + if (!m_frame->document() || !m_frame->document()->printing())
|
| + zoom = frame().pageZoomFactor();
|
|
|
| LayoutViewItem layoutViewItem = this->layoutViewItem();
|
| if (layoutViewItem.isNull())
|
| @@ -1435,6 +1437,13 @@ FloatSize FrameView::viewportSizeForViewportUnits() const {
|
| return layoutSize;
|
| }
|
|
|
| +FloatSize FrameView::viewportSizeForMediaQueries() const {
|
| + FloatSize viewportSize(layoutSize(IncludeScrollbars));
|
| + if (!m_frame->document() || !m_frame->document()->printing())
|
| + viewportSize.scale(1 / frame().pageZoomFactor());
|
| + return viewportSize;
|
| +}
|
| +
|
| DocumentLifecycle& FrameView::lifecycle() const {
|
| DCHECK(m_frame);
|
| DCHECK(m_frame->document());
|
|
|