OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "core/css/MediaValuesDynamicInitialViewport.h" |
| 6 |
| 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/FrameView.h" |
| 9 #include "core/frame/LocalFrame.h" |
| 10 |
| 11 namespace blink { |
| 12 |
| 13 double MediaValuesDynamicInitialViewport::viewportWidth() const |
| 14 { |
| 15 DCHECK(m_frame && m_frame->view() && m_frame->document()); |
| 16 int viewportWidth = m_frame->view()->frameRect().width(); |
| 17 return adjustDoubleForAbsoluteZoom(viewportWidth, m_frame->document()->layou
tViewItem().styleRef()); |
| 18 } |
| 19 |
| 20 double MediaValuesDynamicInitialViewport::viewportHeight() const |
| 21 { |
| 22 DCHECK(m_frame && m_frame->view() && m_frame->document()); |
| 23 int viewportHeight = m_frame->view()->frameRect().height(); |
| 24 return adjustDoubleForAbsoluteZoom(viewportHeight, m_frame->document()->layo
utViewItem().styleRef()); |
| 25 } |
| 26 |
| 27 } // namespace blink |
OLD | NEW |