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 85977cb686099cde2a01bc2b4e1861dcc3e901cb..b3330d5f0dc4ea314ff2d8b1b73d7537057cea55 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(); |
rune
2017/03/09 22:04:55
I have kept this change since this is what fixes i
bokan
2017/03/09 22:58:06
Acknowledged.
|
LayoutViewItem layoutViewItem = this->layoutViewItem(); |
if (layoutViewItem.isNull()) |
@@ -1435,6 +1437,13 @@ FloatSize FrameView::viewportSizeForViewportUnits() const { |
return layoutSize; |
} |
+FloatSize FrameView::viewportSizeForMediaQueries() const { |
+ FloatSize viewportSize(layoutSize()); |
+ 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()); |