Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(365)

Side by Side Diff: third_party/WebKit/Source/core/css/MediaValuesDynamicInitialViewport.cpp

Issue 1913833002: Current work-in-progress crbug.com/567021 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More assert fixes Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698