Chromium Code Reviews| Index: third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp |
| diff --git a/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp b/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp |
| index 0d9f776cd3dc65b6f77ac90dee16ac14a5c683db..8ed02280cdb46f52ffe8f4cdb89aaab0578e15b6 100644 |
| --- a/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp |
| +++ b/third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp |
| @@ -19,17 +19,13 @@ MediaValuesInitialViewport::MediaValuesInitialViewport(LocalFrame& frame) |
| : MediaValuesDynamic(&frame) {} |
| double MediaValuesInitialViewport::viewportWidth() const { |
| - DCHECK(m_frame->view() && m_frame->document()); |
| - int viewportWidth = m_frame->view()->frameRect().width(); |
| - return adjustDoubleForAbsoluteZoom( |
| - viewportWidth, m_frame->document()->layoutViewItem().styleRef()); |
| + DCHECK(m_frame->view()); |
| + return m_frame->view()->initialViewportWidth(); |
|
bokan
2016/10/18 17:19:26
I'm a stranger around these parts, but m_frame can
rune
2016/10/18 22:09:53
Right, MediaValuesInitialViewport are only used fo
bokan
2016/10/18 22:28:06
Ok. I'm fine with either approach though DCHECKs f
rune
2016/10/18 22:56:12
DCHECKs added.
|
| } |
| double MediaValuesInitialViewport::viewportHeight() const { |
| - DCHECK(m_frame->view() && m_frame->document()); |
| - int viewportHeight = m_frame->view()->frameRect().height(); |
| - return adjustDoubleForAbsoluteZoom( |
| - viewportHeight, m_frame->document()->layoutViewItem().styleRef()); |
| + DCHECK(m_frame->view()); |
| + return m_frame->view()->initialViewportHeight(); |
| } |
| } // namespace blink |