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

Unified Diff: third_party/WebKit/Source/web/DevToolsEmulator.cpp

Issue 2096633002: Adds scroll position/scale emulation to DevTools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: setNeedsCompositingUpdate now using InputChange. Created 4 years, 5 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: third_party/WebKit/Source/web/DevToolsEmulator.cpp
diff --git a/third_party/WebKit/Source/web/DevToolsEmulator.cpp b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
index 848f4e121489e3eb3daee48891475e134128abbc..dc6c2c52362b2daca1d0df7c46ec4c6b57c09870 100644
--- a/third_party/WebKit/Source/web/DevToolsEmulator.cpp
+++ b/third_party/WebKit/Source/web/DevToolsEmulator.cpp
@@ -239,7 +239,6 @@ void DevToolsEmulator::disableDeviceEmulation()
disableMobileEmulation();
m_webViewImpl->setCompositorDeviceScaleFactorOverride(0.f);
m_webViewImpl->setRootLayerTransform(WebSize(0.f, 0.f), 1.f);
- m_webViewImpl->setPageScaleFactor(1.f);
// mainFrameImpl() could be null during cleanup or remote <-> local swap.
if (m_webViewImpl->mainFrameImpl()) {
if (Document* document = m_webViewImpl->mainFrameImpl()->frame()->document())
@@ -314,6 +313,7 @@ void DevToolsEmulator::disableMobileEmulation()
m_webViewImpl->setDefaultPageScaleLimits(
m_originalDefaultMinimumPageScaleFactor,
m_originalDefaultMaximumPageScaleFactor);
+ m_webViewImpl->page()->frameHost().visualViewport().setScale(1.f);
bokan 2016/07/04 22:44:09 I think this does actually belong in disableDevice
Eric Seckler 2016/07/05 16:46:51 Done.
// mainFrameImpl() could be null during cleanup or remote <-> local swap.
if (m_webViewImpl->mainFrameImpl())
m_webViewImpl->mainFrameImpl()->frameView()->layout();

Powered by Google App Engine
This is Rietveld 408576698