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

Unified Diff: Source/core/page/FrameView.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/page/FrameView.h ('k') | Source/core/page/Screen.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/page/FrameView.cpp
diff --git a/Source/core/page/FrameView.cpp b/Source/core/page/FrameView.cpp
index 2af18ca64ec92ba23cfe85e9bc9ceaa7c2cbf8f2..80bdbe73848b89d09ddf0be9cd5a4777c7db69b4 100644
--- a/Source/core/page/FrameView.cpp
+++ b/Source/core/page/FrameView.cpp
@@ -189,6 +189,7 @@ FrameView::FrameView(Frame* frame)
, m_didRunAutosize(false)
, m_hasSoftwareFilters(false)
, m_visibleContentScaleFactor(1)
+ , m_inputEventsScaleFactorForEmulation(1)
, m_partialLayout()
{
ASSERT(m_frame);
@@ -2549,6 +2550,19 @@ void FrameView::setVisibleContentScaleFactor(float visibleContentScaleFactor)
updateScrollbars(scrollOffset());
}
+void FrameView::setInputEventsScaleFactorForEmulation(float contentScaleFactor)
+{
+ if (m_inputEventsScaleFactorForEmulation == contentScaleFactor)
+ return;
+
+ m_inputEventsScaleFactorForEmulation = contentScaleFactor;
+}
+
+float FrameView::inputEventsScaleFactor() const
+{
+ return visibleContentScaleFactor() * m_inputEventsScaleFactorForEmulation;
+}
+
bool FrameView::scrollbarsCanBeActive() const
{
if (m_frame->view() != this)
« no previous file with comments | « Source/core/page/FrameView.h ('k') | Source/core/page/Screen.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698