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

Unified Diff: third_party/WebKit/Source/core/css/MediaValuesInitialViewport.cpp

Issue 2431613002: Initial viewport is not the same as FrameView rect. (Closed)
Patch Set: DCHECK that initial viewport size is read from main frame only. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/MediaValuesInitialViewportTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/MediaValuesInitialViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698