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

Unified Diff: Source/core/page/DOMWindow.cpp

Issue 23187005: [DevTools] Use device metrics emulation implemented in content. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Reupload Created 7 years, 3 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
Index: Source/core/page/DOMWindow.cpp
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index ed404f2b8e7cc40362b2f175e0c3f3e232831a0d..a0d0f31f5f06ece83febdcfcfea0b172cf9bdfa3 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -1001,9 +1001,7 @@ int DOMWindow::innerHeight() const
if (Frame* parent = m_frame->tree()->parent())
parent->document()->updateLayoutIgnorePendingStylesheets();
- // If the device height is overridden, do not include the horizontal scrollbar into the innerHeight (since it is absent on the real device).
- bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenHeightOverride(m_frame);
- return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).height()));
+ return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).height()));
}
int DOMWindow::innerWidth() const
@@ -1019,9 +1017,7 @@ int DOMWindow::innerWidth() const
if (Frame* parent = m_frame->tree()->parent())
parent->document()->updateLayoutIgnorePendingStylesheets();
- // If the device width is overridden, do not include the vertical scrollbar into the innerWidth (since it is absent on the real device).
- bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(m_frame);
- return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).width()));
+ return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).width()));
}
int DOMWindow::screenX() const

Powered by Google App Engine
This is Rietveld 408576698