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

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: Another rebase Created 7 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 | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/page/FrameView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/DOMWindow.cpp
diff --git a/Source/core/page/DOMWindow.cpp b/Source/core/page/DOMWindow.cpp
index a868de90032da23222dbf4054df1301628dc410c..88d6a4c3114dccdd51fb3b6c8c1b3635627eb97f 100644
--- a/Source/core/page/DOMWindow.cpp
+++ b/Source/core/page/DOMWindow.cpp
@@ -1011,9 +1011,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
@@ -1029,9 +1027,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
« no previous file with comments | « Source/core/inspector/InspectorPageAgent.cpp ('k') | Source/core/page/FrameView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698