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

Unified Diff: Source/web/WebFrameImpl.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/web/WebFrameImpl.h ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebFrameImpl.cpp
diff --git a/Source/web/WebFrameImpl.cpp b/Source/web/WebFrameImpl.cpp
index d023c24464dda8852f9dac55d28a816ada87dfbe..178e6236c6a87263110b65da1fa3335a713eda7a 100644
--- a/Source/web/WebFrameImpl.cpp
+++ b/Source/web/WebFrameImpl.cpp
@@ -2114,6 +2114,7 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client, long long embedderIdentifier)
, m_findMatchRectsAreValid(false)
, m_embedderIdentifier(embedderIdentifier)
, m_inSameDocumentHistoryLoad(false)
+ , m_inputEventsScaleFactorForEmulation(1)
{
WebKit::Platform::current()->incrementStatsCounter(webFrameActiveCount);
frameCount++;
@@ -2244,11 +2245,10 @@ void WebFrameImpl::createFrameView()
if (webView->shouldAutoResize() && isMainFrame)
frame()->view()->enableAutoSizeMode(true, webView->minAutoSize(), webView->maxAutoSize());
+ frame()->view()->setInputEventsScaleFactorForEmulation(m_inputEventsScaleFactorForEmulation);
+
if (isMainFrame)
webView->suppressInvalidations(false);
-
- if (isMainFrame && webView->devToolsAgentPrivate())
- webView->devToolsAgentPrivate()->mainFrameViewCreated(this);
}
WebFrameImpl* WebFrameImpl::fromFrame(Frame* frame)
@@ -2363,6 +2363,13 @@ void WebFrameImpl::setCanHaveScrollbars(bool canHaveScrollbars)
frame()->view()->setCanHaveScrollbars(canHaveScrollbars);
}
+void WebFrameImpl::setInputEventsScaleFactorForEmulation(float contentScaleFactor)
+{
+ m_inputEventsScaleFactorForEmulation = contentScaleFactor;
+ if (frame()->view())
+ frame()->view()->setInputEventsScaleFactorForEmulation(m_inputEventsScaleFactorForEmulation);
+}
+
void WebFrameImpl::invalidateArea(AreaToInvalidate area)
{
ASSERT(frame() && frame()->view());
« no previous file with comments | « Source/web/WebFrameImpl.h ('k') | Source/web/WebInputEventConversion.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698