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()); |